[PATCH 4/6] modesetting: reverse prime support
Dave Airlie
airlied at gmail.com
Thu Jun 25 15:56:00 PDT 2015
>> +
>> + screenpix = screen->GetScreenPixmap(screen);
>> + screen->width = screenpix->drawable.width = total_width;
>> + screen->height = screenpix->drawable.height = max_height;
>
> Directly setting the width/height of a pixmap? That seems suspicious to
> me. Usually you're using ModifyPixmapHeader(), since you need to change
> other things (like the pointer/stride) at the same time. Is there an
> explanation for this being safe?
I just pre-existing precedent for this
xf86RandR12.c:xf86RandR12ScreenSetSize
after it calls the driver resize hook does
pScrnPix = (*pScreen->GetScreenPixmap) (pScreen);
pScreen->width = pScrnPix->drawable.width = width;
pScreen->height = pScrnPix->drawable.height = height;
and since I'm doing pretty much the same thing resizing the screen,
I used the code from there.
Dave.
More information about the xorg-devel
mailing list