drm/nouveau/kms/nv50: use INTERPOLATE_257_UNITY_RANGE LUT on newer chipsets

"Linux Kernel Mailing List" <[email protected]>
Newsgroups gmane.linux.kernel.commits.head
Message-ID <[email protected]>
Web:        https://git.kernel.org/torvalds/c/90df522912ac1fa88836fa1b1b9fa102a48d1f33
Commit:     90df522912ac1fa88836fa1b1b9fa102a48d1f33
Parent:     e75182f68b7b3a073e33b89ee4c1688160755930
Refname:    refs/heads/master
Author:     Ben Skeggs <[email protected]>
AuthorDate: Fri Jan 12 19:02:05 2018 +1000
Committer:  Ben Skeggs <[email protected]>
CommitDate: Fri Feb 2 15:24:07 2018 +1000

    drm/nouveau/kms/nv50: use INTERPOLATE_257_UNITY_RANGE LUT on newer chipsets
    
    For some reason forgotten by history, we've been using a 1025-entry LUT
    mode, and sparsely filling it with the 256-entry LUT we're handed.
    
    Until we land support for the full atomic colour management properties,
    this commit switches to using the 257-entry mode to fix colour mapping
    with depth 30 framebuffers.
    
    Reported-by: Ilia Mirkin <[email protected]>
    Signed-off-by: Ben Skeggs <[email protected]>
---
 drivers/gpu/drm/nouveau/nv50_display.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c
index f4daf8c55de1..973a41262139 100644
--- a/drivers/gpu/drm/nouveau/nv50_display.c
+++ b/drivers/gpu/drm/nouveau/nv50_display.c
@@ -1818,7 +1818,7 @@ nv50_head_lut_set(struct nv50_head *head, struct nv50_head_atom *asyh)
 			evo_data(push, asyh->lut.handle);
 		} else {
 			evo_mthd(push, 0x0440 + (head->base.index * 0x300), 4);
-			evo_data(push, 0x83000000);
+			evo_data(push, 0x87000000);
 			evo_data(push, asyh->lut.offset >> 8);
 			evo_data(push, 0x00000000);
 			evo_data(push, 0x00000000);
@@ -2225,9 +2225,9 @@ nv50_head_lut_load(struct drm_crtc *crtc)
 			writew((*b++ >> 2) + 0x0000, lut + (i * 0x08) + 4);
 		} else {
 			/* 0x6000 interferes with the 14-bit color??? */
-			writew((*r++ >> 2) + 0x6000, lut + (i * 0x20) + 0);
-			writew((*g++ >> 2) + 0x6000, lut + (i * 0x20) + 2);
-			writew((*b++ >> 2) + 0x6000, lut + (i * 0x20) + 4);
+			writew((*r++ >> 2) + 0x6000, lut + (i * 0x08) + 0);
+			writew((*g++ >> 2) + 0x6000, lut + (i * 0x08) + 2);
+			writew((*b++ >> 2) + 0x6000, lut + (i * 0x08) + 4);
 		}
 	}
 }
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.