All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harry Wentland <harry.wentland@amd.com>
To: Uma Shankar <uma.shankar@intel.com>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: bhanuprakash.modem@intel.com
Subject: Re: [PATCH 0/9] Enhance pipe color support for multi segmented luts
Date: Fri, 4 Jun 2021 14:51:25 -0400	[thread overview]
Message-ID: <0909131c-1340-c93b-7b80-b661497ccf73@amd.com> (raw)
In-Reply-To: <20210601104135.29020-1-uma.shankar@intel.com>

On 2021-06-01 6:41 a.m., Uma Shankar wrote:
> Modern hardwares have multi segmented lut approach to prioritize
> the darker regions of the spectrum. This series introduces a new
> UAPI to define the lut ranges supported by the respective hardware.
> 
> This also enables Pipe Color Management Support for Intel's XE_LPD hw.
> Enable Support for Pipe Degamma with the increased lut samples
> supported by hardware. This also adds support for newly introduced
> Logarithmic Gamma for XE_LPD. Also added the gamma readout support.
> 
> The Logarithmic gamma implementation on XE_LPD is non linear and adds 25
> segments with non linear lut samples in each segment. The expectation
> is userspace will create the luts as per this distribution and pass
> the final samples to driver to be programmed in hardware.
> 

Is this design targetting Intel XE_LPD HW in particular or is it intended
to be generic?

If this is intended to be generic I think it would benefit from a lot more
documentation. At this point it's difficult for me to see how to adapt this
to AMD HW. It would take me a while to be comfortable to make a call on whether
we can use it or not. And what about other vendors?

I think we need to be cautious in directly exposing HW functionality through
UAPI. The CM parts of AMD HW seem to be changing in some way each generation
and it looks like the same is true for Intel. The trouble we have with adapting
the old gamma/degamma properties to modern HW is some indication to me that
this approach is somewhat problematic.

It would be useful to understand and document the specific use-cases we want to
provide to userspace implementers with this functionality. Do we want to support
modern transfer functions such as PQ or HLG? If so, it might be beneficial to
have an API to explicitly specify that, and then use LUT tables in drivers that
are optimized for the implementing HW. Or is the use case tone mapping? If so,
would a parametric definition of tone mapping be easier to manage?

> +-----+------------------------------+
> | x   |  2 pow x segment|No of Entries
> |     |  0              | 1          |
> | 0   |  1              | 1          |
> | 1   |  2              | 2          |
> | 2   |  4              | 2          |
> | 3   |  8              | 2          |
> | 4   |  16             | 2          |
> | 5   |  32             | 4          |
> | 6   |  64             | 4          |
> | 7   |  128            | 4          |
> | 8   |  256            | 8          |
> | 9   |  512            | 8          |
> | 10  |  1024           | 8          |
> | 11  |  2048           | 16         |
> | 12  |  4096           | 16         |
> | 13  |  8192           | 16         |
> | 14  |  16384          | 32         |
> | 15  |  32768          | 32         |
> | 16  |  65536          | 64         |
> | 17  |  131072         | 64         |
> | 18  |  262144         | 64         |
> | 19  |  524288         | 32         |
> | 20  |  1048576        | 32         |
> | 21  |  2097152        | 32         |
> | 22  |  4194304        | 32         |
> | 23  |  8388608        | 32         |
> | 24  |  16777216       | 1          |
> |     | Total Entries   | 511        |
>  -----+-----------------+------------+
> 
> Credits: Special mention and credits to Ville Syrjala for coming up
> with a design for this feature and inputs. This series is based on
> his original design.
> 
> Note: Userspace support for this new UAPI will be done on Chrome and
> plan is to get this supported on mutter as well. We will notify the
> list once we have that ready for review.
> 

Is this an RFC? If so it would be good to mark it as such.

Harry

> Uma Shankar (9):
>   drm: Add gamma mode property
>   drm/i915/xelpd: Define color lut range structure
>   drm/i915/xelpd: Add support for Logarithmic gamma mode
>   drm/i915/xelpd: Attach gamma mode property
>   drm: Add Client Cap for advance gamma mode
>   drm/i915/xelpd: logarithmic gamma enabled only with advance gamma mode
>   drm/i915/xelpd: Enable Pipe Degamma
>   drm/i915/xelpd: Add Pipe Color Lut caps to platform config
>   drm/i915/xelpd: Enable XE_LPD Gamma Lut readout
> 
>  drivers/gpu/drm/drm_atomic_uapi.c          |   8 +
>  drivers/gpu/drm/drm_color_mgmt.c           |  75 ++++
>  drivers/gpu/drm/drm_ioctl.c                |   5 +
>  drivers/gpu/drm/i915/display/intel_color.c | 454 ++++++++++++++++++++-
>  drivers/gpu/drm/i915/i915_pci.c            |   3 +-
>  drivers/gpu/drm/i915/i915_reg.h            |   7 +
>  include/drm/drm_atomic.h                   |   1 +
>  include/drm/drm_color_mgmt.h               |   8 +
>  include/drm/drm_crtc.h                     |  25 ++
>  include/drm/drm_file.h                     |   8 +
>  include/uapi/drm/drm.h                     |   8 +
>  include/uapi/drm/drm_mode.h                |  43 ++
>  12 files changed, 630 insertions(+), 15 deletions(-)
> 


