[Intel-gfx] [RFC PATCH 02/12] drm/i915/dsi: set max return packet size for each dsi port

Shobhit Kumar shobhit.kumar at linux.intel.com
Thu Jan 22 02:53:12 PST 2015


On 01/16/2015 05:57 PM, Jani Nikula wrote:
> This seems like the right thing to do. This also gets rid of a call to
> intel_dsi_pipe_to_port() which we want to remove eventually.
>
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
> ---
>   drivers/gpu/drm/i915/intel_dsi.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
> index 36b19c7e87b9..49e186bc080f 100644
> --- a/drivers/gpu/drm/i915/intel_dsi.c
> +++ b/drivers/gpu/drm/i915/intel_dsi.c
> @@ -197,14 +197,14 @@ static void intel_dsi_enable(struct intel_encoder *encoder)
>   {
>   	struct drm_device *dev = encoder->base.dev;
>   	struct drm_i915_private *dev_priv = dev->dev_private;
> -	struct intel_crtc *intel_crtc = to_intel_crtc(encoder->base.crtc);
>   	struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base);
> -	enum port port = intel_dsi_pipe_to_port(intel_crtc->pipe);
> +	enum port port;
>
>   	DRM_DEBUG_KMS("\n");
>
>   	if (is_cmd_mode(intel_dsi))
> -		I915_WRITE(MIPI_MAX_RETURN_PKT_SIZE(port), 8 * 4);
> +		for_each_dsi_port(port, intel_dsi->ports)
> +			I915_WRITE(MIPI_MAX_RETURN_PKT_SIZE(port), 8 * 4);

Using for_each_dsi_port() macro in this way will make the following else 
below as "else" part for that "if" inside the macro, breaking the whole 
logic. We should enclose the true part of is_cmd_mode check in braces

>   	else {
>   		msleep(20); /* XXX */
>   		for_each_dsi_port(port, intel_dsi->ports)
>

Regards
Shobhit


More information about the Intel-gfx mailing list