Displaying 7 results from an estimated 7 matches for "drm_color_lut".
2019 Jun 20
0
[PATCH] drm/nouveau/kms/gf119-: allow both 256- and 1024-sized LUTs to be used
...v50_head_atomic_check_lut(struct nv50_head *head,
struct nv50_head_atom *asyh)
{
struct nv50_disp *disp = nv50_disp(head->base.base.dev);
+ struct drm_property_blob *ilut = asyh->state.degamma_lut;
struct drm_property_blob *olut = asyh->state.gamma_lut;
+ int ilut_size = ilut ? drm_color_lut_size(ilut) : 0;
+ int olut_size = olut ? drm_color_lut_size(olut) : 0;
+
+ if (!head->func->lut_chk(ilut_size)) {
+ DRM_DEBUG_KMS("Invalid DEGAMMA_LUT size: %d\n", ilut_size);
+ return -EINVAL;
+ }
+ if (!head->func->lut_chk(olut_size)) {
+ DRM_DEBUG_KMS("Invalid GAMMA...
2019 Sep 06
0
[PATCH] drm/nouveau/kms/gf119-: allow both 256- and 1024-sized LUTs to be used
...rs/gpu/drm/nouveau/dispnv50/head.c
index 71c23bf1fe25..42ba68dadb80 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/head.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/head.c
@@ -235,9 +235,13 @@ nv50_head_atomic_check_lut(struct nv50_head *head,
return 0;
}
+ if (!head->func->olut(head, asyh, drm_color_lut_size(olut))) {
+ DRM_DEBUG_KMS("Invalid olut\n");
+ return -EINVAL;
+ }
asyh->olut.handle = disp->core->chan.vram.handle;
asyh->olut.buffer = !asyh->olut.buffer;
- head->func->olut(head, asyh);
+
return 0;
}
@@ -511,11 +515,11 @@ nv50_head_create(struct drm...
2017 Jul 04
0
[PATCH v3 04/16] drm/color-mgmt: move atomic state/commit out from .gamma_set
...struct drm_crtc_state *state)
{
struct drm_device *dev = crtc->dev;
struct drm_mode_config *config = &dev->mode_config;
- struct drm_atomic_state *state;
- struct drm_crtc_state *crtc_state;
- struct drm_property_blob *blob = NULL;
+ struct drm_property_blob *blob;
struct drm_color_lut *blob_data;
int i, ret = 0;
- state = drm_atomic_state_alloc(crtc->dev);
- if (!state)
- return -ENOMEM;
-
blob = drm_property_create_blob(dev,
sizeof(struct drm_color_lut) * size,
NULL);
- if (IS_ERR(blob)) {
- ret = PTR_ERR(blob);
- blob = NULL;
- goto fail;
- }
+ if (IS_...
2019 Oct 08
2
[PATCH 1/3] drm/nouveau/kms/nv50-: make base917c_format static
The base917c_format isn't exported, so make it static to
avoid the following warning:
drivers/gpu/drm/nouveau/dispnv50/base917c.c:26:1: warning: symbol 'base917c_format' was not declared. Should it be static?
Signed-off-by: Ben Dooks <ben.dooks at codethink.co.uk>
---
drivers/gpu/drm/nouveau/dispnv50/base917c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
2017 Jul 04
5
[PATCH v3 00/16] improve the fb_setcmap helper
Hi!
While trying to get CLUT support for the atmel_hlcdc driver, and
specifically for the emulated fbdev interface, I received some
push-back that my feeble in-driver attempts should be solved
by the core. This is my attempt to do it right.
I have obviously not tested all of this with more than a compile,
but patches 1 through 5 are enough to make the atmel-hlcdc driver
do what I need. The rest
2017 Jul 04
5
[PATCH v3 00/16] improve the fb_setcmap helper
Hi!
While trying to get CLUT support for the atmel_hlcdc driver, and
specifically for the emulated fbdev interface, I received some
push-back that my feeble in-driver attempts should be solved
by the core. This is my attempt to do it right.
I have obviously not tested all of this with more than a compile,
but patches 1 through 5 are enough to make the atmel-hlcdc driver
do what I need. The rest
2017 Jul 04
5
[PATCH v3 00/16] improve the fb_setcmap helper
Hi!
While trying to get CLUT support for the atmel_hlcdc driver, and
specifically for the emulated fbdev interface, I received some
push-back that my feeble in-driver attempts should be solved
by the core. This is my attempt to do it right.
I have obviously not tested all of this with more than a compile,
but patches 1 through 5 are enough to make the atmel-hlcdc driver
do what I need. The rest