Skip to content

Commit 0d78698

Browse files
committed
Merge branch 'linux-5.8' of git://github.com/skeggsb/linux into drm-fixes
A couple of fixes for issues relating to format modifiers (there's still a patch pending from James Jones to hopefully address the remaining ones), regression fix from the recent HDA nightmare, and a race fix for Turing modesetting. Signed-off-by: Dave Airlie <[email protected]> From: Ben Skeggs <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/ <CACAvsv5aAp+FZMZGTB+Nszc==h5gEbdNV58sSRRQDF1R5qQRGg@mail.gmail.com
2 parents 92ed301 + 15fbc3b commit 0d78698

File tree

3 files changed

+25
-12
lines changed

3 files changed

+25
-12
lines changed

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

drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,6 @@ nvkm_outp_acquire_hda(struct nvkm_outp *outp, enum nvkm_ior_type type,
117117
{
118118
struct nvkm_ior *ior;
119119

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-
129120
/* Failing that, a completely unused OR is the next best thing. */
130121
list_for_each_entry(ior, &outp->disp->ior, head) {
131122
if (!ior->identity && !!ior->func->hda.hpd == hda &&
@@ -173,6 +164,27 @@ nvkm_outp_acquire(struct nvkm_outp *outp, u8 user, bool hda)
173164
return nvkm_outp_acquire_ior(outp, user, ior);
174165
}
175166

167+
/* First preference is to reuse the OR that is currently armed
168+
* on HW, if any, in order to prevent unnecessary switching.
169+
*/
170+
list_for_each_entry(ior, &outp->disp->ior, head) {
171+
if (!ior->identity && !ior->asy.outp && ior->arm.outp == outp) {
172+
/*XXX: For various complicated reasons, we can't outright switch
173+
* the boot-time OR on the first modeset without some fairly
174+
* invasive changes.
175+
*
176+
* The systems that were fixed by modifying the OR selection
177+
* code to account for HDA support shouldn't regress here as
178+
* the HDA-enabled ORs match the relevant output's pad macro
179+
* index, and the firmware seems to select an OR this way.
180+
*
181+
* This warning is to make it obvious if that proves wrong.
182+
*/
183+
WARN_ON(hda && !ior->func->hda.hpd);
184+
return nvkm_outp_acquire_ior(outp, user, ior);
185+
}
186+
}
187+
176188
/* If we don't need HDA, first try to acquire an OR that doesn't
177189
* support it to leave free the ones that do.
178190
*/

0 commit comments

Comments
 (0)