summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2016-09-21 16:27:11 +0900
committerMichel Dänzer <michel@daenzer.net>2016-09-21 18:20:19 +0900
commiteea370dc4f96e680cc29b416fe62d6e2ea09bc91 (patch)
tree69e51726222710c5e69d289df04a6720c5614d92 /src
parentcf52c76484a4adfa3e0b2271ea0c00f46d32ca48 (diff)
Remove unnecessary fb addition from drmmode_xf86crtc_resize
drmmode_set_mode_major() is the only user of drmmode->fb_id and will create it if necessary. Signed-off-by: Hans de Goede <hdegoede@redhat.com> (Ported from xserver commit 877453212166fdc912e0d687cdecee11aba563b5) (Ported from amdgpu commit 9ca1c24235ff5ab2e028333fc326e2eff008c574)
Diffstat (limited to 'src')
-rw-r--r--src/drmmode_display.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 89922d6d..4f25ae71 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1982,7 +1982,6 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
drmmode_ptr drmmode = drmmode_crtc->drmmode;
RADEONInfoPtr info = RADEONPTR(scrn);
struct radeon_bo *old_front = NULL;
- Bool ret;
ScreenPtr screen = xf86ScrnToScreen(scrn);
uint32_t old_fb_id;
int i, pitch, old_width, old_height, old_pitch;
@@ -2085,6 +2084,7 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
old_height = scrn->virtualY;
old_pitch = scrn->displayWidth;
old_fb_id = drmmode->fb_id;
+ drmmode->fb_id = 0;
old_front = info->front_bo;
scrn->virtualX = width;
@@ -2115,13 +2115,6 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
if (tiling_flags)
radeon_bo_set_tiling(info->front_bo, tiling_flags, pitch);
- ret = drmModeAddFB(drmmode->fd, width, height, scrn->depth,
- scrn->bitsPerPixel, pitch,
- info->front_bo->handle,
- &drmmode->fb_id);
- if (ret)
- goto fail;
-
if (!info->r600_shadow_fb) {
psurface = radeon_get_pixmap_surface(ppix);
*psurface = info->front_surface;