dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/dp: Set the MOT bit for Write_Status_Update_Request transactions
@ 2018-12-10 21:07 Dhinakaran Pandiyan
  2018-12-10 21:29 ` Ville Syrjälä
  0 siblings, 1 reply; 5+ messages in thread
From: Dhinakaran Pandiyan @ 2018-12-10 21:07 UTC (permalink / raw)
  To: intel-gfx; +Cc: Jani Nikula, Dhinakaran Pandiyan, dri-devel

The Write_Status_Update_Request I2C transaction requires the MOT bit to
be set, Change the logical AND to OR to fix what looks like a typo.

Cc: dri-devel@lists.freedesktop.org
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Fixes: 68ec2a2a2481 ("drm/dp: Use I2C_WRITE_STATUS_UPDATE to drain partial I2C_WRITE requests")
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
---
 drivers/gpu/drm/drm_dp_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
index 2d6c491a0542..d98805b517f0 100644
--- a/drivers/gpu/drm/drm_dp_helper.c
+++ b/drivers/gpu/drm/drm_dp_helper.c
@@ -677,7 +677,7 @@ static void drm_dp_i2c_msg_write_status_update(struct drm_dp_aux_msg *msg)
 	 * rest of the message
 	 */
 	if ((msg->request & ~DP_AUX_I2C_MOT) == DP_AUX_I2C_WRITE) {
-		msg->request &= DP_AUX_I2C_MOT;
+		msg->request |= DP_AUX_I2C_MOT;
 		msg->request |= DP_AUX_I2C_WRITE_STATUS_UPDATE;
 	}
 }
-- 
2.17.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/dp: Set the MOT bit for Write_Status_Update_Request transactions
  2018-12-10 21:07 [PATCH] drm/dp: Set the MOT bit for Write_Status_Update_Request transactions Dhinakaran Pandiyan
@ 2018-12-10 21:29 ` Ville Syrjälä
  2018-12-10 21:44   ` [Intel-gfx] " Ville Syrjälä
  2018-12-10 22:15   ` Dhinakaran Pandiyan
  0 siblings, 2 replies; 5+ messages in thread
From: Ville Syrjälä @ 2018-12-10 21:29 UTC (permalink / raw)
  To: Dhinakaran Pandiyan; +Cc: Jani Nikula, intel-gfx, dri-devel

On Mon, Dec 10, 2018 at 01:07:49PM -0800, Dhinakaran Pandiyan wrote:
> The Write_Status_Update_Request I2C transaction requires the MOT bit to
> be set, Change the logical AND to OR to fix what looks like a typo.

It's not a type. We're just preserving MOT. What makes you think it
should always be set?

> 
> Cc: dri-devel@lists.freedesktop.org
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Fixes: 68ec2a2a2481 ("drm/dp: Use I2C_WRITE_STATUS_UPDATE to drain partial I2C_WRITE requests")
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> ---
>  drivers/gpu/drm/drm_dp_helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
> index 2d6c491a0542..d98805b517f0 100644
> --- a/drivers/gpu/drm/drm_dp_helper.c
> +++ b/drivers/gpu/drm/drm_dp_helper.c
> @@ -677,7 +677,7 @@ static void drm_dp_i2c_msg_write_status_update(struct drm_dp_aux_msg *msg)
>  	 * rest of the message
>  	 */
>  	if ((msg->request & ~DP_AUX_I2C_MOT) == DP_AUX_I2C_WRITE) {
> -		msg->request &= DP_AUX_I2C_MOT;
> +		msg->request |= DP_AUX_I2C_MOT;
>  		msg->request |= DP_AUX_I2C_WRITE_STATUS_UPDATE;
>  	}
>  }
> -- 
> 2.17.1

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/dp: Set the MOT bit for Write_Status_Update_Request transactions
  2018-12-10 21:29 ` Ville Syrjälä
@ 2018-12-10 21:44   ` Ville Syrjälä
  2018-12-10 22:15   ` Dhinakaran Pandiyan
  1 sibling, 0 replies; 5+ messages in thread
From: Ville Syrjälä @ 2018-12-10 21:44 UTC (permalink / raw)
  To: Dhinakaran Pandiyan; +Cc: Jani Nikula, intel-gfx, dri-devel

On Mon, Dec 10, 2018 at 11:29:06PM +0200, Ville Syrjälä wrote:
> On Mon, Dec 10, 2018 at 01:07:49PM -0800, Dhinakaran Pandiyan wrote:
> > The Write_Status_Update_Request I2C transaction requires the MOT bit to
> > be set, Change the logical AND to OR to fix what looks like a typo.
> 
> It's not a type.
                ^
But this is :P

> We're just preserving MOT. What makes you think it
> should always be set?
> 
> > 
> > Cc: dri-devel@lists.freedesktop.org
> > Cc: Jani Nikula <jani.nikula@intel.com>
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Fixes: 68ec2a2a2481 ("drm/dp: Use I2C_WRITE_STATUS_UPDATE to drain partial I2C_WRITE requests")
> > Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > ---
> >  drivers/gpu/drm/drm_dp_helper.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
> > index 2d6c491a0542..d98805b517f0 100644
> > --- a/drivers/gpu/drm/drm_dp_helper.c
> > +++ b/drivers/gpu/drm/drm_dp_helper.c
> > @@ -677,7 +677,7 @@ static void drm_dp_i2c_msg_write_status_update(struct drm_dp_aux_msg *msg)
> >  	 * rest of the message
> >  	 */
> >  	if ((msg->request & ~DP_AUX_I2C_MOT) == DP_AUX_I2C_WRITE) {
> > -		msg->request &= DP_AUX_I2C_MOT;
> > +		msg->request |= DP_AUX_I2C_MOT;
> >  		msg->request |= DP_AUX_I2C_WRITE_STATUS_UPDATE;
> >  	}
> >  }
> > -- 
> > 2.17.1
> 
> -- 
> Ville Syrjälä
> Intel
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/dp: Set the MOT bit for Write_Status_Update_Request transactions
  2018-12-10 21:29 ` Ville Syrjälä
  2018-12-10 21:44   ` [Intel-gfx] " Ville Syrjälä
@ 2018-12-10 22:15   ` Dhinakaran Pandiyan
  2018-12-11 13:22     ` Ville Syrjälä
  1 sibling, 1 reply; 5+ messages in thread
From: Dhinakaran Pandiyan @ 2018-12-10 22:15 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: Jani Nikula, intel-gfx, dri-devel

On Mon, 2018-12-10 at 23:29 +0200, Ville Syrjälä wrote:
> On Mon, Dec 10, 2018 at 01:07:49PM -0800, Dhinakaran Pandiyan wrote:
> > The Write_Status_Update_Request I2C transaction requires the MOT
> > bit to
> > be set, Change the logical AND to OR to fix what looks like a typo.
> 
> It's not a type. We're just preserving MOT. What makes you think it
> should always be set?
> 
The table defining request commands (2-148) has the MOT bit set for
Write_Status_Update_Request, doesn't make it look like an option when
querying the status. Checking the callers again, I see that we could
get a defer when ending an i2c transaction and that will require a
Write_Status_Update_Request with MOT unset. Sorry for the noise.




> > 
> > Cc: dri-devel@lists.freedesktop.org
> > Cc: Jani Nikula <jani.nikula@intel.com>
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Fixes: 68ec2a2a2481 ("drm/dp: Use I2C_WRITE_STATUS_UPDATE to drain
> > partial I2C_WRITE requests")
> > Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > ---
> >  drivers/gpu/drm/drm_dp_helper.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_dp_helper.c
> > b/drivers/gpu/drm/drm_dp_helper.c
> > index 2d6c491a0542..d98805b517f0 100644
> > --- a/drivers/gpu/drm/drm_dp_helper.c
> > +++ b/drivers/gpu/drm/drm_dp_helper.c
> > @@ -677,7 +677,7 @@ static void
> > drm_dp_i2c_msg_write_status_update(struct drm_dp_aux_msg *msg)
> >  	 * rest of the message
> >  	 */
> >  	if ((msg->request & ~DP_AUX_I2C_MOT) == DP_AUX_I2C_WRITE) {
> > -		msg->request &= DP_AUX_I2C_MOT;
> > +		msg->request |= DP_AUX_I2C_MOT;
> >  		msg->request |= DP_AUX_I2C_WRITE_STATUS_UPDATE;
> >  	}
> >  }
> > -- 
> > 2.17.1
> 
> 

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/dp: Set the MOT bit for Write_Status_Update_Request transactions
  2018-12-10 22:15   ` Dhinakaran Pandiyan
@ 2018-12-11 13:22     ` Ville Syrjälä
  0 siblings, 0 replies; 5+ messages in thread
From: Ville Syrjälä @ 2018-12-11 13:22 UTC (permalink / raw)
  To: Dhinakaran Pandiyan; +Cc: Jani Nikula, intel-gfx, dri-devel

On Mon, Dec 10, 2018 at 02:15:11PM -0800, Dhinakaran Pandiyan wrote:
> On Mon, 2018-12-10 at 23:29 +0200, Ville Syrjälä wrote:
> > On Mon, Dec 10, 2018 at 01:07:49PM -0800, Dhinakaran Pandiyan wrote:
> > > The Write_Status_Update_Request I2C transaction requires the MOT
> > > bit to
> > > be set, Change the logical AND to OR to fix what looks like a typo.
> > 
> > It's not a type. We're just preserving MOT. What makes you think it
> > should always be set?
> > 
> The table defining request commands (2-148) has the MOT bit set for
> Write_Status_Update_Request, doesn't make it look like an option when
> querying the status. Checking the callers again, I see that we could
> get a defer when ending an i2c transaction and that will require a
> Write_Status_Update_Request with MOT unset. Sorry for the noise.

Or a short reply. Admittedly the spec is a bit vague on this topic,
but after trawling it thorougly again I spotted that table 2-151 #9
does have an example of write_status_update with mot==0. So I guess
my original interpretation was in fact correct. Phew :)

> 
> 
> 
> 
> > > 
> > > Cc: dri-devel@lists.freedesktop.org
> > > Cc: Jani Nikula <jani.nikula@intel.com>
> > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > Fixes: 68ec2a2a2481 ("drm/dp: Use I2C_WRITE_STATUS_UPDATE to drain
> > > partial I2C_WRITE requests")
> > > Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > > ---
> > >  drivers/gpu/drm/drm_dp_helper.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/gpu/drm/drm_dp_helper.c
> > > b/drivers/gpu/drm/drm_dp_helper.c
> > > index 2d6c491a0542..d98805b517f0 100644
> > > --- a/drivers/gpu/drm/drm_dp_helper.c
> > > +++ b/drivers/gpu/drm/drm_dp_helper.c
> > > @@ -677,7 +677,7 @@ static void
> > > drm_dp_i2c_msg_write_status_update(struct drm_dp_aux_msg *msg)
> > >  	 * rest of the message
> > >  	 */
> > >  	if ((msg->request & ~DP_AUX_I2C_MOT) == DP_AUX_I2C_WRITE) {
> > > -		msg->request &= DP_AUX_I2C_MOT;
> > > +		msg->request |= DP_AUX_I2C_MOT;
> > >  		msg->request |= DP_AUX_I2C_WRITE_STATUS_UPDATE;
> > >  	}
> > >  }
> > > -- 
> > > 2.17.1
> > 
> > 

-- 
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-12-11 13:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-10 21:07 [PATCH] drm/dp: Set the MOT bit for Write_Status_Update_Request transactions Dhinakaran Pandiyan
2018-12-10 21:29 ` Ville Syrjälä
2018-12-10 21:44   ` [Intel-gfx] " Ville Syrjälä
2018-12-10 22:15   ` Dhinakaran Pandiyan
2018-12-11 13:22     ` Ville Syrjälä

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox