Re: [PATCH 2/2] drm/exynos: WARN_ON if ideal_clk is zero

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

 



Hi,

On 20 May 2015 at 17:04, Tobias Jakobi <tjakobi@xxxxxxxxxxxxxxxxxxxxx> wrote:
> Hmm,
>
> I wonder if that really 'fixes' anything, because now we get a WARN_ON which
> is immediately followed by a div-by-zero. Furthermore we then still use the
> result of that operation as input for a hw register (bad idea?)
>
> I thought of something like this. Change fimd_calc_clkdiv() to return a
> signed value (this shouldn't be a problem, since the returned number range
> is small anywary). Let fimd_calc_clkdiv() return -1 when it encounters the
> 'ideal_clk == 0' case. Move computation of clkdiv in fimd_commit() to the
> top of the function (right after the {h,v}total checks). If 'clkdiv == -1'
> case is encountered, then do WARN_ON and return immediately from
> fimd_commit().
>
> Should I prepare a patch for this, or does someone see an issue with this
> approach?

Commit should never fail; as I said earlier, the right fix is to
reject these modes during checking, by making sure that any mode which
passes mode_fixup() and/or mode_valid() never trips this condition.

Cheers,
Daniel
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux