Commit cb55cd0c authored by Ben Skeggs's avatar Ben Skeggs
Browse files

drm/nouveau/kms/nv50-: allow more flexibility with lut formats



Will be required for Turing.

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 5949dd8e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ struct nv50_head_atom {
		u8 size:2;
		u8 range:2;
		u8 output_mode:2;
		void (*load)(struct drm_color_lut *, int size, void __iomem *);
	} olut;

	struct {
@@ -172,6 +173,8 @@ struct nv50_wndw_atom {
			u8  size:2;
			u8  range:2;
			u8  output_mode:2;
			void (*load)(struct drm_color_lut *, int size,
				     void __iomem *);
		} i;
	} xlut;

+1 −0
Original line number Diff line number Diff line
@@ -80,6 +80,7 @@ base907c_ilut(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
{
	asyw->xlut.i.mode = 7;
	asyw->xlut.i.enable = 2;
	asyw->xlut.i.load = head907d_olut_load;
}

const struct nv50_wndw_func
+2 −0
Original line number Diff line number Diff line
@@ -45,6 +45,8 @@ struct nv50_disp_interlock {

void corec37d_ntfy_init(struct nouveau_bo *, u32);

void head907d_olut_load(struct drm_color_lut *, int size, void __iomem *);

struct nv50_chan {
	struct nvif_object user;
	struct nvif_device *device;
+3 −3
Original line number Diff line number Diff line
@@ -50,9 +50,9 @@ nv50_head_flush_set(struct nv50_head *head, struct nv50_head_atom *asyh)
	if (asyh->set.core   ) head->func->core_set(head, asyh);
	if (asyh->set.olut   ) {
		asyh->olut.offset = nv50_lut_load(&head->olut,
						  asyh->olut.mode <= 1,
						  asyh->olut.buffer,
						  asyh->state.gamma_lut);
						  asyh->state.gamma_lut,
						  asyh->olut.load);
		head->func->olut_set(head, asyh);
	}
	if (asyh->set.curs   ) head->func->curs_set(head, asyh);
@@ -210,7 +210,7 @@ nv50_head_atomic_check_lut(struct nv50_head *head,
		}
	}

	if (!olut) {
	if (!olut && !head->func->olut_identity) {
		asyh->olut.handle = 0;
		return 0;
	}
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ struct nv50_head_func {
	void (*view)(struct nv50_head *, struct nv50_head_atom *);
	void (*mode)(struct nv50_head *, struct nv50_head_atom *);
	void (*olut)(struct nv50_head *, struct nv50_head_atom *);
	bool olut_identity;
	void (*olut_set)(struct nv50_head *, struct nv50_head_atom *);
	void (*olut_clr)(struct nv50_head *);
	void (*core_calc)(struct nv50_head *, struct nv50_head_atom *);
Loading