On Tue, May 24, 2016 at 10:23 PM, Philipp Zabel <p.zabel@xxxxxxxxxxxxxx> wrote: > Am Dienstag, den 24.05.2016, 18:10 +0800 schrieb Liu Ying: >> Use the drm_plane_helper_update/disable() and drm_helper_crtc_mode_set() >> transistional atomic helpers. The crtc->mode_set_nofb callback is added >> so that the primary plane is no longer tied to the CRTC. Check/update >> logics are separated to make sure crtc->mode_set_nofb and plane->atomic_update >> are always successful. Also, some necessary logics are tweaked for a smooth >> transition. >> >> Signed-off-by: Liu Ying <gnuiyl@xxxxxxxxx> >> --- >> drivers/gpu/drm/imx/ipuv3-crtc.c | 173 +++++++------ >> drivers/gpu/drm/imx/ipuv3-plane.c | 516 +++++++++++++++++++++++--------------- >> drivers/gpu/drm/imx/ipuv3-plane.h | 14 +- >> drivers/gpu/ipu-v3/ipu-dc.c | 5 +- >> drivers/gpu/ipu-v3/ipu-di.c | 3 - >> 5 files changed, 400 insertions(+), 311 deletions(-) >> > [...] >> diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c >> index 30cedbb..4511b84 100644 >> --- a/drivers/gpu/drm/imx/ipuv3-plane.c >> +++ b/drivers/gpu/drm/imx/ipuv3-plane.c >> @@ -16,6 +16,7 @@ >> #include <drm/drmP.h> >> #include <drm/drm_fb_cma_helper.h> >> #include <drm/drm_gem_cma_helper.h> >> +#include <drm/drm_plane_helper.h> >> >> #include "video/imx-ipu-v3.h" >> #include "ipuv3-plane.h" >> @@ -51,12 +52,15 @@ int ipu_plane_irq(struct ipu_plane *ipu_plane) >> IPU_IRQ_EOF); >> } >> >> -int ipu_plane_set_base(struct ipu_plane *ipu_plane, struct drm_framebuffer *fb, >> - int x, int y) >> +int ipu_plane_set_base(struct ipu_plane *ipu_plane, struct drm_framebuffer *fb) >> { >> - struct drm_gem_cma_object *cma_obj[3]; >> - unsigned long eba, ubo, vbo; >> + struct drm_gem_cma_object *cma_obj[3], *old_cma_obj[3]; >> + struct drm_plane_state *state = ipu_plane->base.state; >> + struct drm_framebuffer *old_fb = state->fb; >> + unsigned long eba, ubo, vbo, old_eba, old_ubo, old_vbo; > > It looks to me like eba, ubo, vbo are good candidates to be put into a > custom ipu_plane_state structure during check. Yes for the first impression. I'll think about that more. If the required change is too invasive and you accept, I'd like to customize ipu_plane_state with another patch(set) after this one is landed. Regards, Liu Ying > > regards > Philipp > _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel