LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Paul Collins <paul@briny.ondioline.org>
To: airlied@linux.ie
Cc: benh@kernel.crashing.org, linux-kernel@vger.kernel.org
Subject: Re: gpu sharing layer for kernel
Date: Thu, 25 Jan 2007 20:56:37 +1300	[thread overview]
Message-ID: <87k5zbsfnu.fsf@briny.internal.ondioline.org> (raw)
In-Reply-To: <1169637623985-git-send-email-airlied@linux.ie> (airlied@linux.ie's message of "Wed\, 24 Jan 2007 22\:20\:18 +1100")

Hi Dave,

airlied@linux.ie writes:

> This patch series contains the gpu sharing layer for kernel that
> I've mentioned before. It should apply against Linus's git tree.

I gave the patches a go on my PowerBook.  I had to make a few changes
to get it to compile.  Works fine so far: I switched between VTs and X
with an accelerated GLX client active a few times, no problems.

When I did a sleep/resume cycle it wedged on resume, but I expect this
is due to my hacking up radeonfb_early_resume(), as seen in the last
hunk below, which was just aimed at just getting it to compile.


diff --git a/drivers/video/aty/radeon_backlight.c b/drivers/video/aty/radeon_backlight.c
index 3abfd4a..560568b 100644
--- a/drivers/video/aty/radeon_backlight.c
+++ b/drivers/video/aty/radeon_backlight.c
@@ -105,7 +105,7 @@ static int radeon_bl_update_status(struct backlight_device *bd)
 		   RADEON_PIXCLK_LVDS_ALWAYS_ON bit is off
 		*/
 		tmpPixclksCntl = INPLL(PIXCLKS_CNTL);
-		if (rinfo->is_mobility || rinfo->is_IGP)
+		if (rinfo->gpu_info->is_mobility || rinfo->gpu_info->is_IGP)
 			OUTPLLP(PIXCLKS_CNTL, 0, ~PIXCLK_LVDS_ALWAYS_ONb);
 		lvds_gen_cntl &= ~(LVDS_BL_MOD_LEVEL_MASK | LVDS_BL_MOD_EN);
 		lvds_gen_cntl |= (radeon_bl_get_level_brightness(pdata, 0) <<
@@ -119,7 +119,7 @@ static int radeon_bl_update_status(struct backlight_device *bd)
 		rinfo->pending_lvds_gen_cntl = lvds_gen_cntl;
 		mod_timer(&rinfo->lvds_timer,
 			  jiffies + msecs_to_jiffies(rinfo->panel_info.pwr_delay));
-		if (rinfo->is_mobility || rinfo->is_IGP)
+		if (rinfo->gpu_info->is_mobility || rinfo->gpu_info->is_IGP)
 			OUTPLL(PIXCLKS_CNTL, tmpPixclksCntl);
 	}
 	rinfo->init_state.lvds_gen_cntl &= ~LVDS_STATE_MASK;
@@ -176,10 +176,10 @@ void radeonfb_bl_init(struct radeonfb_info *rinfo)
 	 * direction backlight should work on a given panel?
 	 */
 	pdata->negative =
-		(rinfo->family != CHIP_FAMILY_RV200 &&
-		 rinfo->family != CHIP_FAMILY_RV250 &&
-		 rinfo->family != CHIP_FAMILY_RV280 &&
-		 rinfo->family != CHIP_FAMILY_RV350);
+		(rinfo->gpu_info->family != CHIP_FAMILY_RV200 &&
+		 rinfo->gpu_info->family != CHIP_FAMILY_RV250 &&
+		 rinfo->gpu_info->family != CHIP_FAMILY_RV280 &&
+		 rinfo->gpu_info->family != CHIP_FAMILY_RV350);
 
 #ifdef CONFIG_PMAC_BACKLIGHT
 	pdata->negative = pdata->negative ||
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
index f634c43..c8cc173 100644
--- a/drivers/video/aty/radeon_base.c
+++ b/drivers/video/aty/radeon_base.c
@@ -1837,7 +1837,8 @@ static int radeonfb_set_par(struct fb_info *info)
 
 #ifdef CONFIG_BOOTX_TEXT
 	/* Update debug text engine */
-	btext_update_display(rinfo->fb_base_phys, mode->xres, mode->yres,
+	btext_update_display(rinfo->gpu_info->fb_base_phys,
+			     mode->xres, mode->yres,
 			     rinfo->depth, info->fix.line_length);
 #endif
 
diff --git a/drivers/video/aty/radeon_monitor.c b/drivers/video/aty/radeon_monitor.c
index 8625f5d..4cd4f34 100644
--- a/drivers/video/aty/radeon_monitor.c
+++ b/drivers/video/aty/radeon_monitor.c
@@ -122,7 +122,7 @@ static int __devinit radeon_probe_OF_head(struct radeonfb_info *rinfo, int head_
         while (dp == NULL)
 		return MT_NONE;
 
-	if (rinfo->has_CRTC2) {
+	if (rinfo->gpu_info->has_CRTC2) {
 		const char *pname;
 		int len, second = 0;
 
@@ -141,7 +141,7 @@ static int __devinit radeon_probe_OF_head(struct radeonfb_info *rinfo, int head_
 				/* Maybe check for LVDS_GEN_CNTL here ? I need to check out
 				 * what OF does when booting with lid closed
 				 */
-				if (mt == MT_DFP && rinfo->is_mobility)
+				if (mt == MT_DFP && rinfo->gpu_info->is_mobility)
 					mt = MT_LCD;
 				return mt;
 			} else if (pname[len-1] == 'B' && head_no == 1)
@@ -655,7 +655,7 @@ static void radeon_fixup_panel_info(struct radeonfb_info *rinfo)
 	 * PPC only for now...
 	 */
 	if (!rinfo->panel_info.use_bios_dividers && rinfo->mon1_type == MT_LCD
-	    && rinfo->is_mobility) {
+	    && rinfo->gpu_info->is_mobility) {
 		int ppll_div_sel;
 		u32 ppll_divn;
 		ppll_div_sel = INREG8(CLOCK_CNTL_INDEX + 1) & 0x3;
diff --git a/drivers/video/aty/radeon_pm.c b/drivers/video/aty/radeon_pm.c
index 9a59804..f113616 100644
--- a/drivers/video/aty/radeon_pm.c
+++ b/drivers/video/aty/radeon_pm.c
@@ -957,7 +957,7 @@ static void radeon_pm_setup_for_suspend(struct radeonfb_info *rinfo)
 #ifdef CONFIG_PPC_PMAC
 	if (machine_is(powermac)) {
 		/* AGP PLL control */
-		if (rinfo->family <= CHIP_FAMILY_RV280) {
+		if (rinfo->gpu_info->family <= CHIP_FAMILY_RV280) {
 			OUTREG(BUS_CNTL1, INREG(BUS_CNTL1) |  BUS_CNTL1__AGPCLK_VALID);
 			OUTREG(BUS_CNTL1,
 			       (INREG(BUS_CNTL1) & ~BUS_CNTL1__MOBILE_PLATFORM_SEL_MASK)
@@ -2817,7 +2817,7 @@ static void radeonfb_early_resume(void *data)
         struct radeonfb_info *rinfo = data;
 
 	rinfo->no_schedule = 1;
-	radeonfb_pci_resume(rinfo->pdev);
+	radeonfb_gpu_resume(rinfo->gpu_info->info.device);
 	rinfo->no_schedule = 0;
 }
 #endif /* CONFIG_PPC_OF */


-- 
Paul Collins
Wellington, New Zealand

Dag vijandelijk luchtschip de huismeester is dood

  parent reply	other threads:[~2007-01-25  8:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-24 11:20 airlied
2007-01-24 11:20 ` [PATCH] gpu: Initial gpu layer addition airlied
2007-01-24 11:20   ` [PATCH] gpu/radeon: add a radeon lowlevel GPU driver airlied
2007-01-24 11:20     ` [PATCH] gpu/radeonfb: add GPU support to radeonfb airlied
2007-01-24 11:20       ` [PATCH] gpu/drm: Add GPU layer support to generic DRM airlied
2007-01-24 11:20         ` [PATCH] drm/gpu/radeon: Add radeon DRM support to use GPU layer airlied
2007-01-25  0:07       ` [PATCH] gpu/radeonfb: add GPU support to radeonfb Benjamin Herrenschmidt
2007-01-30 19:50         ` Dave Airlie
2007-01-24 21:46 ` gpu sharing layer for kernel Greg KH
2007-01-24 22:39   ` Dave Airlie
2007-01-25 22:06     ` Greg KH
2007-01-28 21:16       ` Dave Jones
2007-02-07 18:42     ` James Simmons
2007-02-06 19:40   ` James Simmons
2007-01-25  7:56 ` Paul Collins [this message]
2007-01-30 19:49   ` Dave Airlie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k5zbsfnu.fsf@briny.internal.ondioline.org \
    --to=paul@briny.ondioline.org \
    --cc=airlied@linux.ie \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: gpu sharing layer for kernel' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).