diff mbox series

drm/i915/dsi: disable lpdt if it is not enabled

Message ID 20211109034125.11291-1-william.tseng@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/dsi: disable lpdt if it is not enabled | expand

Commit Message

William Tseng Nov. 9, 2021, 3:41 a.m. UTC
Avoid setting LP_DATA_TRANSFER when enable_lpdt is false

Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
Cc: Lee Shawn C <shawn.c.lee@intel.com>
Cc: Cooper Chiou <cooper.chiou@intel.com>
Signed-off-by: William Tseng <william.tseng@intel.com>
---
 drivers/gpu/drm/i915/display/icl_dsi.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Jani Nikula Nov. 9, 2021, 8:04 a.m. UTC | #1
On Tue, 09 Nov 2021, William Tseng <william.tseng@intel.com> wrote:
> Avoid setting LP_DATA_TRANSFER when enable_lpdt is false
>
> Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
> Cc: Lee Shawn C <shawn.c.lee@intel.com>
> Cc: Cooper Chiou <cooper.chiou@intel.com>
> Signed-off-by: William Tseng <william.tseng@intel.com>
> ---
>  drivers/gpu/drm/i915/display/icl_dsi.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/icl_dsi.c b/drivers/gpu/drm/i915/display/icl_dsi.c
> index 168c84a74d30..31cea17481b1 100644
> --- a/drivers/gpu/drm/i915/display/icl_dsi.c
> +++ b/drivers/gpu/drm/i915/display/icl_dsi.c
> @@ -183,6 +183,8 @@ static int dsi_send_pkt_hdr(struct intel_dsi_host *host,
>  
>  	if (enable_lpdt)
>  		tmp |= LP_DATA_TRANSFER;
> +	else
> +		tmp &= ~LP_DATA_TRANSFER;
>  
>  	tmp &= ~(PARAM_WC_MASK | VC_MASK | DT_MASK);
>  	tmp |= ((packet->header[0] & VC_MASK) << VC_SHIFT);

The read-modify-write we do here is perhaps not the brightnest idea, but
the patch at hand probably is the most sensible first fix.

Thanks, pushed to drm-intel-next.

BR,
Jani.
William Tseng Nov. 9, 2021, 8:32 a.m. UTC | #2
Thank you for your consideration. It's my pleasure.

Regards
William

-----Original Message-----
From: Jani Nikula <jani.nikula@linux.intel.com> 
Sent: Tuesday, November 9, 2021 4:05 PM
To: Tseng, William <william.tseng@intel.com>; intel-gfx@lists.freedesktop.org
Cc: Tseng, William <william.tseng@intel.com>; Ville Syrjala <ville.syrjala@linux.intel.com>; Kulkarni, Vandita <vandita.kulkarni@intel.com>; Lee, Shawn C <shawn.c.lee@intel.com>; Chiou, Cooper <cooper.chiou@intel.com>
Subject: Re: [PATCH] drm/i915/dsi: disable lpdt if it is not enabled

On Tue, 09 Nov 2021, William Tseng <william.tseng@intel.com> wrote:
> Avoid setting LP_DATA_TRANSFER when enable_lpdt is false
>
> Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
> Cc: Lee Shawn C <shawn.c.lee@intel.com>
> Cc: Cooper Chiou <cooper.chiou@intel.com>
> Signed-off-by: William Tseng <william.tseng@intel.com>
> ---
>  drivers/gpu/drm/i915/display/icl_dsi.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/icl_dsi.c 
> b/drivers/gpu/drm/i915/display/icl_dsi.c
> index 168c84a74d30..31cea17481b1 100644
> --- a/drivers/gpu/drm/i915/display/icl_dsi.c
> +++ b/drivers/gpu/drm/i915/display/icl_dsi.c
> @@ -183,6 +183,8 @@ static int dsi_send_pkt_hdr(struct intel_dsi_host 
> *host,
>  
>  	if (enable_lpdt)
>  		tmp |= LP_DATA_TRANSFER;
> +	else
> +		tmp &= ~LP_DATA_TRANSFER;
>  
>  	tmp &= ~(PARAM_WC_MASK | VC_MASK | DT_MASK);
>  	tmp |= ((packet->header[0] & VC_MASK) << VC_SHIFT);

The read-modify-write we do here is perhaps not the brightnest idea, but the patch at hand probably is the most sensible first fix.

Thanks, pushed to drm-intel-next.

BR,
Jani.



--
Jani Nikula, Intel Open Source Graphics Center
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/icl_dsi.c b/drivers/gpu/drm/i915/display/icl_dsi.c
index 168c84a74d30..31cea17481b1 100644
--- a/drivers/gpu/drm/i915/display/icl_dsi.c
+++ b/drivers/gpu/drm/i915/display/icl_dsi.c
@@ -183,6 +183,8 @@  static int dsi_send_pkt_hdr(struct intel_dsi_host *host,
 
 	if (enable_lpdt)
 		tmp |= LP_DATA_TRANSFER;
+	else
+		tmp &= ~LP_DATA_TRANSFER;
 
 	tmp &= ~(PARAM_WC_MASK | VC_MASK | DT_MASK);
 	tmp |= ((packet->header[0] & VC_MASK) << VC_SHIFT);