Message ID | 1485065346-11578-1-git-send-email-shawnguo@kernel.org |
---|---|
Headers | show |
Series | Add vblank hooks to struct drm_crtc_funcs | expand |
On Sun, Jan 22, 2017 at 02:09:01PM +0800, Shawn Guo wrote: > From: Shawn Guo <shawn.guo@linaro.org> > > The vblank is mostly CRTC specific and implemented as part of CRTC > driver. The first patch adds 3 vblank core-driver hooks into struct > drm_crtc_funcs, and wraps around core vblank handling code to use the > new hooks for modern MODESET drivers and the ones in struct drm_driver > as fallback for legacy drivers. > > The other patches in the series are to demonstrate how the new hooks > are going to influence the driver code. There are more drivers than > the ones included here can be converted. But before doing that, I would > like to get some feedbacks first, expecially on how .get_vblank_counter > should be converted when it's being drm_vblank_no_hw_counter(). > > .get_vblank_counter = drm_vblank_no_hw_counter I dropped some suggestions about this onto patch 3. Thanks for doing this, I think it looks rather pretty. -Daniel > The series is generated against branch drm-misc-next. > > Changes for v2: > - Wrap around core vblank handling code to save > drm_crtc_enable[disable]_vblank() helpers > - Add .get_vblank_counter to struct drm_crtc_funcs > - Add some comments to link between two sets of hooks > - Add one hdlcd driver patch for example > > Shawn Guo (5): > drm: add vblank hooks to struct drm_crtc_funcs > drm: hdlcd: use vblank hooks in struct drm_crtc_funcs > drm: zte: zx_vou_enable[disable]_vblank can be static > drm: rockchip: remove struct rockchip_crtc_funcs > drm: imx: remove struct imx_drm_crtc and imx_drm_crtc_helper_funcs > > drivers/gpu/drm/arm/hdlcd_crtc.c | 20 ++++++ > drivers/gpu/drm/arm/hdlcd_drv.c | 20 ------ > drivers/gpu/drm/drm_irq.c | 53 +++++++++++++-- > drivers/gpu/drm/imx/imx-drm-core.c | 101 ---------------------------- > drivers/gpu/drm/imx/imx-drm.h | 13 ---- > drivers/gpu/drm/imx/ipuv3-crtc.c | 58 ++++++---------- > drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 51 -------------- > drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 14 ---- > drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 9 +-- > drivers/gpu/drm/zte/zx_drm_drv.c | 2 - > drivers/gpu/drm/zte/zx_vou.c | 61 +++++++---------- > drivers/gpu/drm/zte/zx_vou.h | 3 - > include/drm/drm_crtc.h | 34 ++++++++++ > include/drm/drm_drv.h | 9 +++ > 14 files changed, 157 insertions(+), 291 deletions(-) > > -- > 1.9.1 >
On Tue, Jan 24, 2017 at 08:55:35AM +0100, Daniel Vetter wrote: > On Sun, Jan 22, 2017 at 02:09:01PM +0800, Shawn Guo wrote: > > From: Shawn Guo <shawn.guo@linaro.org> > > > > The vblank is mostly CRTC specific and implemented as part of CRTC > > driver. The first patch adds 3 vblank core-driver hooks into struct > > drm_crtc_funcs, and wraps around core vblank handling code to use the > > new hooks for modern MODESET drivers and the ones in struct drm_driver > > as fallback for legacy drivers. > > > > The other patches in the series are to demonstrate how the new hooks > > are going to influence the driver code. There are more drivers than > > the ones included here can be converted. But before doing that, I would > > like to get some feedbacks first, expecially on how .get_vblank_counter > > should be converted when it's being drm_vblank_no_hw_counter(). > > > > .get_vblank_counter = drm_vblank_no_hw_counter > > I dropped some suggestions about this onto patch 3. Thanks for doing this, > I think it looks rather pretty. Just to check: Do you plan to resend this series with my comments on the first patch addressed? I really like this, so I guess you could drop the RFC part and then we give maintainers a week or two for reviews and land it into drm-misc for 4.12 ...
On Tue, Feb 07, 2017 at 08:32:46AM +0100, Daniel Vetter wrote: > On Tue, Jan 24, 2017 at 08:55:35AM +0100, Daniel Vetter wrote: > > On Sun, Jan 22, 2017 at 02:09:01PM +0800, Shawn Guo wrote: > > > From: Shawn Guo <shawn.guo@linaro.org> > > > > > > The vblank is mostly CRTC specific and implemented as part of CRTC > > > driver. The first patch adds 3 vblank core-driver hooks into struct > > > drm_crtc_funcs, and wraps around core vblank handling code to use the > > > new hooks for modern MODESET drivers and the ones in struct drm_driver > > > as fallback for legacy drivers. > > > > > > The other patches in the series are to demonstrate how the new hooks > > > are going to influence the driver code. There are more drivers than > > > the ones included here can be converted. But before doing that, I would > > > like to get some feedbacks first, expecially on how .get_vblank_counter > > > should be converted when it's being drm_vblank_no_hw_counter(). > > > > > > .get_vblank_counter = drm_vblank_no_hw_counter > > > > I dropped some suggestions about this onto patch 3. Thanks for doing this, > > I think it looks rather pretty. > > Just to check: Do you plan to resend this series with my comments on the > first patch addressed? I really like this, so I guess you could drop the > RFC part and then we give maintainers a week or two for reviews and land > it into drm-misc for 4.12 ... Sorry for being late due to Chinese New Year Holidays. The new version is on the way, and will be on the list in a couple of hours. Shawn
From: Shawn Guo <shawn.guo@linaro.org> The vblank is mostly CRTC specific and implemented as part of CRTC driver. The first patch adds 3 vblank core-driver hooks into struct drm_crtc_funcs, and wraps around core vblank handling code to use the new hooks for modern MODESET drivers and the ones in struct drm_driver as fallback for legacy drivers. The other patches in the series are to demonstrate how the new hooks are going to influence the driver code. There are more drivers than the ones included here can be converted. But before doing that, I would like to get some feedbacks first, expecially on how .get_vblank_counter should be converted when it's being drm_vblank_no_hw_counter(). .get_vblank_counter = drm_vblank_no_hw_counter The series is generated against branch drm-misc-next. Changes for v2: - Wrap around core vblank handling code to save drm_crtc_enable[disable]_vblank() helpers - Add .get_vblank_counter to struct drm_crtc_funcs - Add some comments to link between two sets of hooks - Add one hdlcd driver patch for example Shawn Guo (5): drm: add vblank hooks to struct drm_crtc_funcs drm: hdlcd: use vblank hooks in struct drm_crtc_funcs drm: zte: zx_vou_enable[disable]_vblank can be static drm: rockchip: remove struct rockchip_crtc_funcs drm: imx: remove struct imx_drm_crtc and imx_drm_crtc_helper_funcs drivers/gpu/drm/arm/hdlcd_crtc.c | 20 ++++++ drivers/gpu/drm/arm/hdlcd_drv.c | 20 ------ drivers/gpu/drm/drm_irq.c | 53 +++++++++++++-- drivers/gpu/drm/imx/imx-drm-core.c | 101 ---------------------------- drivers/gpu/drm/imx/imx-drm.h | 13 ---- drivers/gpu/drm/imx/ipuv3-crtc.c | 58 ++++++---------- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 51 -------------- drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 14 ---- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 9 +-- drivers/gpu/drm/zte/zx_drm_drv.c | 2 - drivers/gpu/drm/zte/zx_vou.c | 61 +++++++---------- drivers/gpu/drm/zte/zx_vou.h | 3 - include/drm/drm_crtc.h | 34 ++++++++++ include/drm/drm_drv.h | 9 +++ 14 files changed, 157 insertions(+), 291 deletions(-)