public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] gma500: Don't try and take a GEM handle of a non GEM fb
@ 2011-05-13 10:08 Alan Cox
  2011-05-13 10:09 ` [PATCH 2/2] gma500: finish off the fault handler Alan Cox
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Cox @ 2011-05-13 10:08 UTC (permalink / raw)
  To: greg, linux-kernel

The initial GMA500 framebuffer is not GEM but stolen memory. We can't
therefore take a GEM handle of it. Stop anyone trying to do this and causing
a crash.

Ideally we need a way to have GEM handles to non GEM objects but it's not
clear how and if GEM and the modesetting/fb interfaces it provides are
supposed to or indeed if they can handle it.

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

 drivers/staging/gma500/psb_fb.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/gma500/psb_fb.c b/drivers/staging/gma500/psb_fb.c
index 32d3ea3..5028459 100644
--- a/drivers/staging/gma500/psb_fb.c
+++ b/drivers/staging/gma500/psb_fb.c
@@ -667,6 +667,8 @@ static int psb_user_framebuffer_create_handle(struct drm_framebuffer *fb,
 {
         struct psb_framebuffer *psbfb = to_psb_fb(fb);
         struct gtt_range *r = psbfb->gtt;
+        if (r->stolen)
+                return -EOPNOTSUPP;
         return drm_gem_handle_create(file_priv, &r->gem, handle);
 }
 


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

end of thread, other threads:[~2011-05-13 10:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-13 10:08 [PATCH 1/2] gma500: Don't try and take a GEM handle of a non GEM fb Alan Cox
2011-05-13 10:09 ` [PATCH 2/2] gma500: finish off the fault handler Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox