Re: [PATCH 21/89] drm/i915/skl: Implement the get_aux_clock_divider() DP vfunc

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

 



On Tue, Sep 16, 2014 at 06:12:04PM -0700, Rodrigo Vivi wrote:
>    I believe this patch should remove the gen9 part of
>    ilk_get_aux_clock_divider.

The previous patch changing ilk_get_aux_clock_divider() got removed
entirely.

>    Also there it just returns 0, but here it returns 0 or 1 depending on the
>    index.
>    This also is incoherent with the commit description.

Yes, when the index is 0, we need to return a non 0 value (chose 1) to
have the code using this vfunc loop once. Then, when the index is
incremented, we return 0 to stop the loop.

-- 
Damien

>    On Thu, Sep 4, 2014 at 4:26 AM, Damien Lespiau <damien.lespiau@xxxxxxxxx>
>    wrote:
> 
>      We need to provide a vfunc that will make the code in intel_dp_aux_ch()
>      loop once to start the AUX transaction. The return value (clock divider)
>      is unused on SKL, so just return 1.
> 
>      Signed-off-by: Damien Lespiau <damien.lespiau@xxxxxxxxx>
>      ---
>       drivers/gpu/drm/i915/intel_dp.c | 14 +++++++++++++-
>       1 file changed, 13 insertions(+), 1 deletion(-)
> 
>      diff --git a/drivers/gpu/drm/i915/intel_dp.c
>      b/drivers/gpu/drm/i915/intel_dp.c
>      index a95fb47..4560ced 100644
>      --- a/drivers/gpu/drm/i915/intel_dp.c
>      +++ b/drivers/gpu/drm/i915/intel_dp.c
>      @@ -489,6 +489,16 @@ static uint32_t vlv_get_aux_clock_divider(struct
>      intel_dp *intel_dp, int index)
>              return index ? 0 : 100;
>       }
> 
>      +static uint32_t skl_get_aux_clock_divider(struct intel_dp *intel_dp,
>      int index)
>      +{
>      +       /*
>      +        * SKL doesn't need us to program the AUX clock divider
>      (Hardware will
>      +        * derive the clock from CDCLK automatically). We still
>      implement the
>      +        * get_aux_clock_divider vfunc to plug-in into the existing
>      code.
>      +        */
>      +       return index ? 0 : 1;
>      +}
>      +
>       static uint32_t i9xx_get_aux_send_ctl(struct intel_dp *intel_dp,
>                                            bool has_aux_irq,
>                                            int send_bytes,
>      @@ -4726,7 +4736,9 @@ intel_dp_init_connector(struct intel_digital_port
>      *intel_dig_port,
>              int type;
> 
>              /* intel_dp vfuncs */
>      -       if (IS_VALLEYVIEW(dev))
>      +       if (INTEL_INFO(dev)->gen >= 9)
>      +               intel_dp->get_aux_clock_divider =
>      skl_get_aux_clock_divider;
>      +       else if (IS_VALLEYVIEW(dev))
>                      intel_dp->get_aux_clock_divider =
>      vlv_get_aux_clock_divider;
>              else if (IS_HASWELL(dev) || IS_BROADWELL(dev))
>                      intel_dp->get_aux_clock_divider =
>      hsw_get_aux_clock_divider;
>      --
>      1.8.3.1
> 
>      _______________________________________________
>      Intel-gfx mailing list
>      Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
>      http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
>    --
>    Rodrigo Vivi
>    Blog: http://blog.vivi.eng.br
>     
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://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