* Re: [PATCH 5/9] drm: Add Client Cap for advance gamma mode
@ 2021-06-01 10:58 kernel test robot
0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-06-01 10:58 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 2731 bytes --]
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210601104135.29020-6-uma.shankar@intel.com>
References: <20210601104135.29020-6-uma.shankar@intel.com>
TO: Uma Shankar <uma.shankar@intel.com>
TO: intel-gfx(a)lists.freedesktop.org
TO: dri-devel(a)lists.freedesktop.org
CC: Uma Shankar <uma.shankar@intel.com>
CC: bhanuprakash.modem(a)intel.com
Hi Uma,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-tip/drm-tip drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master v5.13-rc4 next-20210601]
[cannot apply to drm/drm-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Uma-Shankar/Enhance-pipe-color-support-for-multi-segmented-luts/20210601-180720
base: git://anongit.freedesktop.org/drm-intel for-linux-next
:::::: branch date: 51 minutes ago
:::::: commit date: 51 minutes ago
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
cd tools/perf && ./check-headers.sh
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
perfheadercheck warnings: (new ones prefixed by >>)
Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h': 819> /**
>> Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h': 820> * Add support for advance gamma mode UAPI
>> Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h': 821> * If set to 1, DRM will enable advance gamma mode
>> Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h': 822> * UAPI to process the gamma mode based on extended
>> Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h': 823> * range and segments.
Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h': 824> */
>> Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h': 825> #define DRM_CLIENT_CAP_ADVANCE_GAMMA_MODES 6
Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h': 826>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH 5/9] drm: Add Client Cap for advance gamma mode
2021-06-02 9:03 ` Pekka Paalanen
@ 2021-06-02 20:08 ` Shankar, Uma
0 siblings, 0 replies; 6+ messages in thread
From: Shankar, Uma @ 2021-06-02 20:08 UTC (permalink / raw)
To: Pekka Paalanen; +Cc: intel-gfx, dri-devel, Modem, Bhanuprakash
> -----Original Message-----
> From: Pekka Paalanen <ppaalanen@gmail.com>
> Sent: Wednesday, June 2, 2021 2:33 PM
> To: Shankar, Uma <uma.shankar@intel.com>
> Cc: intel-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; Modem,
> Bhanuprakash <bhanuprakash.modem@intel.com>
> Subject: Re: [PATCH 5/9] drm: Add Client Cap for advance gamma mode
>
> On Tue, 1 Jun 2021 16:11:31 +0530
> Uma Shankar <uma.shankar@intel.com> wrote:
>
> > Introduced a client cap for advance cap mode capability. Userspace
>
> Typo: "cap mode" should be "gamma mode"?
Yeah, will fix this.
> > should set this to get to be able to use the new gamma_mode property.
> >
> > If this is not set, driver will work in legacy mode.
> >
> > Note: This is suggested by Ville and based on his idea, the new gamma
> > mode handling is designed.
> >
> > Signed-off-by: Uma Shankar <uma.shankar@intel.com>
> > ---
> > drivers/gpu/drm/drm_atomic_uapi.c | 3 +++
> > drivers/gpu/drm/drm_ioctl.c | 5 +++++
> > include/drm/drm_atomic.h | 1 +
> > include/drm/drm_crtc.h | 8 ++++++++
> > include/drm/drm_file.h | 8 ++++++++
> > include/uapi/drm/drm.h | 8 ++++++++
> > 6 files changed, 33 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/drm_atomic_uapi.c
> > b/drivers/gpu/drm/drm_atomic_uapi.c
> > index a5470a0ebbe6..7ee35bc14455 100644
> > --- a/drivers/gpu/drm/drm_atomic_uapi.c
> > +++ b/drivers/gpu/drm/drm_atomic_uapi.c
> > @@ -1036,6 +1036,8 @@ int drm_atomic_set_property(struct drm_atomic_state
> *state,
> > break;
> > }
> >
> > + crtc_state->advance_gamma_mode_active =
> > + state->advance_gamma_mode_active;
> > ret = drm_atomic_crtc_set_property(crtc,
> > crtc_state, prop, prop_value);
> > break;
> > @@ -1372,6 +1374,7 @@ int drm_mode_atomic_ioctl(struct drm_device *dev,
> > drm_modeset_acquire_init(&ctx,
> DRM_MODESET_ACQUIRE_INTERRUPTIBLE);
> > state->acquire_ctx = &ctx;
> > state->allow_modeset = !!(arg->flags &
> > DRM_MODE_ATOMIC_ALLOW_MODESET);
> > + state->advance_gamma_mode_active =
> > +file_priv->advance_gamma_mode_active;
> >
> > retry:
> > copied_objs = 0;
> > diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
> > index 53d314103a37..d51f72213882 100644
> > --- a/drivers/gpu/drm/drm_ioctl.c
> > +++ b/drivers/gpu/drm/drm_ioctl.c
> > @@ -361,6 +361,11 @@ drm_setclientcap(struct drm_device *dev, void *data,
> struct drm_file *file_priv)
> > return -EINVAL;
> > file_priv->writeback_connectors = req->value;
> > break;
> > + case DRM_CLIENT_CAP_ADVANCE_GAMMA_MODES:
> > + if (req->value > 1)
> > + return -EINVAL;
> > + file_priv->advance_gamma_mode_active = req->value;
> > + break;
> > default:
> > return -EINVAL;
> > }
> > diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h index
> > ac5a28eff2c8..5a398a249c80 100644
> > --- a/include/drm/drm_atomic.h
> > +++ b/include/drm/drm_atomic.h
> > @@ -379,6 +379,7 @@ struct drm_atomic_state {
> > * states.
> > */
> > bool duplicated : 1;
> > + bool advance_gamma_mode_active : 1;
>
> "advance" is a verb. Did you mean "advanced"?
Right, will rename it.
>
> > struct __drm_planes_state *planes;
> > struct __drm_crtcs_state *crtcs;
> > int num_connector;
> > diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index
> > 5a594f134a81..f4339fbad086 100644
> > --- a/include/drm/drm_crtc.h
> > +++ b/include/drm/drm_crtc.h
> > @@ -170,6 +170,11 @@ struct drm_crtc_state {
> > */
> > bool color_mgmt_changed : 1;
> >
> > + /**
> > + * This is to indicate advance gamma mode support
> > + */
> > + bool advance_gamma_mode_active : 1;
>
> Same here.
>
> > +
> > /**
> > * @no_vblank:
> > *
> > @@ -1036,6 +1041,9 @@ struct drm_crtc {
> > */
> > bool enabled;
> >
> > + /** To handle advance gamma mode support */
> > + bool advance_gamma_mode_active : 1;
>
> Same here.
>
> > +
> > /**
> > * @mode:
> > *
> > diff --git a/include/drm/drm_file.h b/include/drm/drm_file.h index
> > b81b3bfb08c8..4af3e1a2a158 100644
> > --- a/include/drm/drm_file.h
> > +++ b/include/drm/drm_file.h
> > @@ -201,6 +201,14 @@ struct drm_file {
> > */
> > bool writeback_connectors;
> >
> > + /**
> > + * This is to enable advance gamma modes using
> > + * gamma_mode property
> > + *
> > + * True if client understands advance gamma
> > + */
> > + bool advance_gamma_mode_active : 1;
>
> Same here.
>
> > +
> > /**
> > * @was_master:
> > *
> > diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index
> > 67b94bc3c885..661efdf0c969 100644
> > --- a/include/uapi/drm/drm.h
> > +++ b/include/uapi/drm/drm.h
> > @@ -816,6 +816,14 @@ struct drm_get_cap {
> > */
> > #define DRM_CLIENT_CAP_WRITEBACK_CONNECTORS 5
> >
> > +/**
> > + * Add support for advance gamma mode UAPI
> > + * If set to 1, DRM will enable advance gamma mode
> > + * UAPI to process the gamma mode based on extended
> > + * range and segments.
> > + */
> > +#define DRM_CLIENT_CAP_ADVANCE_GAMMA_MODES 6
>
> Same here.
>
> > +
> > /* DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */ struct
> > drm_set_client_cap {
> > __u64 capability;
>
>
> Thanks,
> pq
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 5/9] drm: Add Client Cap for advance gamma mode
2021-06-01 10:41 ` [PATCH 5/9] drm: Add Client Cap for advance gamma mode Uma Shankar
2021-06-02 2:53 ` kernel test robot
@ 2021-06-02 9:03 ` Pekka Paalanen
2021-06-02 20:08 ` Shankar, Uma
1 sibling, 1 reply; 6+ messages in thread
From: Pekka Paalanen @ 2021-06-02 9:03 UTC (permalink / raw)
To: Uma Shankar; +Cc: intel-gfx, dri-devel, bhanuprakash.modem
[-- Attachment #1: Type: text/plain, Size: 4642 bytes --]
On Tue, 1 Jun 2021 16:11:31 +0530
Uma Shankar <uma.shankar@intel.com> wrote:
> Introduced a client cap for advance cap mode capability. Userspace
Typo: "cap mode" should be "gamma mode"?
> should set this to get to be able to use the new gamma_mode property.
>
> If this is not set, driver will work in legacy mode.
>
> Note: This is suggested by Ville and based on his idea, the new
> gamma mode handling is designed.
>
> Signed-off-by: Uma Shankar <uma.shankar@intel.com>
> ---
> drivers/gpu/drm/drm_atomic_uapi.c | 3 +++
> drivers/gpu/drm/drm_ioctl.c | 5 +++++
> include/drm/drm_atomic.h | 1 +
> include/drm/drm_crtc.h | 8 ++++++++
> include/drm/drm_file.h | 8 ++++++++
> include/uapi/drm/drm.h | 8 ++++++++
> 6 files changed, 33 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c
> index a5470a0ebbe6..7ee35bc14455 100644
> --- a/drivers/gpu/drm/drm_atomic_uapi.c
> +++ b/drivers/gpu/drm/drm_atomic_uapi.c
> @@ -1036,6 +1036,8 @@ int drm_atomic_set_property(struct drm_atomic_state *state,
> break;
> }
>
> + crtc_state->advance_gamma_mode_active =
> + state->advance_gamma_mode_active;
> ret = drm_atomic_crtc_set_property(crtc,
> crtc_state, prop, prop_value);
> break;
> @@ -1372,6 +1374,7 @@ int drm_mode_atomic_ioctl(struct drm_device *dev,
> drm_modeset_acquire_init(&ctx, DRM_MODESET_ACQUIRE_INTERRUPTIBLE);
> state->acquire_ctx = &ctx;
> state->allow_modeset = !!(arg->flags & DRM_MODE_ATOMIC_ALLOW_MODESET);
> + state->advance_gamma_mode_active = file_priv->advance_gamma_mode_active;
>
> retry:
> copied_objs = 0;
> diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
> index 53d314103a37..d51f72213882 100644
> --- a/drivers/gpu/drm/drm_ioctl.c
> +++ b/drivers/gpu/drm/drm_ioctl.c
> @@ -361,6 +361,11 @@ drm_setclientcap(struct drm_device *dev, void *data, struct drm_file *file_priv)
> return -EINVAL;
> file_priv->writeback_connectors = req->value;
> break;
> + case DRM_CLIENT_CAP_ADVANCE_GAMMA_MODES:
> + if (req->value > 1)
> + return -EINVAL;
> + file_priv->advance_gamma_mode_active = req->value;
> + break;
> default:
> return -EINVAL;
> }
> diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
> index ac5a28eff2c8..5a398a249c80 100644
> --- a/include/drm/drm_atomic.h
> +++ b/include/drm/drm_atomic.h
> @@ -379,6 +379,7 @@ struct drm_atomic_state {
> * states.
> */
> bool duplicated : 1;
> + bool advance_gamma_mode_active : 1;
"advance" is a verb. Did you mean "advanced"?
> struct __drm_planes_state *planes;
> struct __drm_crtcs_state *crtcs;
> int num_connector;
> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> index 5a594f134a81..f4339fbad086 100644
> --- a/include/drm/drm_crtc.h
> +++ b/include/drm/drm_crtc.h
> @@ -170,6 +170,11 @@ struct drm_crtc_state {
> */
> bool color_mgmt_changed : 1;
>
> + /**
> + * This is to indicate advance gamma mode support
> + */
> + bool advance_gamma_mode_active : 1;
Same here.
> +
> /**
> * @no_vblank:
> *
> @@ -1036,6 +1041,9 @@ struct drm_crtc {
> */
> bool enabled;
>
> + /** To handle advance gamma mode support */
> + bool advance_gamma_mode_active : 1;
Same here.
> +
> /**
> * @mode:
> *
> diff --git a/include/drm/drm_file.h b/include/drm/drm_file.h
> index b81b3bfb08c8..4af3e1a2a158 100644
> --- a/include/drm/drm_file.h
> +++ b/include/drm/drm_file.h
> @@ -201,6 +201,14 @@ struct drm_file {
> */
> bool writeback_connectors;
>
> + /**
> + * This is to enable advance gamma modes using
> + * gamma_mode property
> + *
> + * True if client understands advance gamma
> + */
> + bool advance_gamma_mode_active : 1;
Same here.
> +
> /**
> * @was_master:
> *
> diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h
> index 67b94bc3c885..661efdf0c969 100644
> --- a/include/uapi/drm/drm.h
> +++ b/include/uapi/drm/drm.h
> @@ -816,6 +816,14 @@ struct drm_get_cap {
> */
> #define DRM_CLIENT_CAP_WRITEBACK_CONNECTORS 5
>
> +/**
> + * Add support for advance gamma mode UAPI
> + * If set to 1, DRM will enable advance gamma mode
> + * UAPI to process the gamma mode based on extended
> + * range and segments.
> + */
> +#define DRM_CLIENT_CAP_ADVANCE_GAMMA_MODES 6
Same here.
> +
> /* DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */
> struct drm_set_client_cap {
> __u64 capability;
Thanks,
pq
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 5/9] drm: Add Client Cap for advance gamma mode
2021-06-01 10:41 ` [PATCH 5/9] drm: Add Client Cap for advance gamma mode Uma Shankar
@ 2021-06-02 2:53 ` kernel test robot
2021-06-02 9:03 ` Pekka Paalanen
1 sibling, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-06-02 2:53 UTC (permalink / raw)
To: Uma Shankar, intel-gfx, dri-devel
Cc: Uma Shankar, kbuild-all, bhanuprakash.modem
Hi Uma,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-tip/drm-tip drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master v5.13-rc4 next-20210601]
[cannot apply to drm/drm-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Uma-Shankar/Enhance-pipe-color-support-for-multi-segmented-luts/20210601-180720
base: git://anongit.freedesktop.org/drm-intel for-linux-next
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
cd tools/perf && ./check-headers.sh
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
perfheadercheck warnings: (new ones prefixed by >>)
Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h': 819> /**
>> Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h': 820> * Add support for advance gamma mode UAPI
>> Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h': 821> * If set to 1, DRM will enable advance gamma mode
>> Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h': 822> * UAPI to process the gamma mode based on extended
>> Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h': 823> * range and segments.
Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h': 824> */
>> Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h': 825> #define DRM_CLIENT_CAP_ADVANCE_GAMMA_MODES 6
Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h': 826>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 5/9] drm: Add Client Cap for advance gamma mode
@ 2021-06-02 2:53 ` kernel test robot
0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-06-02 2:53 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2309 bytes --]
Hi Uma,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-tip/drm-tip drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master v5.13-rc4 next-20210601]
[cannot apply to drm/drm-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Uma-Shankar/Enhance-pipe-color-support-for-multi-segmented-luts/20210601-180720
base: git://anongit.freedesktop.org/drm-intel for-linux-next
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
cd tools/perf && ./check-headers.sh
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
perfheadercheck warnings: (new ones prefixed by >>)
Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h': 819> /**
>> Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h': 820> * Add support for advance gamma mode UAPI
>> Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h': 821> * If set to 1, DRM will enable advance gamma mode
>> Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h': 822> * UAPI to process the gamma mode based on extended
>> Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h': 823> * range and segments.
Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h': 824> */
>> Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h': 825> #define DRM_CLIENT_CAP_ADVANCE_GAMMA_MODES 6
Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h': 826>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 5/9] drm: Add Client Cap for advance gamma mode
2021-06-01 10:41 [PATCH 0/9] Enhance pipe color support for multi segmented luts Uma Shankar
@ 2021-06-01 10:41 ` Uma Shankar
2021-06-02 2:53 ` kernel test robot
2021-06-02 9:03 ` Pekka Paalanen
0 siblings, 2 replies; 6+ messages in thread
From: Uma Shankar @ 2021-06-01 10:41 UTC (permalink / raw)
To: intel-gfx, dri-devel; +Cc: Uma Shankar, bhanuprakash.modem
Introduced a client cap for advance cap mode capability. Userspace
should set this to get to be able to use the new gamma_mode property.
If this is not set, driver will work in legacy mode.
Note: This is suggested by Ville and based on his idea, the new
gamma mode handling is designed.
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
---
drivers/gpu/drm/drm_atomic_uapi.c | 3 +++
drivers/gpu/drm/drm_ioctl.c | 5 +++++
include/drm/drm_atomic.h | 1 +
include/drm/drm_crtc.h | 8 ++++++++
include/drm/drm_file.h | 8 ++++++++
include/uapi/drm/drm.h | 8 ++++++++
6 files changed, 33 insertions(+)
diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c
index a5470a0ebbe6..7ee35bc14455 100644
--- a/drivers/gpu/drm/drm_atomic_uapi.c
+++ b/drivers/gpu/drm/drm_atomic_uapi.c
@@ -1036,6 +1036,8 @@ int drm_atomic_set_property(struct drm_atomic_state *state,
break;
}
+ crtc_state->advance_gamma_mode_active =
+ state->advance_gamma_mode_active;
ret = drm_atomic_crtc_set_property(crtc,
crtc_state, prop, prop_value);
break;
@@ -1372,6 +1374,7 @@ int drm_mode_atomic_ioctl(struct drm_device *dev,
drm_modeset_acquire_init(&ctx, DRM_MODESET_ACQUIRE_INTERRUPTIBLE);
state->acquire_ctx = &ctx;
state->allow_modeset = !!(arg->flags & DRM_MODE_ATOMIC_ALLOW_MODESET);
+ state->advance_gamma_mode_active = file_priv->advance_gamma_mode_active;
retry:
copied_objs = 0;
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
index 53d314103a37..d51f72213882 100644
--- a/drivers/gpu/drm/drm_ioctl.c
+++ b/drivers/gpu/drm/drm_ioctl.c
@@ -361,6 +361,11 @@ drm_setclientcap(struct drm_device *dev, void *data, struct drm_file *file_priv)
return -EINVAL;
file_priv->writeback_connectors = req->value;
break;
+ case DRM_CLIENT_CAP_ADVANCE_GAMMA_MODES:
+ if (req->value > 1)
+ return -EINVAL;
+ file_priv->advance_gamma_mode_active = req->value;
+ break;
default:
return -EINVAL;
}
diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
index ac5a28eff2c8..5a398a249c80 100644
--- a/include/drm/drm_atomic.h
+++ b/include/drm/drm_atomic.h
@@ -379,6 +379,7 @@ struct drm_atomic_state {
* states.
*/
bool duplicated : 1;
+ bool advance_gamma_mode_active : 1;
struct __drm_planes_state *planes;
struct __drm_crtcs_state *crtcs;
int num_connector;
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 5a594f134a81..f4339fbad086 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -170,6 +170,11 @@ struct drm_crtc_state {
*/
bool color_mgmt_changed : 1;
+ /**
+ * This is to indicate advance gamma mode support
+ */
+ bool advance_gamma_mode_active : 1;
+
/**
* @no_vblank:
*
@@ -1036,6 +1041,9 @@ struct drm_crtc {
*/
bool enabled;
+ /** To handle advance gamma mode support */
+ bool advance_gamma_mode_active : 1;
+
/**
* @mode:
*
diff --git a/include/drm/drm_file.h b/include/drm/drm_file.h
index b81b3bfb08c8..4af3e1a2a158 100644
--- a/include/drm/drm_file.h
+++ b/include/drm/drm_file.h
@@ -201,6 +201,14 @@ struct drm_file {
*/
bool writeback_connectors;
+ /**
+ * This is to enable advance gamma modes using
+ * gamma_mode property
+ *
+ * True if client understands advance gamma
+ */
+ bool advance_gamma_mode_active : 1;
+
/**
* @was_master:
*
diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h
index 67b94bc3c885..661efdf0c969 100644
--- a/include/uapi/drm/drm.h
+++ b/include/uapi/drm/drm.h
@@ -816,6 +816,14 @@ struct drm_get_cap {
*/
#define DRM_CLIENT_CAP_WRITEBACK_CONNECTORS 5
+/**
+ * Add support for advance gamma mode UAPI
+ * If set to 1, DRM will enable advance gamma mode
+ * UAPI to process the gamma mode based on extended
+ * range and segments.
+ */
+#define DRM_CLIENT_CAP_ADVANCE_GAMMA_MODES 6
+
/* DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */
struct drm_set_client_cap {
__u64 capability;
--
2.26.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-06-02 20:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01 10:58 [PATCH 5/9] drm: Add Client Cap for advance gamma mode kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2021-06-01 10:41 [PATCH 0/9] Enhance pipe color support for multi segmented luts Uma Shankar
2021-06-01 10:41 ` [PATCH 5/9] drm: Add Client Cap for advance gamma mode Uma Shankar
2021-06-02 2:53 ` kernel test robot
2021-06-02 2:53 ` kernel test robot
2021-06-02 9:03 ` Pekka Paalanen
2021-06-02 20:08 ` Shankar, Uma
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.