[Freedreno] [PATCH 11/16] drm/vblank: Switch drm_driver->get_vblank_timestamp to return a bool

2017-03-22 Thread Daniel Vetter
There's really no reason for anything more: - Calling this while the crtc vblank stuff isn't set up is a driver bug. Those places arlready DRM_ERROR. - Calling this when the crtc is off is either a driver bug (callin drm_crtc_handle_vblank at the wrong time) or a core bug (for anything else).

[Freedreno] [PATCH 15/16] drm/vblank: Simplify the get_scanout_position helper hook

2017-03-22 Thread Daniel Vetter
- We can drop the different return value flags, the only caller only cares about whether the scanout position is valid or not. Also, it's entirely undefined what "accurate" means, if we'd really care we should probably wire the max_error through. But since we never even report this to users

[Freedreno] [PATCH 14/16] drm/vblank: drop the mode argument from drm_calc_vbltimestamp_from_scanoutpos

2017-03-22 Thread Daniel Vetter
If we restrict this helper to only kms drivers (which is the case) we can look up the correct mode easily ourselves. But it's a bit tricky: - All legacy drivers look at crtc->hwmode. But that is update already at the beginning of the modeset helper, which means when we disable a pipe. Hence th

[Freedreno] [PATCH 12/16] drm/vblank: Switch to bool in_vblank_irq in get_vblank_timestamp

2017-03-22 Thread Daniel Vetter
It's overkill to have a flag parameter which is essentially used just as a boolean. This takes care of core + adjusting drivers. Adjusting the scanout position callback is a bit harder, since radeon also supplies it's own driver-private flags in there. Cc: Mario Kleiner Cc: Eric Anholt Cc: Rob

Re: [Freedreno] [Intel-gfx] [PATCH 11/16] drm/vblank: Switch drm_driver->get_vblank_timestamp to return a bool

2017-03-22 Thread Jani Nikula
On Wed, 22 Mar 2017, Daniel Vetter wrote: > There's really no reason for anything more: > - Calling this while the crtc vblank stuff isn't set up is a driver > bug. Those places arlready DRM_ERROR. > - Calling this when the crtc is off is either a driver bug (callin > drm_crtc_handle_vblank at

Re: [Freedreno] [PATCH] drm/msm/hdmi: redefinitions of macros not required

2017-03-22 Thread Rob Clark
On Wed, Mar 22, 2017 at 1:11 AM, Vinay Simha B N wrote: > hi, > > Could you please give some feedback or review comments for this patch looks good, I've pulled it into msm-next BR, -R > On 3/14/17, Vinay Simha BN wrote: >> 4 macros already defined in hdmi.h, >> which is not required to redefin

[Freedreno] [RFC] freedreno: valgrind support

2017-03-22 Thread Rob Clark
From: Rob Clark --- This is mostly an attempt at teaching valgrind about the bo cache pool, so it would not think that gem objects returned to the bo cache were leaked. Unfortunately the list head node in the gem bo is used to store the bo in the pool. This is why I also have to disable/enable

Re: [Freedreno] [Intel-gfx] [PATCH 11/16] drm/vblank: Switch drm_driver->get_vblank_timestamp to return a bool

2017-03-22 Thread Daniel Vetter
On Wed, Mar 22, 2017 at 12:33:35PM +0200, Jani Nikula wrote: > On Wed, 22 Mar 2017, Daniel Vetter wrote: > > There's really no reason for anything more: > > - Calling this while the crtc vblank stuff isn't set up is a driver > > bug. Those places arlready DRM_ERROR. > > - Calling this when the c

Re: [Freedreno] [Intel-gfx] [PATCH 11/16] drm/vblank: Switch drm_driver->get_vblank_timestamp to return a bool

2017-03-22 Thread Jani Nikula
On Wed, 22 Mar 2017, Daniel Vetter wrote: > On Wed, Mar 22, 2017 at 12:33:35PM +0200, Jani Nikula wrote: >> On Wed, 22 Mar 2017, Daniel Vetter wrote: >> > There's really no reason for anything more: >> > - Calling this while the crtc vblank stuff isn't set up is a driver >> > bug. Those places

Re: [Freedreno] [RFC] freedreno: valgrind support

2017-03-22 Thread Rob Clark
On Wed, Mar 22, 2017 at 7:54 AM, Rob Clark wrote: > From: Rob Clark > > --- > This is mostly an attempt at teaching valgrind about the bo cache pool, > so it would not think that gem objects returned to the bo cache were > leaked. Unfortunately the list head node in the gem bo is used to > store

Re: [Freedreno] [Intel-gfx] [PATCH 11/16] drm/vblank: Switch drm_driver->get_vblank_timestamp to return a bool

2017-03-22 Thread Daniel Vetter
On Wed, Mar 22, 2017 at 04:05:59PM +0200, Jani Nikula wrote: > On Wed, 22 Mar 2017, Daniel Vetter wrote: > > On Wed, Mar 22, 2017 at 12:33:35PM +0200, Jani Nikula wrote: > >> On Wed, 22 Mar 2017, Daniel Vetter wrote: > >> > There's really no reason for anything more: > >> > - Calling this while t

Re: [Freedreno] [PATCH 12/16] drm/vblank: Switch to bool in_vblank_irq in get_vblank_timestamp

2017-03-22 Thread Ville Syrjälä
On Wed, Mar 22, 2017 at 09:36:13AM +0100, Daniel Vetter wrote: > It's overkill to have a flag parameter which is essentially used just > as a boolean. This takes care of core + adjusting drivers. > > Adjusting the scanout position callback is a bit harder, since radeon > also supplies it's own dri

[Freedreno] [PATCH] drm/vblank: Switch drm_driver->get_vblank_timestamp to return a bool

2017-03-22 Thread Daniel Vetter
There's really no reason for anything more: - Calling this while the crtc vblank stuff isn't set up is a driver bug. Those places arlready DRM_ERROR. - Calling this when the crtc is off is either a driver bug (callin drm_crtc_handle_vblank at the wrong time) or a core bug (for anything else).

[Freedreno] [PATCH] drm/vblank: drop the mode argument from drm_calc_vbltimestamp_from_scanoutpos

2017-03-22 Thread Daniel Vetter
If we restrict this helper to only kms drivers (which is the case) we can look up the correct mode easily ourselves. But it's a bit tricky: - All legacy drivers look at crtc->hwmode. But that is update already at the beginning of the modeset helper, which means when we disable a pipe. Hence th