From: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
To: Gustavo Padovan <gustavo@padovan.org>,
Tobias Jakobi <tjakobi@math.uni-bielefeld.de>,
linux-samsung-soc@vger.kernel.org,
dri-devel@lists.freedesktop.org, inki.dae@samsung.com,
jy0922.shim@samsung.com, daniel@fooishbar.org,
Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Subject: Re: [PATCH v3] drm/exynos: calculate vrefresh instead of use a fixed value
Date: Thu, 21 May 2015 17:10:27 +0200 [thread overview]
Message-ID: <7a30ec3e61155af403236be170d0ee63@math.uni-bielefeld.de> (raw)
In-Reply-To: <20150521140635.GB10615@joana>
Hey,
On 2015-05-21 16:06, Gustavo Padovan wrote:
> Hi Tobias,
>
> 2015-05-21 Tobias Jakobi <tjakobi@math.uni-bielefeld.de>:
>
>> Gustavo Padovan wrote:
>> > From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
>> >
>> > When mode's vrefresh is zero we should ask DRM core to calculate vrefresh
>> > for us so we can get the correct value instead of relying on fixed value
>> > defined in a macro. But if vrefresh is still zero we should fail the
>> > update.
>> This works better for me:
>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> index dc834b8..26e8ae4 100644
>> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> @@ -346,11 +346,16 @@ static bool fimd_mode_fixup(struct
>> exynos_drm_crtc
>> *crtc,
>> static void fimd_commit(struct exynos_drm_crtc *crtc)
>> {
>> struct fimd_context *ctx = crtc->ctx;
>> - struct drm_display_mode *mode = &crtc->base.mode;
>> + struct drm_display_mode *mode;
>> struct fimd_driver_data *driver_data = ctx->driver_data;
>> void *timing_base = ctx->regs + driver_data->timing_base;
>> u32 val, clkdiv;
>>
>> + if (crtc->base.state)
>> + mode = &crtc->base.state->adjusted_mode;
>> + else
>> + mode = &crtc->base.mode;
>> +
>> if (ctx->suspended)
>> return;
>>
>> Otherwise I get an oops (nullptr deref) on boot, so 'state' is
>> probably
>> not initialized yet at this point.
>
> Would you like to send a proper git patch of this? You can move the
> drm_mode_vrefresh() part to your patch.
I'll try to send out something later this day.
With best wishes,
Tobias
>
> Gustavo
prev parent reply other threads:[~2015-05-21 15:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-20 20:56 [PATCH v3] drm/exynos: calculate vrefresh instead of use a fixed value Gustavo Padovan
2015-05-20 21:07 ` Tobias Jakobi
2015-05-20 22:19 ` Tobias Jakobi
2015-05-21 14:06 ` Gustavo Padovan
2015-05-21 15:10 ` Tobias Jakobi [this message]
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=7a30ec3e61155af403236be170d0ee63@math.uni-bielefeld.de \
--to=tjakobi@math.uni-bielefeld.de \
--cc=daniel@fooishbar.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gustavo.padovan@collabora.co.uk \
--cc=gustavo@padovan.org \
--cc=inki.dae@samsung.com \
--cc=jy0922.shim@samsung.com \
--cc=linux-samsung-soc@vger.kernel.org \
/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