Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d6c2fe1 authored by Ben Skeggs's avatar Ben Skeggs
Browse files

drm/nouveau/kms/nv50-: allow specification of valid heads for a window



This will be required to support Volta, where window ID != head.

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent ccd27db8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;

+1 −1
Original line number Diff line number Diff line
@@ -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;

+1 −1
Original line number Diff line number Diff line
@@ -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;

+2 −2
Original line number Diff line number Diff line
@@ -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) {
+1 −1
Original line number Diff line number Diff line
@@ -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,