Skip to content

Commit c2f3850

Browse files
committed
Merge tag 'drm-fixes-2020-07-29' of git://anongit.freedesktop.org/drm/drm into master
Pull drm fixes from Dave Airlie: "The nouveau fixes missed the last pull by a few hours, and we had a few arm driver/panel/bridge fixes come in. This is possibly a bit more than I'm comfortable sending at this stage, but I've looked at each patch, the core + nouveau patches fix regressions, and the arm related ones are all around screens turning on and working, and are mostly trivial patches, the line count is mostly in comments. core: - fix possible use-after-free drm_fb_helper: - regression fix to use memcpy_io on bochs' sparc64 nouveau: - format modifiers fixes - HDA regression fix - turing modesetting race fix of: - fix a double free dbi: - fix SPI Type 1 transfer mcde: - fix screen stability crash panel: - panel: fix display noise on auo,kd101n80-45na - panel: delay HPD checks for boe_nv133fhm_n61 bridge: - bridge: drop connector check in nwl-dsi bridge - bridge: set proper bridge type for adv7511" * tag 'drm-fixes-2020-07-29' of git://anongit.freedesktop.org/drm/drm: drm: hold gem reference until object is no longer accessed drm/dbi: Fix SPI Type 1 (9-bit) transfer drm/drm_fb_helper: fix fbdev with sparc64 drm/mcde: Fix stability issue drm/bridge: nwl-dsi: Drop DRM_BRIDGE_ATTACH_NO_CONNECTOR check. drm/panel: Fix auo, kd101n80-45na horizontal noise on edges of panel drm: panel: simple: Delay HPD checking on boe_nv133fhm_n61 for 15 ms drm/bridge/adv7511: set the bridge type properly drm: of: Fix double-free bug drm/nouveau/fbcon: zero-initialise the mode_cmd2 structure drm/nouveau/fbcon: fix module unload when fbcon init has failed for some reason drm/nouveau/kms/tu102: wait for core update to complete when assigning windows drm/nouveau/kms/gf100: use correct format modifiers drm/nouveau/disp/gm200-: fix regression from HDA SOR selection changes
2 parents f227e3e + a4a2739 commit c2f3850

File tree

14 files changed

+76
-35
lines changed

14 files changed

+76
-35
lines changed

drivers/gpu/drm/bochs/bochs_kms.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ int bochs_kms_init(struct bochs_device *bochs)
146146
bochs->dev->mode_config.preferred_depth = 24;
147147
bochs->dev->mode_config.prefer_shadow = 0;
148148
bochs->dev->mode_config.prefer_shadow_fbdev = 1;
149+
bochs->dev->mode_config.fbdev_use_iomem = true;
149150
bochs->dev->mode_config.quirk_addfb_prefer_host_byte_order = true;
150151

151152
bochs->dev->mode_config.funcs = &bochs_mode_funcs;

drivers/gpu/drm/bridge/adv7511/adv7511_drv.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,6 +1224,7 @@ static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
12241224

12251225
adv7511->bridge.funcs = &adv7511_bridge_funcs;
12261226
adv7511->bridge.of_node = dev->of_node;
1227+
adv7511->bridge.type = DRM_MODE_CONNECTOR_HDMIA;
12271228

12281229
drm_bridge_add(&adv7511->bridge);
12291230

