drm/exynos: fimd: vrefresh is zero

Tobias Jakobi tjakobi at math.uni-bielefeld.de
Thu May 5 16:23:31 UTC 2016


Hello Andrzej,


Andrzej Hajda wrote:
> On 05/05/2016 11:12 AM, Andrzej Hajda wrote:
>>
>> Regarding the initial question, mode->vrefresh is set in
>> drm_helper_probe_single_connector_modes. I guess division by zero could
>> be caused by lack of clock in timings provided by dts timing node.
>> As I remember in the past dts timings were passed without provided
>> clock, in such case driver calculated mode->clock for some default value
>> of vrefresh (60Hz for fimd if I remember correctly). Later validation
>> code was added and the clock should be always provided.
>> DTS files were updated after some time and the recalculation code was
>> removed from fimd driver. So it is possible you are a victim of this change.
> 
> One more thing, I have looked at Exynos DTS files in mainline. In case
> of exynos5*.dts files clock-frequency is set to 50000, it is of course
> insanely low value and vrefresh calculated for such timings will be 0.
> So please verify if clock-frequency is not too low in your case.
I'm pretty sure that this is not the case for me.

This is the FIMD entry in my DTS:
&fimd {
        status = "okay";

        pinctrl-0 = <&lcd_clk &lcd_data24 &pwm1_out>;
        pinctrl-names = "default";

        display-timings {
                native-mode = <&timing0>;

                timing0: timing {
                        clock-frequency = <85860000>;
                        hactive = <1366>;
                        vactive = <768>;
                        hfront-porch = <48>;
                        hback-porch = <80>;
                        hsync-len = <32>;
                        vback-porch = <14>;
                        vfront-porch = <3>;
                        vsync-len = <5>;
                        pixelclk-active = <1>;
                        hsync-active = <1>;
                        vsync-active = <1>;
                        de-active = <0>;
                };
        };
};


The only peculiarity is that there is nothing attached to the external
connector on the board (ODROID-X2).

With regard to use of the vrefresh field by the various drivers, I was
made aware of Daniel on IRC that this is incorrect use.

He pointed me to:
http://lxr.free-electrons.com/source/include/drm/drm_modes.h#L374
(-> "Not used in a functional way.")

I'm going to send a patch shortly.

With best wishes,
Tobias

P.S.: I'm also experiencing another (more serious) issue, but more about
that in another thread.



> 
> Regards
> Andrzej
> 
>>
>> Regarding usage by drivers, from a quick look it seems to be used for
>> something more than debugging by:
>> - amdgpu,
>> - exynos,
>> - adv7511,
>> - intel_dp(?),
>> - mdp5_cmd_encoder(?),
>> - nouveau,
>> - omap(?),
>> - tilcdc.
>>
>> Regards
>> Andrzej
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>>
> 



More information about the dri-devel mailing list