OSDN Git Service

drm/nouveau/kms/nv50-: allow specification of valid heads for a window
authorBen Skeggs <bskeggs@redhat.com>
Tue, 8 May 2018 10:39:47 +0000 (20:39 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 18 May 2018 05:01:28 +0000 (15:01 +1000)
This will be required to support Volta, where window ID != head.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/dispnv50/base507c.c
drivers/gpu/drm/nouveau/dispnv50/curs507a.c
drivers/gpu/drm/nouveau/dispnv50/ovly507e.c
drivers/gpu/drm/nouveau/dispnv50/wndw.c
drivers/gpu/drm/nouveau/dispnv50/wndw.h

index 850c8de..548a6a6 100644 (file)
@@ -251,7 +251,7 @@ base507c_new_(const struct nv50_wndw_func *func, const u32 *format,
        int ret;
 
        ret = nv50_wndw_new_(func, drm->dev, DRM_PLANE_TYPE_PRIMARY,
-                            "base", head, format, &wndw);
+                            "base", head, format, BIT(head), &wndw);
        if (*pwndw = wndw, ret)
                return ret;
 
index 1a3e199..3e5e98c 100644 (file)
@@ -126,7 +126,7 @@ curs507a_new_(const struct nv50_wimm_func *func, struct nouveau_drm *drm,
        int ret;
 
        ret = nv50_wndw_new_(&curs507a_wndw, drm->dev, DRM_PLANE_TYPE_CURSOR,
-                            "curs", head, curs507a_format, &wndw);
+                            "curs", head, curs507a_format, BIT(head), &wndw);
        if (*pwndw = wndw, ret)
                return ret;
 
index ceec512..1b85262 100644 (file)
@@ -47,7 +47,7 @@ ovly507e_new_(const struct nv50_wndw_func *func, const u32 *format,
        int ret;
 
        ret = nv50_wndw_new_(func, drm->dev, DRM_PLANE_TYPE_OVERLAY,
-                            "ovly", head, format, &wndw);
+                            "ovly", head, format, BIT(head), &wndw);
        if (*pwndw = wndw, ret)
                return ret;
 
index a1e53c7..764db73 100644 (file)
@@ -420,7 +420,7 @@ nv50_wndw_init(struct nv50_wndw *wndw)
 int
 nv50_wndw_new_(const struct nv50_wndw_func *func, struct drm_device *dev,
               enum drm_plane_type type, const char *name, int index,
-              const u32 *format, struct nv50_wndw **pwndw)
+              const u32 *format, u32 heads, struct nv50_wndw **pwndw)
 {
        struct nv50_wndw *wndw;
        int nformat;
@@ -436,7 +436,7 @@ nv50_wndw_new_(const struct nv50_wndw_func *func, struct drm_device *dev,
 
        for (nformat = 0; format[nformat]; nformat++);
 
-       ret = drm_universal_plane_init(dev, &wndw->plane, 0, &nv50_wndw,
+       ret = drm_universal_plane_init(dev, &wndw->plane, heads, &nv50_wndw,
                                       format, nformat, NULL,
                                       type, "%s-%d", name, index);
        if (ret) {
index 7025973..8672c28 100644 (file)
@@ -34,7 +34,7 @@ struct nv50_wndw {
 
 int nv50_wndw_new_(const struct nv50_wndw_func *, struct drm_device *,
                   enum drm_plane_type, const char *name, int index,
-                  const u32 *format, struct nv50_wndw **);
+                  const u32 *format, u32 heads, struct nv50_wndw **);
 void nv50_wndw_init(struct nv50_wndw *);
 void nv50_wndw_fini(struct nv50_wndw *);
 u32 nv50_wndw_flush_set(struct nv50_wndw *, u32 interlock,