drivers/gpu/drm/bridge/nwl-dsi.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -917,11 +917,6 @@ static int nwl_dsi_bridge_attach(struct drm_bridge *bridge,
917917
struct drm_panel *panel;
918918
int ret;
919919

920-
if (flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR) {
921-
DRM_ERROR("Fix bridge driver to make connector optional!");
922-
return -EINVAL;
923-
}
924-
925920
ret = drm_of_find_panel_or_bridge(dsi->dev->of_node, 1, 0, &panel,
926921
&panel_bridge);
927922
if (ret)

drivers/gpu/drm/drm_fb_helper.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,11 @@ static void drm_fb_helper_dirty_blit_real(struct drm_fb_helper *fb_helper,
399399
unsigned int y;
400400

401401
for (y = clip->y1; y < clip->y2; y++) {
402-
memcpy(dst, src, len);
402+
if (!fb_helper->dev->mode_config.fbdev_use_iomem)
403+
memcpy(dst, src, len);
404+
else
405+
memcpy_toio((void __iomem *)dst, src, len);
406+
403407
src += fb->pitches[0];
404408
dst += fb->pitches[0];
405409
}

drivers/gpu/drm/drm_gem.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -871,9 +871,6 @@ drm_gem_flink_ioctl(struct drm_device *dev, void *data,
871871
* @file_priv: drm file-private structure
872872
*
873873
* Open an object using the global name, returning a handle and the size.
874-
*
875-
* This handle (of course) holds a reference to the object, so the object
876-
* will not go away until the handle is deleted.
877874
*/
878875
int
879876
drm_gem_open_ioctl(struct drm_device *dev, void *data,
@@ -898,14 +895,15 @@ drm_gem_open_ioctl(struct drm_device *dev, void *data,
898895

899896
/* drm_gem_handle_create_tail unlocks dev->object_name_lock. */
900897
ret = drm_gem_handle_create_tail(file_priv, obj, &handle);
901-
drm_gem_object_put_unlocked(obj);
902898
if (ret)
903-
return ret;
899+
goto err;
904900

905901
args->handle = handle;
906902
args->size = obj->size;
907903

908-
return 0;
904+
err:
905+
drm_gem_object_put_unlocked(obj);
906+
return ret;
909907
}
910908

911909
/**

drivers/gpu/drm/drm_mipi_dbi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ static int mipi_dbi_spi1_transfer(struct mipi_dbi *dbi, int dc,
923923
}
924924
}
925925

926-
tr.len = chunk;
926+
tr.len = chunk * 2;
927927
len -= chunk;
928928

929929
ret = spi_sync(spi, &m);

drivers/gpu/drm/drm_of.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,10 +322,8 @@ static int drm_of_lvds_get_remote_pixels_type(
322322
* configurations by passing the endpoints explicitly to
323323
* drm_of_lvds_get_dual_link_pixel_order().
324324
*/
325-
if (!current_pt || pixels_type != current_pt) {
326-
of_node_put(remote_port);
325+
if (!current_pt || pixels_type != current_pt)
327326
return -EINVAL;
328-
}
329327
}
330328

331329
return pixels_type;

drivers/gpu/drm/mcde/mcde_display.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,9 +1060,14 @@ static void mcde_display_update(struct drm_simple_display_pipe *pipe,
10601060
*/
10611061
if (fb) {
10621062
mcde_set_extsrc(mcde, drm_fb_cma_get_gem_addr(fb, pstate, 0));
1063-
if (!mcde->video_mode)
1064-
/* Send a single frame using software sync */
1065-
mcde_display_send_one_frame(mcde);
1063+
if (!mcde->video_mode) {
1064+
/*
1065+
* Send a single frame using software sync if the flow
1066+
* is not active yet.
1067+
*/
1068+
if (mcde->flow_active == 0)
1069+
mcde_display_send_one_frame(mcde);
1070+
}
10661071
dev_info_once(mcde->dev, "sent first display update\n");
10671072
} else {
10681073
/*

drivers/gpu/drm/nouveau/dispnv50/disp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2073,7 +2073,7 @@ nv50_disp_atomic_commit_tail(struct drm_atomic_state *state)
20732073
*/
20742074
if (core->assign_windows) {
20752075
core->func->wndw.owner(core);
2076-
core->func->update(core, interlock, false);
2076+
nv50_disp_atomic_commit_core(state, interlock);
20772077
core->assign_windows = false;
20782078
interlock[NV50_DISP_INTERLOCK_CORE] = 0;
20792079
}
@@ -2506,7 +2506,7 @@ nv50_display_create(struct drm_device *dev)
25062506
if (disp->disp->object.oclass >= TU102_DISP)
25072507
nouveau_display(dev)->format_modifiers = wndwc57e_modifiers;
25082508
else
2509-
if (disp->disp->object.oclass >= GF110_DISP)
2509+
if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_FERMI)
25102510
nouveau_display(dev)->format_modifiers = disp90xx_modifiers;
25112511
else
25122512
nouveau_display(dev)->format_modifiers = disp50xx_modifiers;

drivers/gpu/drm/nouveau/nouveau_fbcon.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ nouveau_fbcon_create(struct drm_fb_helper *helper,
315315
struct drm_framebuffer *fb;
316316
struct nouveau_channel *chan;
317317
struct nouveau_bo *nvbo;
318-
struct drm_mode_fb_cmd2 mode_cmd;
318+
struct drm_mode_fb_cmd2 mode_cmd = {};
319319
int ret;
320320

321321
mode_cmd.width = sizes->surface_width;
@@ -590,6 +590,7 @@ nouveau_fbcon_init(struct drm_device *dev)
590590
drm_fb_helper_fini(&fbcon->helper);
591591
free:
592592
kfree(fbcon);
593+
drm->fbcon = NULL;
593594
return ret;
594595
}
595596

0 commit comments

Comments
 (0)