Commit 87745321 authored by Hans de Goede's avatar Hans de Goede

modesetting: 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: default avatarHans de Goede <hdegoede@redhat.com>
Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
parent 210d83ad
...@@ -1697,7 +1697,6 @@ drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height) ...@@ -1697,7 +1697,6 @@ drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
drmmode_crtc = xf86_config->crtc[0]->driver_private; drmmode_crtc = xf86_config->crtc[0]->driver_private;
drmmode_ptr drmmode = drmmode_crtc->drmmode; drmmode_ptr drmmode = drmmode_crtc->drmmode;
drmmode_bo old_front; drmmode_bo old_front;
Bool ret;
ScreenPtr screen = xf86ScrnToScreen(scrn); ScreenPtr screen = xf86ScrnToScreen(scrn);
uint32_t old_fb_id; uint32_t old_fb_id;
int i, pitch, old_width, old_height, old_pitch; int i, pitch, old_width, old_height, old_pitch;
...@@ -1719,8 +1718,9 @@ drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height) ...@@ -1719,8 +1718,9 @@ drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
old_width = scrn->virtualX; old_width = scrn->virtualX;
old_height = scrn->virtualY; old_height = scrn->virtualY;
old_pitch = drmmode_bo_get_pitch(&drmmode->front_bo); old_pitch = drmmode_bo_get_pitch(&drmmode->front_bo);
old_fb_id = drmmode->fb_id;
old_front = drmmode->front_bo; old_front = drmmode->front_bo;
old_fb_id = drmmode->fb_id;
drmmode->fb_id = 0;
if (!drmmode_create_bo(drmmode, &drmmode->front_bo, if (!drmmode_create_bo(drmmode, &drmmode->front_bo,
width, height, scrn->bitsPerPixel)) width, height, scrn->bitsPerPixel))
...@@ -1732,13 +1732,6 @@ drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height) ...@@ -1732,13 +1732,6 @@ drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
scrn->virtualY = height; scrn->virtualY = height;
scrn->displayWidth = pitch / cpp; scrn->displayWidth = pitch / cpp;
ret = drmModeAddFB(drmmode->fd, width, height, scrn->depth,
scrn->bitsPerPixel, pitch,
drmmode_bo_get_handle(&drmmode->front_bo),
&drmmode->fb_id);
if (ret)
goto fail;
if (!drmmode->gbm) { if (!drmmode->gbm) {
new_pixels = drmmode_map_front_bo(drmmode); new_pixels = drmmode_map_front_bo(drmmode);
if (!new_pixels) if (!new_pixels)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment