Commit 29ace860 authored by Ben Skeggs's avatar Ben Skeggs
Browse files

drm/nouveau/kms/nv50-: use NVIDIA's headers for core head_procamp()



Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
parent f801efb1
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -36,8 +36,12 @@ head507d_procamp(struct nv50_head *head, struct nv50_head_atom *asyh)
	if ((ret = PUSH_WAIT(push, 2)))
		return ret;

	PUSH_NVSQ(push, NV507D, 0x08a8 + (i * 0x400), asyh->procamp.sat.sin << 20 |
						      asyh->procamp.sat.cos << 8);
	PUSH_MTHD(push, NV507D, HEAD_SET_PROCAMP(i),
		  NVDEF(NV507D, HEAD_SET_PROCAMP, COLOR_SPACE, RGB) |
		  NVDEF(NV507D, HEAD_SET_PROCAMP, CHROMA_LPF, AUTO) |
		  NVVAL(NV507D, HEAD_SET_PROCAMP, SAT_COS, asyh->procamp.sat.cos) |
		  NVVAL(NV507D, HEAD_SET_PROCAMP, SAT_SINE, asyh->procamp.sat.sin) |
		  NVDEF(NV507D, HEAD_SET_PROCAMP, TRANSITION, HARD));
	return 0;
}

+7 −2
Original line number Diff line number Diff line
@@ -63,8 +63,13 @@ head907d_procamp(struct nv50_head *head, struct nv50_head_atom *asyh)
	if ((ret = PUSH_WAIT(push, 2)))
		return ret;

	PUSH_NVSQ(push, NV907D, 0x0498 + (i * 0x300), asyh->procamp.sat.sin << 20 |
						      asyh->procamp.sat.cos << 8);
	PUSH_MTHD(push, NV907D, HEAD_SET_PROCAMP(i),
		  NVDEF(NV907D, HEAD_SET_PROCAMP, COLOR_SPACE, RGB) |
		  NVDEF(NV907D, HEAD_SET_PROCAMP, CHROMA_LPF, AUTO) |
		  NVVAL(NV907D, HEAD_SET_PROCAMP, SAT_COS, asyh->procamp.sat.cos) |
		  NVVAL(NV907D, HEAD_SET_PROCAMP, SAT_SINE, asyh->procamp.sat.sin) |
		  NVDEF(NV907D, HEAD_SET_PROCAMP, DYNAMIC_RANGE, VESA) |
		  NVDEF(NV907D, HEAD_SET_PROCAMP, RANGE_COMPRESSION, DISABLE));
	return 0;
}

+8 −3
Original line number Diff line number Diff line
@@ -69,9 +69,14 @@ headc37d_procamp(struct nv50_head *head, struct nv50_head_atom *asyh)
	if ((ret = PUSH_WAIT(push, 2)))
		return ret;

	PUSH_NVSQ(push, NVC37D, 0x2000 + (i * 0x400), 0x80000000 |
						      asyh->procamp.sat.sin << 16 |
						      asyh->procamp.sat.cos << 4);
	PUSH_MTHD(push, NVC37D, HEAD_SET_PROCAMP(i),
		  NVDEF(NVC37D, HEAD_SET_PROCAMP, COLOR_SPACE, RGB) |
		  NVDEF(NVC37D, HEAD_SET_PROCAMP, CHROMA_LPF, DISABLE) |
		  NVVAL(NVC37D, HEAD_SET_PROCAMP, SAT_COS, asyh->procamp.sat.cos) |
		  NVVAL(NVC37D, HEAD_SET_PROCAMP, SAT_SINE, asyh->procamp.sat.sin) |
		  NVDEF(NVC37D, HEAD_SET_PROCAMP, DYNAMIC_RANGE, VESA) |
		  NVDEF(NVC37D, HEAD_SET_PROCAMP, RANGE_COMPRESSION, DISABLE) |
		  NVDEF(NVC37D, HEAD_SET_PROCAMP, BLACK_LEVEL, GRAPHICS));
	return 0;
}

+4 −1
Original line number Diff line number Diff line
@@ -71,7 +71,10 @@ headc57d_procamp(struct nv50_head *head, struct nv50_head_atom *asyh)
		return ret;

	//TODO:
	PUSH_NVSQ(push, NVC57D, 0x2000 + (i * 0x400), 0x00000000);
	PUSH_MTHD(push, NVC57D, HEAD_SET_PROCAMP(i),
		  NVDEF(NVC57D, HEAD_SET_PROCAMP, COLOR_SPACE, RGB) |
		  NVDEF(NVC57D, HEAD_SET_PROCAMP, CHROMA_LPF, DISABLE) |
		  NVDEF(NVC57D, HEAD_SET_PROCAMP, DYNAMIC_RANGE, VESA));
	return 0;
}