WARNING: multiple messages have this Message-ID (diff)
From: Harry Wentland <harry.wentland@amd.com>
To: Uma Shankar <uma.shankar@intel.com>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: "Cyr, Aric" <Aric.Cyr@amd.com>
Subject: Re: [Intel-gfx] [PATCH 0/9] Enhance pipe color support for multi segmented luts
Date: Fri, 4 Jun 2021 14:51:25 -0400	[thread overview]
Message-ID: <0909131c-1340-c93b-7b80-b661497ccf73@amd.com> (raw)
In-Reply-To: <20210601104135.29020-1-uma.shankar@intel.com>

On 2021-06-01 6:41 a.m., Uma Shankar wrote:
> Modern hardwares have multi segmented lut approach to prioritize
> the darker regions of the spectrum. This series introduces a new
> UAPI to define the lut ranges supported by the respective hardware.
> 
> This also enables Pipe Color Management Support for Intel's XE_LPD hw.
> Enable Support for Pipe Degamma with the increased lut samples
> supported by hardware. This also adds support for newly introduced
> Logarithmic Gamma for XE_LPD. Also added the gamma readout support.
> 
> The Logarithmic gamma implementation on XE_LPD is non linear and adds 25
> segments with non linear lut samples in each segment. The expectation
> is userspace will create the luts as per this distribution and pass
> the final samples to driver to be programmed in hardware.
> 

Is this design targetting Intel XE_LPD HW in particular or is it intended
to be generic?

If this is intended to be generic I think it would benefit from a lot more
documentation. At this point it's difficult for me to see how to adapt this
to AMD HW. It would take me a while to be comfortable to make a call on whether
we can use it or not. And what about other vendors?

I think we need to be cautious in directly exposing HW functionality through
UAPI. The CM parts of AMD HW seem to be changing in some way each generation
and it looks like the same is true for Intel. The trouble we have with adapting
the old gamma/degamma properties to modern HW is some indication to me that
this approach is somewhat problematic.

It would be useful to understand and document the specific use-cases we want to
provide to userspace implementers with this functionality. Do we want to support
modern transfer functions such as PQ or HLG? If so, it might be beneficial to
have an API to explicitly specify that, and then use LUT tables in drivers that
are optimized for the implementing HW. Or is the use case tone mapping? If so,
would a parametric definition of tone mapping be easier to manage?

> +-----+------------------------------+
> | x   |  2 pow x segment|No of Entries
> |     |  0              | 1          |
> | 0   |  1              | 1          |
> | 1   |  2              | 2          |
> | 2   |  4              | 2          |
> | 3   |  8              | 2          |
> | 4   |  16             | 2          |
> | 5   |  32             | 4          |
> | 6   |  64             | 4          |
> | 7   |  128            | 4          |
> | 8   |  256            | 8          |
> | 9   |  512            | 8          |
> | 10  |  1024           | 8          |
> | 11  |  2048           | 16         |
> | 12  |  4096           | 16         |
> | 13  |  8192           | 16         |
> | 14  |  16384          | 32         |
> | 15  |  32768          | 32         |
> | 16  |  65536          | 64         |
> | 17  |  131072         | 64         |
> | 18  |  262144         | 64         |
> | 19  |  524288         | 32         |
> | 20  |  1048576        | 32         |
> | 21  |  2097152        | 32         |
> | 22  |  4194304        | 32         |
> | 23  |  8388608        | 32         |
> | 24  |  16777216       | 1          |
> |     | Total Entries   | 511        |
>  -----+-----------------+------------+
> 
> Credits: Special mention and credits to Ville Syrjala for coming up
> with a design for this feature and inputs. This series is based on
> his original design.
> 
> Note: Userspace support for this new UAPI will be done on Chrome and
> plan is to get this supported on mutter as well. We will notify the
> list once we have that ready for review.
> 

Is this an RFC? If so it would be good to mark it as such.

Harry

> Uma Shankar (9):
>   drm: Add gamma mode property
>   drm/i915/xelpd: Define color lut range structure
>   drm/i915/xelpd: Add support for Logarithmic gamma mode
>   drm/i915/xelpd: Attach gamma mode property
>   drm: Add Client Cap for advance gamma mode
>   drm/i915/xelpd: logarithmic gamma enabled only with advance gamma mode
>   drm/i915/xelpd: Enable Pipe Degamma
>   drm/i915/xelpd: Add Pipe Color Lut caps to platform config
>   drm/i915/xelpd: Enable XE_LPD Gamma Lut readout
> 
>  drivers/gpu/drm/drm_atomic_uapi.c          |   8 +
>  drivers/gpu/drm/drm_color_mgmt.c           |  75 ++++
>  drivers/gpu/drm/drm_ioctl.c                |   5 +
>  drivers/gpu/drm/i915/display/intel_color.c | 454 ++++++++++++++++++++-
>  drivers/gpu/drm/i915/i915_pci.c            |   3 +-
>  drivers/gpu/drm/i915/i915_reg.h            |   7 +
>  include/drm/drm_atomic.h                   |   1 +
>  include/drm/drm_color_mgmt.h               |   8 +
>  include/drm/drm_crtc.h                     |  25 ++
>  include/drm/drm_file.h                     |   8 +
>  include/uapi/drm/drm.h                     |   8 +
>  include/uapi/drm/drm_mode.h                |  43 ++
>  12 files changed, 630 insertions(+), 15 deletions(-)
> 

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2021-06-04 18:51 UTC|newest]

Thread overview: 48+ 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
2021-06-02  9:03     ` [Intel-gfx] " 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 ` Harry Wentland [this message]
2021-06-04 18:51   ` [Intel-gfx] [PATCH 0/9] " 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

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=0909131c-1340-c93b-7b80-b661497ccf73@amd.com \
    --to=harry.wentland@amd.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: link
Be 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.