diff mbox

[7/9] drm/gma500: use gem get/put page helpers

Message ID CAF6AEGvnAZtTj-LyQdgmekat0ujNTA+qcNn4PKyaa047DbzoCQ@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Rob Clark Oct. 8, 2013, 8:19 p.m. UTC
On Tue, Oct 8, 2013 at 3:57 PM, Guillaume CLÉMENT <gclement@baobob.org> wrote:
> On Wed, Aug 07, 2013 at 01:41:25PM -0400, Rob Clark wrote:
>> Signed-off-by: Rob Clark <robdclark@gmail.com>
>> ---
>>  drivers/gpu/drm/gma500/gtt.c | 38 ++++++--------------------------------
>>  1 file changed, 6 insertions(+), 32 deletions(-)
>> [ snip ]
>
> This is quite late to report, but I've just begun testing 3.12, and this
> patch makes my screen garbled when using the modesetting xorg driver.
>
> So far it looks like the buffer that the xorg driver gets is
> not the one that is actually mapped by the kernel.
>
> I'm currently trying to know what exactly causes the problem, but I don't
> know anything about the internals here...
>

could you try this small patch.. I think I missed something w/ my
original patch (sorry, no hw to test on here):

----------
----------


>
> I doubt it will help, but the fbdev driver still works with this patch.
>
>
> - Guillaume
diff mbox

Patch

diff --git a/drivers/gpu/drm/gma500/gtt.c b/drivers/gpu/drm/gma500/gtt.c
index 92babac..2db731f 100644
--- a/drivers/gpu/drm/gma500/gtt.c
+++ b/drivers/gpu/drm/gma500/gtt.c
@@ -204,6 +204,7 @@  static int psb_gtt_attach_pages(struct gtt_range *gt)
     if (IS_ERR(pages))
         return PTR_ERR(pages);

+    gt->npage = gt->gem.size / PAGE_SIZE;
     gt->pages = pages;

     return 0;