drm/exynos: Add atomic modesetting support

Daniel Stone daniel at fooishbar.org
Tue May 19 07:06:54 PDT 2015


Hi Tobias,

On 19 May 2015 at 14:53, Tobias Jakobi <tjakobi at math.uni-bielefeld.de> wrote:
> On 2015-05-18 23:02, Gustavo Padovan wrote:
>> So better try this. Ideally fimd_mode_fixup should go away too, I'll do a
>> proper
>> patch once we know this works.
>>
>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> index 12ab80c..363353b 100644
>> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> @@ -307,9 +307,17 @@ static void fimd_iommu_detach_devices(struct
>> fimd_context *ctx)
>>  static u32 fimd_calc_clkdiv(struct fimd_context *ctx,
>>                 const struct drm_display_mode *mode)
>>  {
>> -       unsigned long ideal_clk = mode->htotal * mode->vtotal *
>> mode->vrefresh;
>> +       unsigned long ideal_clk;
>> +       int vrefresh;
>>         u32 clkdiv;
>>
>> +       if (mode->vrefresh == 0)
>> +               vrefresh = drm_mode_vrefresh(mode);
>> +       else
>> +               vrefresh = mode->vrefresh;
>> +
>> +       ideal_clk =  mode->htotal * mode->vtotal * vrefresh;
>> +
>>         if (ctx->i80_if) {
>>                 /*
>>                  * The frame done interrupt should be occurred prior to
>> the
>
> I've applied this and the debug output patch, but I still get a div-by-zero.

Can you please add a drm_mode_debug_printmodeline(mode) and give the
output there?

Cheers,
Daniel


More information about the dri-devel mailing list