Commit 0d786980 authored by Dave Airlie's avatar Dave Airlie

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: default avatarDave Airlie <airlied@redhat.com>
From: Ben Skeggs <skeggsb@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ <CACAvsv5aAp+FZMZGTB+Nszc==h5gEbdNV58sSRRQDF1R5qQRGg@mail.gmail.com
parents 92ed3019 15fbc3b9
...@@ -2073,7 +2073,7 @@ nv50_disp_atomic_commit_tail(struct drm_atomic_state *state) ...@@ -2073,7 +2073,7 @@ nv50_disp_atomic_commit_tail(struct drm_atomic_state *state)
*/ */
if (core->assign_windows) { if (core->assign_windows) {
core->func->wndw.owner(core); core->func->wndw.owner(core);
core->func->update(core, interlock, false); nv50_disp_atomic_commit_core(state, interlock);
core->assign_windows = false; core->assign_windows = false;
interlock[NV50_DISP_INTERLOCK_CORE] = 0; interlock[NV50_DISP_INTERLOCK_CORE] = 0;
} }
...@@ -2506,7 +2506,7 @@ nv50_display_create(struct drm_device *dev) ...@@ -2506,7 +2506,7 @@ nv50_display_create(struct drm_device *dev)
if (disp->disp->object.oclass >= TU102_DISP) if (disp->disp->object.oclass >= TU102_DISP)
nouveau_display(dev)->format_modifiers = wndwc57e_modifiers; nouveau_display(dev)->format_modifiers = wndwc57e_modifiers;
else else
if (disp->disp->object.oclass >= GF110_DISP) if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_FERMI)
nouveau_display(dev)->format_modifiers = disp90xx_modifiers; nouveau_display(dev)->format_modifiers = disp90xx_modifiers;
else else
nouveau_display(dev)->format_modifiers = disp50xx_modifiers; nouveau_display(dev)->format_modifiers = disp50xx_modifiers;
......
...@@ -315,7 +315,7 @@ nouveau_fbcon_create(struct drm_fb_helper *helper, ...@@ -315,7 +315,7 @@ nouveau_fbcon_create(struct drm_fb_helper *helper,
struct drm_framebuffer *fb; struct drm_framebuffer *fb;
struct nouveau_channel *chan; struct nouveau_channel *chan;
struct nouveau_bo *nvbo; struct nouveau_bo *nvbo;
struct drm_mode_fb_cmd2 mode_cmd; struct drm_mode_fb_cmd2 mode_cmd = {};
int ret; int ret;
mode_cmd.width = sizes->surface_width; mode_cmd.width = sizes->surface_width;
...@@ -590,6 +590,7 @@ nouveau_fbcon_init(struct drm_device *dev) ...@@ -590,6 +590,7 @@ nouveau_fbcon_init(struct drm_device *dev)
drm_fb_helper_fini(&fbcon->helper); drm_fb_helper_fini(&fbcon->helper);
free: free:
kfree(fbcon); kfree(fbcon);
drm->fbcon = NULL;
return ret; return ret;
} }
......
...@@ -117,15 +117,6 @@ nvkm_outp_acquire_hda(struct nvkm_outp *outp, enum nvkm_ior_type type, ...@@ -117,15 +117,6 @@ nvkm_outp_acquire_hda(struct nvkm_outp *outp, enum nvkm_ior_type type,
{ {
struct nvkm_ior *ior; struct nvkm_ior *ior;
/* First preference is to reuse the OR that is currently armed
* on HW, if any, in order to prevent unnecessary switching.
*/
list_for_each_entry(ior, &outp->disp->ior, head) {
if (!ior->identity && !!ior->func->hda.hpd == hda &&
!ior->asy.outp && ior->arm.outp == outp)
return nvkm_outp_acquire_ior(outp, user, ior);
}
/* Failing that, a completely unused OR is the next best thing. */ /* Failing that, a completely unused OR is the next best thing. */
list_for_each_entry(ior, &outp->disp->ior, head) { list_for_each_entry(ior, &outp->disp->ior, head) {
if (!ior->identity && !!ior->func->hda.hpd == hda && if (!ior->identity && !!ior->func->hda.hpd == hda &&
...@@ -173,6 +164,27 @@ nvkm_outp_acquire(struct nvkm_outp *outp, u8 user, bool hda) ...@@ -173,6 +164,27 @@ nvkm_outp_acquire(struct nvkm_outp *outp, u8 user, bool hda)
return nvkm_outp_acquire_ior(outp, user, ior); return nvkm_outp_acquire_ior(outp, user, ior);
} }
/* First preference is to reuse the OR that is currently armed
* on HW, if any, in order to prevent unnecessary switching.
*/
list_for_each_entry(ior, &outp->disp->ior, head) {
if (!ior->identity && !ior->asy.outp && ior->arm.outp == outp) {
/*XXX: For various complicated reasons, we can't outright switch
* the boot-time OR on the first modeset without some fairly
* invasive changes.
*
* The systems that were fixed by modifying the OR selection
* code to account for HDA support shouldn't regress here as
* the HDA-enabled ORs match the relevant output's pad macro
* index, and the firmware seems to select an OR this way.
*
* This warning is to make it obvious if that proves wrong.
*/
WARN_ON(hda && !ior->func->hda.hpd);
return nvkm_outp_acquire_ior(outp, user, ior);
}
}
/* If we don't need HDA, first try to acquire an OR that doesn't /* If we don't need HDA, first try to acquire an OR that doesn't
* support it to leave free the ones that do. * support it to leave free the ones that do.
*/ */
......
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