]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/gpu/drm/nouveau/dispnv50/wndw.c
drm/nouveau/kms/nv50-: disable input lut harder
[linux.git] / drivers / gpu / drm / nouveau / dispnv50 / wndw.c
index b95181027b3177610edf8f91c4ba97be6d7314be..0aaa7e0013f61c8705487dcdb6edf3c6fa038893 100644 (file)
@@ -26,6 +26,8 @@
 #include <nvif/cl0002.h>
 
 #include <drm/drm_atomic_helper.h>
+#include <drm/drm_fourcc.h>
+
 #include "nouveau_bo.h"
 
 static void
@@ -127,7 +129,7 @@ void
 nv50_wndw_flush_set(struct nv50_wndw *wndw, u32 *interlock,
                    struct nv50_wndw_atom *asyw)
 {
-       if (interlock) {
+       if (interlock[NV50_DISP_INTERLOCK_CORE]) {
                asyw->image.mode = 0;
                asyw->image.interval = 1;
        }
@@ -149,7 +151,7 @@ nv50_wndw_flush_set(struct nv50_wndw *wndw, u32 *interlock,
        if (asyw->set.point) {
                if (asyw->set.point = false, asyw->set.mask)
                        interlock[wndw->interlock.type] |= wndw->interlock.data;
-               interlock[NV50_DISP_INTERLOCK_WIMM] |= wndw->interlock.data;
+               interlock[NV50_DISP_INTERLOCK_WIMM] |= wndw->interlock.wimm;
 
                wndw->immd->point(wndw, asyw);
                wndw->immd->update(wndw, interlock);
@@ -320,7 +322,9 @@ nv50_wndw_atomic_check_lut(struct nv50_wndw *wndw,
                asyh->wndw.olut &= ~BIT(wndw->id);
        }
 
-       if (!ilut && wndw->func->ilut_identity) {
+       if (!ilut && wndw->func->ilut_identity &&
+           asyw->state.fb->format->format != DRM_FORMAT_XBGR16161616F &&
+           asyw->state.fb->format->format != DRM_FORMAT_ABGR16161616F) {
                static struct drm_property_blob dummy = {};
                ilut = &dummy;
        }
@@ -332,6 +336,8 @@ nv50_wndw_atomic_check_lut(struct nv50_wndw *wndw,
                asyw->xlut.handle = wndw->wndw.vram.handle;
                asyw->xlut.i.buffer = !asyw->xlut.i.buffer;
                asyw->set.xlut = true;
+       } else {
+               asyw->clr.xlut = armw->xlut.handle != 0;
        }
 
        /* Handle setting base SET_OUTPUT_LUT_LO_ENABLE_USE_CORE_LUT. */
@@ -457,7 +463,7 @@ nv50_wndw_prepare_fb(struct drm_plane *plane, struct drm_plane_state *state)
                asyw->image.handle[0] = ctxdma->object.handle;
        }
 
-       asyw->state.fence = reservation_object_get_excl_rcu(fb->nvbo->bo.resv);
+       asyw->state.fence = dma_resv_get_excl_rcu(fb->nvbo->bo.base.resv);
        asyw->image.offset[0] = fb->nvbo->bo.offset;
 
        if (wndw->func->prepare) {