dri-devel Archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] gma500: Fix leak of uncached page
@ 2012-02-02 15:17 Alan Cox
  2012-02-02 15:17 ` [PATCH 2/2] gma500: plug in more of the gamma functionality Alan Cox
  2012-02-03 10:15 ` [PATCH 1/2] gma500: Fix leak of uncached page Dave Airlie
  0 siblings, 2 replies; 4+ messages in thread
From: Alan Cox @ 2012-02-02 15:17 UTC (permalink / raw
  To: airlied, dri-devel

(Resending in two bits to avoid stgit breakage)

From: Alan Cox <alan@linux.intel.com>

This was reported a long time ago (and I apologize to whoever it was that
reported it as I've lost the original report).

Signed-off-by: Alan Cox <alan@linux.intel.com>
---

 drivers/gpu/drm/gma500/psb_drv.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
index f14768f..653f439 100644
--- a/drivers/gpu/drm/gma500/psb_drv.c
+++ b/drivers/gpu/drm/gma500/psb_drv.c
@@ -239,6 +239,7 @@ static int psb_driver_unload(struct drm_device *dev)
 		}
 		psb_gtt_takedown(dev);
 		if (dev_priv->scratch_page) {
+			set_pages_wb(dev_priv->scratch_page, 1);
 			__free_page(dev_priv->scratch_page);
 			dev_priv->scratch_page = NULL;
 		}

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] gma500: plug in more of the gamma functionality
  2012-02-02 15:17 [PATCH 1/2] gma500: Fix leak of uncached page Alan Cox
@ 2012-02-02 15:17 ` Alan Cox
  2012-02-03 10:15 ` [PATCH 1/2] gma500: Fix leak of uncached page Dave Airlie
  1 sibling, 0 replies; 4+ messages in thread
From: Alan Cox @ 2012-02-02 15:17 UTC (permalink / raw
  To: airlied, dri-devel

From: Alan Cox <alan@linux.intel.com>

Signed-off-by: Alan Cox <alan@linux.intel.com>
---

 drivers/gpu/drm/gma500/framebuffer.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)


diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c
index 791c0ef..97d5b80 100644
--- a/drivers/gpu/drm/gma500/framebuffer.c
+++ b/drivers/gpu/drm/gma500/framebuffer.c
@@ -560,11 +560,21 @@ static struct drm_framebuffer *psb_user_framebuffer_create
 static void psbfb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green,
 							u16 blue, int regno)
 {
+	struct psb_intel_crtc *intel_crtc = to_psb_intel_crtc(crtc);
+
+	intel_crtc->lut_r[regno] = red >> 8;
+	intel_crtc->lut_g[regno] = green >> 8;
+	intel_crtc->lut_b[regno] = blue >> 8;
 }
 
 static void psbfb_gamma_get(struct drm_crtc *crtc, u16 *red,
 					u16 *green, u16 *blue, int regno)
 {
+	struct psb_intel_crtc *intel_crtc = to_psb_intel_crtc(crtc);
+
+	*red = intel_crtc->lut_r[regno] << 8;
+	*green = intel_crtc->lut_g[regno] << 8;
+	*blue = intel_crtc->lut_b[regno] << 8;
 }
 
 static int psbfb_probe(struct drm_fb_helper *helper,

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] gma500: Fix leak of uncached page
  2012-02-02 15:17 [PATCH 1/2] gma500: Fix leak of uncached page Alan Cox
  2012-02-02 15:17 ` [PATCH 2/2] gma500: plug in more of the gamma functionality Alan Cox
@ 2012-02-03 10:15 ` Dave Airlie
  2012-02-03 12:00   ` Alan Cox
  1 sibling, 1 reply; 4+ messages in thread
From: Dave Airlie @ 2012-02-03 10:15 UTC (permalink / raw
  To: Alan Cox; +Cc: dri-devel

On Thu, Feb 2, 2012 at 3:17 PM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> (Resending in two bits to avoid stgit breakage)

Hi Alan,

Any of these important enough for -fixes? or -next good enough?

Dave.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] gma500: Fix leak of uncached page
  2012-02-03 10:15 ` [PATCH 1/2] gma500: Fix leak of uncached page Dave Airlie
@ 2012-02-03 12:00   ` Alan Cox
  0 siblings, 0 replies; 4+ messages in thread
From: Alan Cox @ 2012-02-03 12:00 UTC (permalink / raw
  To: Dave Airlie; +Cc: dri-devel

On Fri, 3 Feb 2012 10:15:41 +0000
Dave Airlie <airlied@gmail.com> wrote:

> On Thu, Feb 2, 2012 at 3:17 PM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> > (Resending in two bits to avoid stgit breakage)
> 
> Hi Alan,
> 
> Any of these important enough for -fixes? or -next good enough?

The cache one maybe the others can wait. Both though are minor things
that only occur if you build it as module and unload it - which is pretty
much never going to happen.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-02-03 11:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-02 15:17 [PATCH 1/2] gma500: Fix leak of uncached page Alan Cox
2012-02-02 15:17 ` [PATCH 2/2] gma500: plug in more of the gamma functionality Alan Cox
2012-02-03 10:15 ` [PATCH 1/2] gma500: Fix leak of uncached page Dave Airlie
2012-02-03 12:00   ` Alan Cox

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 read-only IMAP folder(s) and NNTP newsgroup(s).