[PATCH xf86-video-amdgpu] Call amdgpu_glamor_create_screen_resources after ModifyPixmapHeader

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 22, 2016 at 6:01 AM, Michel Dänzer <michel at daenzer.net> wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> Otherwise, glamor doesn't pick up the new screen pixmap size and
> continues using the old size, leaving garbage in some areas after
> enlarging the screen.
>
> Fixes regression from commit c315c00e44afc91a7c8e2eab5af836d9643ebb88
> ("Propagate failure from amdgpu_set_pixmap_bo").
>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  src/drmmode_display.c | 15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/src/drmmode_display.c b/src/drmmode_display.c
> index a07ada6..2cd99cb 100644
> --- a/src/drmmode_display.c
> +++ b/src/drmmode_display.c
> @@ -1936,14 +1936,8 @@ static Bool drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
>         xf86DrvMsg(scrn->scrnIndex, X_INFO, " => pitch %d bytes\n", pitch);
>         scrn->displayWidth = pitch / cpp;
>
> -       if (!amdgpu_glamor_create_screen_resources(scrn->pScreen))
> -               goto fail;
> -
>         if (info->use_glamor ||
>             (info->front_buffer->flags & AMDGPU_BO_FLAGS_GBM)) {
> -               if (!amdgpu_set_pixmap_bo(ppix, info->front_buffer))
> -                       goto fail;
> -
>                 screen->ModifyPixmapHeader(ppix,
>                                            width, height, -1, -1, pitch, info->front_buffer->cpu_ptr);
>         } else {
> @@ -1960,6 +1954,15 @@ static Bool drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
>         scrn->pixmapPrivate.ptr = ppix->devPrivate.ptr;
>  #endif
>
> +       if (!amdgpu_glamor_create_screen_resources(scrn->pScreen))
> +               goto fail;
> +
> +       if (info->use_glamor ||
> +           (info->front_buffer->flags & AMDGPU_BO_FLAGS_GBM)) {
> +               if (!amdgpu_set_pixmap_bo(ppix, info->front_buffer))
> +                       goto fail;
> +       }
> +
>         /* Clear new buffer */
>         gc = GetScratchGC(ppix->drawable.depth, scrn->pScreen);
>         ValidateGC(&ppix->drawable, gc);
> --
> 2.8.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux