Re: drm/exynos: Add atomic modesetting support

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

 



Hey Daniel,

On 2015-05-19 16:06, Daniel Stone wrote:
Hi Tobias,

On 19 May 2015 at 14:53, Tobias Jakobi <tjakobi@xxxxxxxxxxxxxxxxxxxxx> 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?
I've also added printk for ideal_clk, here's the output.

kernel output:
[   81.204682] [drm:fimd_calc_clkdiv] vrefresh 0
[ 81.204700] [drm:drm_mode_debug_printmodeline] Modeline 0:"1366x768" 0 500 1366 1414 1446 1526 768 771 776 790 0x48 0x5
[   81.204710] [drm:fimd_calc_clkdiv] ideal_clk 0

So vrefresh remains zero after all.

With best wishes,
Tobias



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