Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+76 -35
+1
drivers/gpu/drm/bochs/bochs_kms.c
··· 146 146 bochs->dev->mode_config.preferred_depth = 24; 147 147 bochs->dev->mode_config.prefer_shadow = 0; 148 148 bochs->dev->mode_config.prefer_shadow_fbdev = 1; 149 + bochs->dev->mode_config.fbdev_use_iomem = true; 149 150 bochs->dev->mode_config.quirk_addfb_prefer_host_byte_order = true; 150 151 151 152 bochs->dev->mode_config.funcs = &bochs_mode_funcs;
+1
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
··· 1224 1224 1225 1225 adv7511->bridge.funcs = &adv7511_bridge_funcs; 1226 1226 adv7511->bridge.of_node = dev->of_node; 1227 + adv7511->bridge.type = DRM_MODE_CONNECTOR_HDMIA; 1227 1228 1228 1229 drm_bridge_add(&adv7511->bridge); 1229 1230
-5
drivers/gpu/drm/bridge/nwl-dsi.c
··· 917 917 struct drm_panel *panel; 918 918 int ret; 919 919 920 - if (flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR) { 921 - DRM_ERROR("Fix bridge driver to make connector optional!"); 922 - return -EINVAL; 923 - } 924 - 925 920 ret = drm_of_find_panel_or_bridge(dsi->dev->of_node, 1, 0, &panel, 926 921 &panel_bridge); 927 922 if (ret)
+5 -1
drivers/gpu/drm/drm_fb_helper.c
··· 399 399 unsigned int y; 400 400 401 401 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 + 403 407 src += fb->pitches[0]; 404 408 dst += fb->pitches[0]; 405 409 }
+4 -6
drivers/gpu/drm/drm_gem.c
··· 871 871 * @file_priv: drm file-private structure 872 872 * 873 873 * 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. 877 874 */ 878 875 int 879 876 drm_gem_open_ioctl(struct drm_device *dev, void *data, ··· 895 898 896 899 /* drm_gem_handle_create_tail unlocks dev->object_name_lock. */ 897 900 ret = drm_gem_handle_create_tail(file_priv, obj, &handle); 898 - drm_gem_object_put_unlocked(obj); 899 901 if (ret) 900 - return ret; 902 + goto err; 901 903 902 904 args->handle = handle; 903 905 args->size = obj->size; 904 906 905 - return 0; 907 + err: 908 + drm_gem_object_put_unlocked(obj); 909 + return ret; 906 910 } 907 911 908 912 /**
+1 -1
drivers/gpu/drm/drm_mipi_dbi.c
··· 923 923 } 924 924 } 925 925 926 - tr.len = chunk; 926 + tr.len = chunk * 2; 927 927 len -= chunk; 928 928 929 929 ret = spi_sync(spi, &m);
+1 -3
drivers/gpu/drm/drm_of.c
··· 322 322 * configurations by passing the endpoints explicitly to 323 323 * drm_of_lvds_get_dual_link_pixel_order(). 324 324 */ 325 - if (!current_pt || pixels_type != current_pt) { 326 - of_node_put(remote_port); 325 + if (!current_pt || pixels_type != current_pt) 327 326 return -EINVAL; 328 - } 329 327 } 330 328 331 329 return pixels_type;
+8 -3
drivers/gpu/drm/mcde/mcde_display.c
··· 1060 1060 */ 1061 1061 if (fb) { 1062 1062 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 + } 1066 1071 dev_info_once(mcde->dev, "sent first display update\n"); 1067 1072 } else { 1068 1073 /*
+2 -2
drivers/gpu/drm/nouveau/dispnv50/disp.c
··· 2073 2073 */ 2074 2074 if (core->assign_windows) { 2075 2075 core->func->wndw.owner(core); 2076 - core->func->update(core, interlock, false); 2076 + nv50_disp_atomic_commit_core(state, interlock); 2077 2077 core->assign_windows = false; 2078 2078 interlock[NV50_DISP_INTERLOCK_CORE] = 0; 2079 2079 } ··· 2506 2506 if (disp->disp->object.oclass >= TU102_DISP) 2507 2507 nouveau_display(dev)->format_modifiers = wndwc57e_modifiers; 2508 2508 else 2509 - if (disp->disp->object.oclass >= GF110_DISP) 2509 + if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_FERMI) 2510 2510 nouveau_display(dev)->format_modifiers = disp90xx_modifiers; 2511 2511 else 2512 2512 nouveau_display(dev)->format_modifiers = disp50xx_modifiers;
+2 -1
drivers/gpu/drm/nouveau/nouveau_fbcon.c
··· 315 315 struct drm_framebuffer *fb; 316 316 struct nouveau_channel *chan; 317 317 struct nouveau_bo *nvbo; 318 - struct drm_mode_fb_cmd2 mode_cmd; 318 + struct drm_mode_fb_cmd2 mode_cmd = {}; 319 319 int ret; 320 320 321 321 mode_cmd.width = sizes->surface_width; ··· 590 590 drm_fb_helper_fini(&fbcon->helper); 591 591 free: 592 592 kfree(fbcon); 593 + drm->fbcon = NULL; 593 594 return ret; 594 595 } 595 596
+21 -9
drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c
··· 117 117 { 118 118 struct nvkm_ior *ior; 119 119 120 - /* First preference is to reuse the OR that is currently armed 121 - * on HW, if any, in order to prevent unnecessary switching. 122 - */ 123 - list_for_each_entry(ior, &outp->disp->ior, head) { 124 - if (!ior->identity && !!ior->func->hda.hpd == hda && 125 - !ior->asy.outp && ior->arm.outp == outp) 126 - return nvkm_outp_acquire_ior(outp, user, ior); 127 - } 128 - 129 120 /* Failing that, a completely unused OR is the next best thing. */ 130 121 list_for_each_entry(ior, &outp->disp->ior, head) { 131 122 if (!ior->identity && !!ior->func->hda.hpd == hda && ··· 162 171 if (WARN_ON(!ior)) 163 172 return -ENOSPC; 164 173 return nvkm_outp_acquire_ior(outp, user, ior); 174 + } 175 + 176 + /* First preference is to reuse the OR that is currently armed 177 + * on HW, if any, in order to prevent unnecessary switching. 178 + */ 179 + list_for_each_entry(ior, &outp->disp->ior, head) { 180 + if (!ior->identity && !ior->asy.outp && ior->arm.outp == outp) { 181 + /*XXX: For various complicated reasons, we can't outright switch 182 + * the boot-time OR on the first modeset without some fairly 183 + * invasive changes. 184 + * 185 + * The systems that were fixed by modifying the OR selection 186 + * code to account for HDA support shouldn't regress here as 187 + * the HDA-enabled ORs match the relevant output's pad macro 188 + * index, and the firmware seems to select an OR this way. 189 + * 190 + * This warning is to make it obvious if that proves wrong. 191 + */ 192 + WARN_ON(hda && !ior->func->hda.hpd); 193 + return nvkm_outp_acquire_ior(outp, user, ior); 194 + } 165 195 } 166 196 167 197 /* If we don't need HDA, first try to acquire an OR that doesn't
+3 -3
drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
··· 615 615 static const struct drm_display_mode auo_kd101n80_45na_default_mode = { 616 616 .clock = 157000, 617 617 .hdisplay = 1200, 618 - .hsync_start = 1200 + 80, 619 - .hsync_end = 1200 + 80 + 24, 620 - .htotal = 1200 + 80 + 24 + 36, 618 + .hsync_start = 1200 + 60, 619 + .hsync_end = 1200 + 60 + 24, 620 + .htotal = 1200 + 60 + 24 + 56, 621 621 .vdisplay = 1920, 622 622 .vsync_start = 1920 + 16, 623 623 .vsync_end = 1920 + 16 + 4,
+15 -1
drivers/gpu/drm/panel/panel-simple.c
··· 1250 1250 .height = 165, 1251 1251 }, 1252 1252 .delay = { 1253 - .hpd_absent_delay = 200, 1253 + /* 1254 + * When power is first given to the panel there's a short 1255 + * spike on the HPD line. It was explained that this spike 1256 + * was until the TCON data download was complete. On 1257 + * one system this was measured at 8 ms. We'll put 15 ms 1258 + * in the prepare delay just to be safe and take it away 1259 + * from the hpd_absent_delay (which would otherwise be 200 ms) 1260 + * to handle this. That means: 1261 + * - If HPD isn't hooked up you still have 200 ms delay. 1262 + * - If HPD is hooked up we won't try to look at it for the 1263 + * first 15 ms. 1264 + */ 1265 + .prepare = 15, 1266 + .hpd_absent_delay = 185, 1267 + 1254 1268 .unprepare = 500, 1255 1269 }, 1256 1270 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
+12
include/drm/drm_mode_config.h
··· 866 866 bool prefer_shadow_fbdev; 867 867 868 868 /** 869 + * @fbdev_use_iomem: 870 + * 871 + * Set to true if framebuffer reside in iomem. 872 + * When set to true memcpy_toio() is used when copying the framebuffer in 873 + * drm_fb_helper.drm_fb_helper_dirty_blit_real(). 874 + * 875 + * FIXME: This should be replaced with a per-mapping is_iomem 876 + * flag (like ttm does), and then used everywhere in fbdev code. 877 + */ 878 + bool fbdev_use_iomem; 879 + 880 + /** 869 881 * @quirk_addfb_prefer_xbgr_30bpp: 870 882 * 871 883 * Special hack for legacy ADDFB to keep nouveau userspace happy. Should