Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Uma Shankar <uma.shankar@intel.com>,
	dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Cc: ajax@redhat.com, ville.syrjala@intel.com, maarten.lankhorst@intel.com
Subject: Re: [v2 2/2] drm/i915: Attach colorspace property and enable modeset
Date: Fri, 2 Nov 2018 10:23:29 +0100	[thread overview]
Message-ID: <091b9113-a5c9-2466-6527-be08e00333f6@linux.intel.com> (raw)
In-Reply-To: <1540987546-3142-3-git-send-email-uma.shankar@intel.com>

Op 31-10-18 om 13:05 schreef Uma Shankar:
> This patch attaches the colorspace connector property to the
> hdmi connector. Based on colorspace change, modeset will be
> triggered to switch to new colorspace.
>
> Based on colorspace property value create an infoframe
> with appropriate colorspace. This can be used to send an
> infoframe packet with proper colorspace value set which
> will help to enable wider color gamut like BT2020 on sink.
>
> v2: Merged the changes of creating infoframe as well to this
> patch as per Maarten's suggestion.
>
> Signed-off-by: Uma Shankar <uma.shankar@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_atomic.c | 1 +
>  drivers/gpu/drm/i915/intel_hdmi.c   | 5 +++++
>  2 files changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c
> index a5a2c8f..35ef70a 100644
> --- a/drivers/gpu/drm/i915/intel_atomic.c
> +++ b/drivers/gpu/drm/i915/intel_atomic.c
> @@ -125,6 +125,7 @@ int intel_digital_connector_atomic_check(struct drm_connector *conn,
>  	 */
>  	if (new_conn_state->force_audio != old_conn_state->force_audio ||
>  	    new_conn_state->broadcast_rgb != old_conn_state->broadcast_rgb ||
> +	    new_state->colorspace != old_state->colorspace ||
>  	    new_conn_state->base.picture_aspect_ratio != old_conn_state->base.picture_aspect_ratio ||
>  	    new_conn_state->base.content_type != old_conn_state->base.content_type ||
>  	    new_conn_state->base.scaling_mode != old_conn_state->base.scaling_mode)
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index 129b880..8a41fb3 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -486,6 +486,8 @@ static void intel_hdmi_set_avi_infoframe(struct intel_encoder *encoder,
>  	else
>  		frame.avi.colorspace = HDMI_COLORSPACE_RGB;
>  
> +	frame.avi.extended_colorimetry = conn_state->colorspace;
> +
>  	drm_hdmi_avi_infoframe_quant_range(&frame.avi, adjusted_mode,
>  					   crtc_state->limited_color_range ?
>  					   HDMI_QUANTIZATION_RANGE_LIMITED :
> @@ -2125,6 +2127,9 @@ static void intel_hdmi_destroy(struct drm_connector *connector)
>  	intel_attach_broadcast_rgb_property(connector);
>  	intel_attach_aspect_ratio_property(connector);
>  	drm_connector_attach_content_type_property(connector);
> +	drm_object_attach_property(&connector->base,
> +			connector->dev->mode_config.colorspace_property,
> +			COLORIMETRY_ITU_709);
Just put 0 here..
If you want to init the default colorspace, put it in the first patch.

We should perhaps hide color spaces that are not supported on HDMI?
>  	connector->state->picture_aspect_ratio = HDMI_PICTURE_ASPECT_NONE;
>  }
>  


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

  reply	other threads:[~2018-11-02  9:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-31 12:05 [v2 0/2] Add Colorspace connector property interface Uma Shankar
2018-10-31 12:05 ` [v2 1/2] drm: Add colorspace property Uma Shankar
2018-11-02  9:19   ` [Intel-gfx] " Maarten Lankhorst
2018-11-02 11:29     ` Ville Syrjälä
2018-11-02 14:13       ` Shankar, Uma
2018-11-02 14:29         ` Jonas Karlman
2018-11-05  9:35           ` [Intel-gfx] " Hans Verkuil
2018-11-03  5:56   ` Sharma, Shashank
2018-10-31 12:05 ` [v2 2/2] drm/i915: Attach colorspace property and enable modeset Uma Shankar
2018-11-02  9:23   ` Maarten Lankhorst [this message]
2018-11-02 14:18     ` Shankar, Uma
2018-11-02 15:41       ` [Intel-gfx] " Ville Syrjälä
2018-11-02 15:44         ` Maarten Lankhorst
2018-11-02 15:49           ` Ville Syrjälä
2018-11-03  6:21   ` Sharma, Shashank
2018-10-31 12:45 ` ✗ Fi.CI.CHECKPATCH: warning for Add Colorspace connector property interface (rev2) Patchwork
2018-10-31 12:48 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-10-31 12:59 ` ✗ Fi.CI.BAT: failure " Patchwork
2018-11-03  5:38 ` [v2 0/2] Add Colorspace connector property interface Sharma, Shashank

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=091b9113-a5c9-2466-6527-be08e00333f6@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=ajax@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=maarten.lankhorst@intel.com \
    --cc=uma.shankar@intel.com \
    --cc=ville.syrjala@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox