Re: [PATCH 4/4] drm/i915/lspcon: Remove unused force change mode parameter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2016-11-22 at 21:09 +0530, Sharma, Shashank wrote:
> The reason why I kept the force function was, that during debug phase, I 
> saw a need to change LSPCON mode.
> 
> Also, in future, if we need to provide an IOCTL/control to userspace, to 
> change lspcon mode, force may be required to differentiate the path from
> user/kernel space.

Not sure how that would work, but it's easy to add the parameter when
it's actually implemented. Until then it only makes reading the code
more difficult.

> 
> But in any case: Reviewed-by: Shashank Sharma 
> 
> 
> Regards
> 
> Shashank
> 
> On 11/22/2016 12:45 AM, Imre Deak wrote:
> > All callers asked for a forced change but the function ignored this
> > parameter. It doesn't seem to be necessary to force the change in any
> > case so let's just remove the parameter.
> > 
> > Cc: Shashank Sharma <shashank.sharma@xxxxxxxxx>
> > Signed-off-by: Imre Deak <imre.deak@xxxxxxxxx>
> > ---
> >   drivers/gpu/drm/i915/intel_lspcon.c | 7 +++----
> >   1 file changed, 3 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_lspcon.c b/drivers/gpu/drm/i915/intel_lspcon.c
> > index 281127d..f6d4e69 100644
> > --- a/drivers/gpu/drm/i915/intel_lspcon.c
> > +++ b/drivers/gpu/drm/i915/intel_lspcon.c
> > @@ -87,7 +87,7 @@ static enum drm_lspcon_mode lspcon_wait_mode(struct intel_lspcon *lspcon,
> >   }
> >   
> >   static int lspcon_change_mode(struct intel_lspcon *lspcon,
> > -	enum drm_lspcon_mode mode, bool force)
> > +			      enum drm_lspcon_mode mode)
> >   {
> >   	int err;
> >   	enum drm_lspcon_mode current_mode;
> > @@ -202,7 +202,7 @@ void lspcon_resume(struct intel_lspcon *lspcon)
> >   	if (lspcon_wait_mode(lspcon, expected_mode) == DRM_LSPCON_MODE_PCON)
> >   		return;
> >   
> > -	if (lspcon_change_mode(lspcon, DRM_LSPCON_MODE_PCON, true))
> > +	if (lspcon_change_mode(lspcon, DRM_LSPCON_MODE_PCON))
> >   		DRM_ERROR("LSPCON resume failed\n");
> >   	else
> >   		DRM_DEBUG_KMS("LSPCON resume success\n");
> > @@ -239,8 +239,7 @@ bool lspcon_init(struct intel_digital_port *intel_dig_port)
> >   	* 2.0 sinks.
> >   	*/
> >   	if (lspcon->active && lspcon->mode != DRM_LSPCON_MODE_PCON) {
> > -		if (lspcon_change_mode(lspcon, DRM_LSPCON_MODE_PCON,
> > -			true) < 0) {
> > +		if (lspcon_change_mode(lspcon, DRM_LSPCON_MODE_PCON) < 0) {
> >   			DRM_ERROR("LSPCON mode change to PCON failed\n");
> >   			return false;
> >   		}
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux