[Intel-gfx] [PATCH 12/18] drm/i915: Store mask of enabled infoframes in the crtc state

Daniel Vetter daniel at ffwll.ch
Mon Sep 24 15:51:46 UTC 2018


On Thu, Sep 20, 2018 at 09:51:39PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> Store the mask of enabled infoframes in the crtc state. We'll start
> with just the readout for HDMI encoder, and we'll expand this
> to compute the bitmask in .compute_config() later. SDVO will also
> follow later.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>

> ---
>  drivers/gpu/drm/i915/intel_ddi.c  | 5 ++++-
>  drivers/gpu/drm/i915/intel_drv.h  | 4 ++++
>  drivers/gpu/drm/i915/intel_hdmi.c | 5 ++++-
>  3 files changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index 098a0e4edf2a..19fef88e680e 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -3390,7 +3390,10 @@ void intel_ddi_get_config(struct intel_encoder *encoder,
>  		pipe_config->has_hdmi_sink = true;
>  		intel_dig_port = enc_to_dig_port(&encoder->base);
>  
> -		if (intel_hdmi_infoframes_enabled(encoder, pipe_config))
> +		pipe_config->infoframes.enable |=
> +			intel_hdmi_infoframes_enabled(encoder, pipe_config);
> +
> +		if (pipe_config->infoframes.enable)
>  			pipe_config->has_infoframe = true;
>  
>  		if ((temp & TRANS_DDI_HDMI_SCRAMBLING_MASK) ==
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index 6815c69aac2f..50c0c049ee15 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -893,6 +893,10 @@ struct intel_crtc_state {
>  	u8 active_planes;
>  	u8 nv12_planes;
>  
> +	struct {
> +		u32 enable;
> +	} infoframes;
> +
>  	/* HDMI scrambling status */
>  	bool hdmi_scrambling;
>  
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index a8fcddb199ae..98a44084324c 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -1264,7 +1264,10 @@ static void intel_hdmi_get_config(struct intel_encoder *encoder,
>  	if (tmp & HDMI_MODE_SELECT_HDMI)
>  		pipe_config->has_hdmi_sink = true;
>  
> -	if (intel_hdmi_infoframes_enabled(encoder, pipe_config))
> +	pipe_config->infoframes.enable |=
> +		intel_hdmi_infoframes_enabled(encoder, pipe_config);
> +
> +	if (pipe_config->infoframes.enable)
>  		pipe_config->has_infoframe = true;
>  
>  	if (tmp & SDVO_AUDIO_ENABLE)
> -- 
> 2.16.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list