Linux Samsung SOC development
 help / color / mirror / Atom feed
From: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
To: Daniel Stone <daniel@fooishbar.org>
Cc: linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	liquid.acid@gmx.net
Subject: Re: drm/exynos: Add atomic modesetting support
Date: Tue, 19 May 2015 16:52:24 +0200	[thread overview]
Message-ID: <cb041ef94a174660be2b70ca6ce6c54e@math.uni-bielefeld.de> (raw)
In-Reply-To: <CAPj87rM-oNsqb+=7HyJ4k7GMJA80nfq_AwYVx5ct1J7hYL12PA@mail.gmail.com>

Hey Daniel,

On 2015-05-19 16:06, Daniel Stone wrote:
> Hi Tobias,
> 
> On 19 May 2015 at 14:53, Tobias Jakobi <tjakobi@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?
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@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-05-19 14:52 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-15 11:44 drm/exynos: Add atomic modesetting support Tobias Jakobi
2015-05-18 19:51 ` Gustavo Padovan
2015-05-18 20:35   ` Daniel Stone
2015-05-18 21:02     ` Gustavo Padovan
2015-05-19 13:53       ` Tobias Jakobi
2015-05-19 14:06         ` Daniel Stone
2015-05-19 14:52           ` Tobias Jakobi [this message]
2015-05-19 17:27           ` Tobias Jakobi
2015-05-19 18:43             ` Gustavo Padovan
2015-05-19 18:54               ` Daniel Stone
  -- strict thread matches above, loose matches on Subject: below --
2015-05-15 10:16 Tobias Jakobi
2015-04-30 21:50 Gustavo Padovan
2015-05-06 21:45 ` Gustavo Padovan
2015-05-07  2:45   ` Inki Dae
2015-05-08 21:45     ` Gustavo Padovan
2015-05-08 21:51 ` Tobias Jakobi
2015-05-09 10:23   ` Inki Dae
2015-05-09 12:13     ` Tobias Jakobi
2015-05-09 12:20       ` Tobias Jakobi
2015-05-09 12:30         ` Tobias Jakobi
2015-05-10 13:54       ` Inki Dae
2015-05-12 18:29         ` Gustavo Padovan
2015-05-14 18:41           ` Gustavo Padovan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cb041ef94a174660be2b70ca6ce6c54e@math.uni-bielefeld.de \
    --to=tjakobi@math.uni-bielefeld.de \
    --cc=daniel@fooishbar.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=liquid.acid@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox