From: Pekka Paalanen <ppaalanen@gmail.com> To: Uma Shankar <uma.shankar@intel.com> Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, bhanuprakash.modem@intel.com Subject: Re: [PATCH 5/9] drm: Add Client Cap for advance gamma mode Date: Wed, 2 Jun 2021 12:03:28 +0300 [thread overview] Message-ID: <20210602120328.6ad60a2e@eldfell> (raw) In-Reply-To: <20210601104135.29020-6-uma.shankar@intel.com> [-- 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 --]
WARNING: multiple messages have this Message-ID (diff)
From: Pekka Paalanen <ppaalanen@gmail.com> To: Uma Shankar <uma.shankar@intel.com> Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: Re: [Intel-gfx] [PATCH 5/9] drm: Add Client Cap for advance gamma mode Date: Wed, 2 Jun 2021 12:03:28 +0300 [thread overview] Message-ID: <20210602120328.6ad60a2e@eldfell> (raw) In-Reply-To: <20210601104135.29020-6-uma.shankar@intel.com> [-- Attachment #1.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 #1.2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 833 bytes --] [-- Attachment #2: Type: text/plain, Size: 160 bytes --] _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2021-06-02 9:03 UTC|newest] Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-01 10:41 [PATCH 0/9] Enhance pipe color support for multi segmented luts Uma Shankar 2021-06-01 10:41 ` [Intel-gfx] " Uma Shankar 2021-06-01 10:41 ` [PATCH 1/9] drm: Add gamma mode property Uma Shankar 2021-06-01 10:41 ` [Intel-gfx] " Uma Shankar 2021-06-02 9:09 ` Pekka Paalanen 2021-06-02 9:09 ` [Intel-gfx] " Pekka Paalanen 2021-06-02 20:18 ` Shankar, Uma 2021-06-02 20:18 ` [Intel-gfx] " Shankar, Uma 2021-06-03 8:05 ` Pekka Paalanen 2021-06-03 8:05 ` [Intel-gfx] " Pekka Paalanen 2021-06-01 10:41 ` [PATCH 2/9] drm/i915/xelpd: Define color lut range structure Uma Shankar 2021-06-01 10:41 ` [Intel-gfx] " Uma Shankar 2021-06-01 10:41 ` [PATCH 3/9] drm/i915/xelpd: Add support for Logarithmic gamma mode Uma Shankar 2021-06-01 10:41 ` [Intel-gfx] " Uma Shankar 2021-06-01 10:41 ` [PATCH 4/9] drm/i915/xelpd: Attach gamma mode property Uma Shankar 2021-06-01 10:41 ` [Intel-gfx] " Uma Shankar 2021-06-01 10:41 ` [PATCH 5/9] drm: Add Client Cap for advance gamma mode Uma Shankar 2021-06-01 10:41 ` [Intel-gfx] " Uma Shankar 2021-06-02 2:53 ` kernel test robot 2021-06-02 2:53 ` kernel test robot 2021-06-02 2:53 ` [Intel-gfx] " kernel test robot 2021-06-02 9:03 ` Pekka Paalanen [this message] 2021-06-02 9:03 ` Pekka Paalanen 2021-06-02 20:08 ` Shankar, Uma 2021-06-02 20:08 ` [Intel-gfx] " Shankar, Uma 2021-06-01 10:41 ` [PATCH 6/9] drm/i915/xelpd: logarithmic gamma enabled only with " Uma Shankar 2021-06-01 10:41 ` [Intel-gfx] " Uma Shankar 2021-06-01 10:41 ` [PATCH 7/9] drm/i915/xelpd: Enable Pipe Degamma Uma Shankar 2021-06-01 10:41 ` [Intel-gfx] " Uma Shankar 2021-06-01 10:41 ` [PATCH 8/9] drm/i915/xelpd: Add Pipe Color Lut caps to platform config Uma Shankar 2021-06-01 10:41 ` [Intel-gfx] " Uma Shankar 2021-06-01 10:41 ` [PATCH 9/9] drm/i915/xelpd: Enable XE_LPD Gamma Lut readout Uma Shankar 2021-06-01 10:41 ` [Intel-gfx] " Uma Shankar 2021-06-01 12:47 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for Enhance pipe color support for multi segmented luts Patchwork 2021-06-01 13:15 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork 2021-06-01 17:12 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork 2021-06-04 18:51 ` [PATCH 0/9] " Harry Wentland 2021-06-04 18:51 ` [Intel-gfx] " Harry Wentland 2021-06-07 7:29 ` Pekka Paalanen 2021-06-07 7:29 ` [Intel-gfx] " Pekka Paalanen 2021-06-07 18:07 ` Shankar, Uma 2021-06-07 18:07 ` [Intel-gfx] " Shankar, Uma 2021-06-08 7:59 ` Pekka Paalanen 2021-06-08 7:59 ` [Intel-gfx] " Pekka Paalanen 2021-06-07 18:01 ` Shankar, Uma 2021-06-07 18:01 ` [Intel-gfx] " Shankar, Uma 2021-06-07 21:00 ` Harry Wentland 2021-06-07 21:00 ` [Intel-gfx] " Harry Wentland 2021-06-01 10:58 [PATCH 5/9] drm: Add Client Cap for advance gamma mode kernel test robot
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210602120328.6ad60a2e@eldfell \ --to=ppaalanen@gmail.com \ --cc=bhanuprakash.modem@intel.com \ --cc=dri-devel@lists.freedesktop.org \ --cc=intel-gfx@lists.freedesktop.org \ --cc=uma.shankar@intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.