Ville Syrjala
2017-Nov-23 19:04 UTC
[Nouveau] [PATCH 00/15] drm: More plane clipping polish
From: Ville Syrjälä <ville.syrjala at linux.intel.com> This series first unifies all users of drm_atomic_helper_check_plane_state() to populate the clip rectangle with drm_mode_get_hv_timing(), and once everything is unified the clip rectangle handling is sucked into drm_atomic_helper_check_plane_state() away from driver code. Entire series available here: git://github.com/vsyrjala/linux.git atomic_plane_helper_clip Cc: Archit Taneja <architt at codeaurora.org> Cc: Ben Skeggs <bskeggs at redhat.com> Cc: Brian Starkey <brian.starkey at arm.com> Cc: CK Hu <ck.hu at mediatek.com> Cc: Daniel Vetter <daniel at ffwll.ch> Cc: freedreno at lists.freedesktop.org Cc: Laurent Pinchart <laurent.pinchart at ideasonboard.com> Cc: linux-amlogic at lists.infradead.org Cc: linux-arm-msm at vger.kernel.org Cc: linux-tegra at vger.kernel.org Cc: Liviu Dudau <liviu.dudau at arm.com> Cc: Mali DP Maintainers <malidp at foss.arm.com> Cc: Mark Yao <mark.yao at rock-chips.com> Cc: Neil Armstrong <narmstrong at baylibre.com> Cc: Noralf Trønnes <noralf at tronnes.org> Cc: nouveau at lists.freedesktop.org Cc: Philipp Zabel <p.zabel at pengutronix.de> Cc: Rob Clark <robdclark at gmail.com> Cc: Shawn Guo <shawnguo at kernel.org> Cc: Sinclair Yeh <syeh at vmware.com> Cc: Thierry Reding <thierry.reding at gmail.com> Cc: Thomas Hellstrom <thellstrom at vmware.com> Cc: VMware Graphics <linux-graphics-maintainer at vmware.com> Ville Syrjälä (15): drm/i915: Reject odd pipe source width with double wide/dual link drm/i915: Use drm_mode_get_hv_timing() to populate plane clip rectangle drm/arm/hdlcd: Use drm_mode_get_hv_timing() to populate plane clip rectangle drm/arm/mali-dp: Use drm_mode_get_hv_timing() to populate plane clip rectangle drm/simple_kms_helper: Use drm_mode_get_hv_timing() to populate plane clip rectangle drm/imx: Use drm_mode_get_hv_timing() to populate plane clip rectangle drm/mediatek: Use drm_mode_get_hv_timing() to populate plane clip rectangle drm/meson: Use drm_mode_get_hv_timing() to populate plane clip rectangle drm/msm/mdp5: Use drm_mode_get_hv_timing() to populate plane clip rectangle drm/nouveau/kms/nv50: Use drm_mode_get_hv_timing() to populate plane clip rectangle drm/rockchip: Use drm_mode_get_hv_timing() to populate plane clip rectangle drm/tegra/dc: Use drm_mode_get_hv_timing() to populate plane clip rectangle drm/vmwgfx: Use drm_mode_get_hv_timing() to populate plane clip rectangle drm/zte: Use drm_mode_get_hv_timing() to populate plane clip rectangle drm: Don't pass clip to drm_atomic_helper_check_plane_state() drivers/gpu/drm/arm/hdlcd_crtc.c | 6 +----- drivers/gpu/drm/arm/malidp_planes.c | 5 +---- drivers/gpu/drm/armada/armada_overlay.c | 2 +- drivers/gpu/drm/drm_atomic_helper.c | 12 +++++++----- drivers/gpu/drm/drm_plane_helper.c | 11 +++-------- drivers/gpu/drm/drm_simple_kms_helper.c | 5 ----- drivers/gpu/drm/i915/intel_atomic_plane.c | 8 -------- drivers/gpu/drm/i915/intel_display.c | 12 +++++++----- drivers/gpu/drm/i915/intel_drv.h | 1 - drivers/gpu/drm/i915/intel_sprite.c | 8 ++++++-- drivers/gpu/drm/imx/ipuv3-plane.c | 7 +------ drivers/gpu/drm/mediatek/mtk_drm_plane.c | 6 +----- drivers/gpu/drm/meson/meson_plane.c | 6 +----- drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 14 ++------------ drivers/gpu/drm/nouveau/nv50_display.c | 8 -------- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 8 +------- drivers/gpu/drm/tegra/dc.c | 8 +------- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 8 +------- drivers/gpu/drm/zte/zx_plane.c | 15 +-------------- include/drm/drm_atomic_helper.h | 1 - include/drm/drm_plane_helper.h | 1 - 21 files changed, 35 insertions(+), 117 deletions(-) -- 2.13.6
Ville Syrjala
2017-Nov-23 19:04 UTC
[Nouveau] [PATCH 10/15] drm/nouveau/kms/nv50: Use drm_mode_get_hv_timing() to populate plane clip rectangle
From: Ville Syrjälä <ville.syrjala at linux.intel.com> Use drm_mode_get_hv_timing() to fill out the plane clip rectangle. No functional changes as the code already uses crtc_state->mode to populate the clip, which is also what drm_mode_get_hv_timing() uses. Once everyone agrees on this we can move the clip handling into drm_atomic_helper_check_plane_state(). Cc: Laurent Pinchart <laurent.pinchart at ideasonboard.com> Cc: Ben Skeggs <bskeggs at redhat.com> Cc: nouveau at lists.freedesktop.org Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com> --- drivers/gpu/drm/nouveau/nv50_display.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c index 65336948e807..7d8307ec442c 100644 --- a/drivers/gpu/drm/nouveau/nv50_display.c +++ b/drivers/gpu/drm/nouveau/nv50_display.c @@ -228,8 +228,6 @@ struct nv50_wndw_atom { struct drm_plane_state state; u8 interval; - struct drm_rect clip; - struct { u32 handle; u16 offset:12; @@ -840,10 +838,6 @@ nv50_wndw_atomic_check_acquire(struct nv50_wndw *wndw, int ret; NV_ATOMIC(drm, "%s acquire\n", wndw->plane.name); - asyw->clip.x1 = 0; - asyw->clip.y1 = 0; - asyw->clip.x2 = asyh->state.mode.hdisplay; - asyw->clip.y2 = asyh->state.mode.vdisplay; asyw->image.w = fb->base.width; asyw->image.h = fb->base.height; @@ -1141,10 +1135,15 @@ static int nv50_curs_acquire(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw, struct nv50_head_atom *asyh) { + struct drm_rect clip = {}; int ret; + if (asyh->state.enable) + drm_mode_get_hv_timing(&asyh->state.mode, + &clip.x2, &clip.y2); + ret = drm_atomic_helper_check_plane_state(&asyw->state, &asyh->state, - &asyw->clip, + &clip, DRM_PLANE_HELPER_NO_SCALING, DRM_PLANE_HELPER_NO_SCALING, true, true); @@ -1428,13 +1427,18 @@ nv50_base_acquire(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw, struct nv50_head_atom *asyh) { const struct drm_framebuffer *fb = asyw->state.fb; + struct drm_rect clip = {}; int ret; if (!fb->format->depth) return -EINVAL; + if (asyh->state.enable) + drm_mode_get_hv_timing(&asyh->state.mode, + &clip.x2, &clip.y2); + ret = drm_atomic_helper_check_plane_state(&asyw->state, &asyh->state, - &asyw->clip, + &clip, DRM_PLANE_HELPER_NO_SCALING, DRM_PLANE_HELPER_NO_SCALING, false, true); -- 2.13.6
Thierry Reding
2017-Nov-24 13:41 UTC
[Nouveau] [PATCH 00/15] drm: More plane clipping polish
On Thu, Nov 23, 2017 at 09:04:47PM +0200, Ville Syrjala wrote:> From: Ville Syrjälä <ville.syrjala at linux.intel.com> > > This series first unifies all users of drm_atomic_helper_check_plane_state() > to populate the clip rectangle with drm_mode_get_hv_timing(), and once > everything is unified the clip rectangle handling is sucked into > drm_atomic_helper_check_plane_state() away from driver code. > > Entire series available here: > git://github.com/vsyrjala/linux.git atomic_plane_helper_clip > > Cc: Archit Taneja <architt at codeaurora.org> > Cc: Ben Skeggs <bskeggs at redhat.com> > Cc: Brian Starkey <brian.starkey at arm.com> > Cc: CK Hu <ck.hu at mediatek.com> > Cc: Daniel Vetter <daniel at ffwll.ch> > Cc: freedreno at lists.freedesktop.org > Cc: Laurent Pinchart <laurent.pinchart at ideasonboard.com> > Cc: linux-amlogic at lists.infradead.org > Cc: linux-arm-msm at vger.kernel.org > Cc: linux-tegra at vger.kernel.org > Cc: Liviu Dudau <liviu.dudau at arm.com> > Cc: Mali DP Maintainers <malidp at foss.arm.com> > Cc: Mark Yao <mark.yao at rock-chips.com> > Cc: Neil Armstrong <narmstrong at baylibre.com> > Cc: Noralf Trønnes <noralf at tronnes.org> > Cc: nouveau at lists.freedesktop.org > Cc: Philipp Zabel <p.zabel at pengutronix.de> > Cc: Rob Clark <robdclark at gmail.com> > Cc: Shawn Guo <shawnguo at kernel.org> > Cc: Sinclair Yeh <syeh at vmware.com> > Cc: Thierry Reding <thierry.reding at gmail.com> > Cc: Thomas Hellstrom <thellstrom at vmware.com> > Cc: VMware Graphics <linux-graphics-maintainer at vmware.com> > > Ville Syrjälä (15): > drm/i915: Reject odd pipe source width with double wide/dual link > drm/i915: Use drm_mode_get_hv_timing() to populate plane clip > rectangle > drm/arm/hdlcd: Use drm_mode_get_hv_timing() to populate plane clip > rectangle > drm/arm/mali-dp: Use drm_mode_get_hv_timing() to populate plane clip > rectangle > drm/simple_kms_helper: Use drm_mode_get_hv_timing() to populate plane > clip rectangle > drm/imx: Use drm_mode_get_hv_timing() to populate plane clip rectangle > drm/mediatek: Use drm_mode_get_hv_timing() to populate plane clip > rectangle > drm/meson: Use drm_mode_get_hv_timing() to populate plane clip > rectangle > drm/msm/mdp5: Use drm_mode_get_hv_timing() to populate plane clip > rectangle > drm/nouveau/kms/nv50: Use drm_mode_get_hv_timing() to populate plane > clip rectangle > drm/rockchip: Use drm_mode_get_hv_timing() to populate plane clip > rectangle > drm/tegra/dc: Use drm_mode_get_hv_timing() to populate plane clip > rectangle > drm/vmwgfx: Use drm_mode_get_hv_timing() to populate plane clip > rectangle > drm/zte: Use drm_mode_get_hv_timing() to populate plane clip rectangle > drm: Don't pass clip to drm_atomic_helper_check_plane_state() > > drivers/gpu/drm/arm/hdlcd_crtc.c | 6 +----- > drivers/gpu/drm/arm/malidp_planes.c | 5 +---- > drivers/gpu/drm/armada/armada_overlay.c | 2 +- > drivers/gpu/drm/drm_atomic_helper.c | 12 +++++++----- > drivers/gpu/drm/drm_plane_helper.c | 11 +++-------- > drivers/gpu/drm/drm_simple_kms_helper.c | 5 ----- > drivers/gpu/drm/i915/intel_atomic_plane.c | 8 -------- > drivers/gpu/drm/i915/intel_display.c | 12 +++++++----- > drivers/gpu/drm/i915/intel_drv.h | 1 - > drivers/gpu/drm/i915/intel_sprite.c | 8 ++++++-- > drivers/gpu/drm/imx/ipuv3-plane.c | 7 +------ > drivers/gpu/drm/mediatek/mtk_drm_plane.c | 6 +----- > drivers/gpu/drm/meson/meson_plane.c | 6 +----- > drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 14 ++------------ > drivers/gpu/drm/nouveau/nv50_display.c | 8 -------- > drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 8 +------- > drivers/gpu/drm/tegra/dc.c | 8 +------- > drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 8 +------- > drivers/gpu/drm/zte/zx_plane.c | 15 +-------------- > include/drm/drm_atomic_helper.h | 1 - > include/drm/drm_plane_helper.h | 1 - > 21 files changed, 35 insertions(+), 117 deletions(-)The series: Reviewed-by: Thierry Reding <treding at nvidia.com> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20171124/16bb87d7/attachment-0001.sig>
Ville Syrjälä
2018-Jan-23 16:15 UTC
[Nouveau] [PATCH 00/15] drm: More plane clipping polish
On Thu, Nov 23, 2017 at 09:04:47PM +0200, Ville Syrjala wrote:> From: Ville Syrjälä <ville.syrjala at linux.intel.com> > > This series first unifies all users of drm_atomic_helper_check_plane_state() > to populate the clip rectangle with drm_mode_get_hv_timing(), and once > everything is unified the clip rectangle handling is sucked into > drm_atomic_helper_check_plane_state() away from driver code. > > Entire series available here: > git://github.com/vsyrjala/linux.git atomic_plane_helper_clip > > Cc: Archit Taneja <architt at codeaurora.org> > Cc: Ben Skeggs <bskeggs at redhat.com> > Cc: Brian Starkey <brian.starkey at arm.com> > Cc: CK Hu <ck.hu at mediatek.com> > Cc: Daniel Vetter <daniel at ffwll.ch> > Cc: freedreno at lists.freedesktop.org > Cc: Laurent Pinchart <laurent.pinchart at ideasonboard.com> > Cc: linux-amlogic at lists.infradead.org > Cc: linux-arm-msm at vger.kernel.org > Cc: linux-tegra at vger.kernel.org > Cc: Liviu Dudau <liviu.dudau at arm.com> > Cc: Mali DP Maintainers <malidp at foss.arm.com> > Cc: Mark Yao <mark.yao at rock-chips.com> > Cc: Neil Armstrong <narmstrong at baylibre.com> > Cc: Noralf Trønnes <noralf at tronnes.org> > Cc: nouveau at lists.freedesktop.org > Cc: Philipp Zabel <p.zabel at pengutronix.de> > Cc: Rob Clark <robdclark at gmail.com> > Cc: Shawn Guo <shawnguo at kernel.org> > Cc: Sinclair Yeh <syeh at vmware.com> > Cc: Thierry Reding <thierry.reding at gmail.com> > Cc: Thomas Hellstrom <thellstrom at vmware.com> > Cc: VMware Graphics <linux-graphics-maintainer at vmware.com> > > Ville Syrjälä (15): > drm/i915: Reject odd pipe source width with double wide/dual link > drm/i915: Use drm_mode_get_hv_timing() to populate plane clip > rectangle > drm/arm/hdlcd: Use drm_mode_get_hv_timing() to populate plane clip > rectangle > drm/arm/mali-dp: Use drm_mode_get_hv_timing() to populate plane clip > rectangle > drm/simple_kms_helper: Use drm_mode_get_hv_timing() to populate plane > clip rectangle > drm/imx: Use drm_mode_get_hv_timing() to populate plane clip rectangle > drm/mediatek: Use drm_mode_get_hv_timing() to populate plane clip > rectangle > drm/meson: Use drm_mode_get_hv_timing() to populate plane clip > rectangle > drm/msm/mdp5: Use drm_mode_get_hv_timing() to populate plane clip > rectangle > drm/nouveau/kms/nv50: Use drm_mode_get_hv_timing() to populate plane > clip rectangle > drm/rockchip: Use drm_mode_get_hv_timing() to populate plane clip > rectangle > drm/tegra/dc: Use drm_mode_get_hv_timing() to populate plane clip > rectangle > drm/vmwgfx: Use drm_mode_get_hv_timing() to populate plane clip > rectangle > drm/zte: Use drm_mode_get_hv_timing() to populate plane clip rectangleEverything up to here pushed to drm-misc-next. Thanks for the reviews. There have been a few new users of the clip helper so I'll have to take care of those and respin the final patch. Also armada looks broken to me since it has started to use the atomic version of the helper without actually being an atomic driver. So I'll have to figure out what's going on there as well.> drm: Don't pass clip to drm_atomic_helper_check_plane_state() > > drivers/gpu/drm/arm/hdlcd_crtc.c | 6 +----- > drivers/gpu/drm/arm/malidp_planes.c | 5 +---- > drivers/gpu/drm/armada/armada_overlay.c | 2 +- > drivers/gpu/drm/drm_atomic_helper.c | 12 +++++++----- > drivers/gpu/drm/drm_plane_helper.c | 11 +++-------- > drivers/gpu/drm/drm_simple_kms_helper.c | 5 ----- > drivers/gpu/drm/i915/intel_atomic_plane.c | 8 -------- > drivers/gpu/drm/i915/intel_display.c | 12 +++++++----- > drivers/gpu/drm/i915/intel_drv.h | 1 - > drivers/gpu/drm/i915/intel_sprite.c | 8 ++++++-- > drivers/gpu/drm/imx/ipuv3-plane.c | 7 +------ > drivers/gpu/drm/mediatek/mtk_drm_plane.c | 6 +----- > drivers/gpu/drm/meson/meson_plane.c | 6 +----- > drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 14 ++------------ > drivers/gpu/drm/nouveau/nv50_display.c | 8 -------- > drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 8 +------- > drivers/gpu/drm/tegra/dc.c | 8 +------- > drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 8 +------- > drivers/gpu/drm/zte/zx_plane.c | 15 +-------------- > include/drm/drm_atomic_helper.h | 1 - > include/drm/drm_plane_helper.h | 1 - > 21 files changed, 35 insertions(+), 117 deletions(-) > > -- > 2.13.6-- Ville Syrjälä Intel OTC
Apparently Analagous Threads
- [PATCH 5/5] drm: Don't pass clip to drm_atomic_helper_check_plane_state()
- [PATCH 5/5] drm: Don't pass clip to drm_atomic_helper_check_plane_state()
- [PATCH 00/15] drm: More plane clipping polish
- [PATCH 5/5] drm: Don't pass clip to drm_atomic_helper_check_plane_state()
- [PATCH] drm/virtio: add plane check