From: Vincent ABRIOU <vincent.abriou@st.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: Thierry Reding <treding@nvidia.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 1/2] drm: Stop using drm_vblank_count() as the hw frame counter
Date: Fri, 2 Oct 2015 15:03:58 +0200 [thread overview]
Message-ID: <560E80BE.6090805@st.com> (raw)
In-Reply-To: <20151002124810.GN26517@intel.com>
On 10/02/2015 02:48 PM, Ville Syrjälä wrote:
> On Fri, Oct 02, 2015 at 10:25:27AM +0200, Vincent ABRIOU wrote:
>>
>>
>> On 09/30/2015 04:14 PM, Ville Syrjälä wrote:
>>> On Wed, Sep 30, 2015 at 04:08:02PM +0200, Daniel Vetter wrote:
>>>> On Wed, Sep 30, 2015 at 04:46:48PM +0300, ville.syrjala@linux.intel.com wrote:
>>>>> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>>>>
>>>>> drm_vblank_count() returns the software counter. We should not pretend
>>>>> it's the hw counter since we use the hw counter to figuere out what the
>>>>> software counter value should be. So instead provide a new function
>>>>> drm_vblank_no_hw_counter() for drivers that don't have a real hw
>>>>> counter. The new function simply returns 0, which is about the only
>>>>> thing it can do.
>>>>
>>>> Shouldn't we instead just make the get_vblank_counter hook optional?
>>>
>>> Perhaps. But maybe this way would encourage people to go look for a
>>> hw frame counter in their hardware?
>>>
>>>> -Daniel
>>>>
>>>>>
>>>>> Cc: Vincent Abriou <vincent.abriou@st.com>
>>>>> Cc: Thierry Reding <treding@nvidia.com>
>>>>> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>>>> ---
>>>>> drivers/gpu/drm/armada/armada_drv.c | 2 +-
>>>>> drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 2 +-
>>>>> drivers/gpu/drm/drm_irq.c | 17 +++++++++++++++++
>>>>> drivers/gpu/drm/exynos/exynos_drm_drv.c | 2 +-
>>>>> drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 2 +-
>>>>> drivers/gpu/drm/imx/imx-drm-core.c | 2 +-
>>
>> [..]
>>
>>>>> --- a/drivers/gpu/drm/drm_irq.c
>>>>> +++ b/drivers/gpu/drm/drm_irq.c
>>>>> @@ -1797,3 +1797,20 @@ bool drm_crtc_handle_vblank(struct drm_crtc *crtc)
>>>>> return drm_handle_vblank(crtc->dev, drm_crtc_index(crtc));
>>>>> }
>>>>> EXPORT_SYMBOL(drm_crtc_handle_vblank);
>>>>> +
>>>>> +/**
>>>>> + * drm_vblank_no_hw_counter - "No hw counter" implementation of .get_vblank_counter()
>>>>> + * @dev: DRM device
>>>>> + * @pipe: CRTC for which to read the counter
>>>>> + *
>>>>> + * Drivers can plug this into the .get_vblank_counter() function if
>>>>> + * there is no useable hardware frame counter available.
>>>>> + *
>>>>> + * Returns:
>>>>> + * 0
>>>>> + */
>>>>> +u32 drm_vblank_no_hw_counter(struct drm_device *dev, int pipe)
>>
>> warning when building the kernel:
>> int pipe => unsigned int pipe
>
> Where exactly? The function pointer signature still has a signed int
> here, and I was too lazy to go on a rampage to change all the remaining
> signed ints to unsigned for the vblank driver hooks.
>
I made the comment on the wrong patch. Sorry for that. It concern
"[PATCH 2/2] drm: s/int pipe/unsigned int pipe/"
Vincent
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-10-02 13:04 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-30 13:46 [PATCH 1/2] drm: Stop using drm_vblank_count() as the hw frame counter ville.syrjala
2015-09-30 13:46 ` [PATCH 2/2] drm: s/int pipe/unsigned int pipe/ ville.syrjala
2015-10-02 13:07 ` Vincent ABRIOU
2015-10-02 13:12 ` Ville Syrjälä
2015-10-02 13:22 ` Vincent ABRIOU
2015-10-02 15:39 ` Ville Syrjälä
2015-10-07 13:12 ` Vincent ABRIOU
2015-10-06 9:36 ` Thierry Reding
2015-09-30 14:08 ` [PATCH 1/2] drm: Stop using drm_vblank_count() as the hw frame counter Daniel Vetter
2015-09-30 14:14 ` Ville Syrjälä
2015-09-30 14:44 ` Vincent ABRIOU
2015-10-01 9:10 ` Vincent ABRIOU
2015-10-01 15:25 ` Rob Clark
2015-10-01 15:44 ` Ville Syrjälä
2015-10-01 15:47 ` Ville Syrjälä
2015-10-01 15:56 ` Rob Clark
2015-10-02 8:25 ` Vincent ABRIOU
2015-10-02 12:48 ` Ville Syrjälä
2015-10-02 13:03 ` Vincent ABRIOU [this message]
2015-10-07 12:54 ` Vincent ABRIOU
2015-10-07 14:14 ` Daniel Vetter
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=560E80BE.6090805@st.com \
--to=vincent.abriou@st.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=treding@nvidia.com \
--cc=ville.syrjala@linux.intel.com \
/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