modesetting: Internal storage of scanout pixmaps
modesetting relied on randr_crtc->scanout_pixmap being consistent with calls to SetScanoutPixmap, which is very fragile and makes a lot of assumptions about the caller's behavior. For example, RRReplaceScanoutPixmap(), when dropping off with !size_fits, will set randr_crtc->scanout_pixmap = NULL and then call SetScanoutPixmap. Without this patch, drmmode_set_scanout_pixmap_(cpu/gpu) will think that there is no scanout pixmap to tear down, because it's already been set to NULL. By keeping track of the scanout pixmap in its internal state, modesetting can avoid these types of bugs and reduce constraints on calling conventions. v1: N/A v2: N/A v3: N/A v4: N/A v5: Initial commit v6: Rebase onto ToT v7: Unchanged Reviewed-by:Dave Airlie <airlied@redhat.com> Signed-off-by:
Alex Goins <agoins@nvidia.com>
Showing
- hw/xfree86/drivers/modesetting/driver.c 5 additions, 4 deletionshw/xfree86/drivers/modesetting/driver.c
- hw/xfree86/drivers/modesetting/drmmode_display.c 14 additions, 8 deletionshw/xfree86/drivers/modesetting/drmmode_display.c
- hw/xfree86/drivers/modesetting/drmmode_display.h 3 additions, 0 deletionshw/xfree86/drivers/modesetting/drmmode_display.h
Loading
Please register or sign in to comment