Message ID | 20220225075150.2729401-1-s.hauer@pengutronix.de (mailing list archive) |
---|---|
Headers | show |
Series | drm/rockchip: RK356x VOP2 support | expand |
Tested this Series on my rk3568 Bananapi R2 Pro v00
Tested-by: Frank Wunderlich <frank-w@public-files.de>
regards Frank
Hi Andy, On Mon, Mar 07, 2022 at 08:18:08PM +0800, Andy Yan wrote: > Hi Sascha: > > On 2/25/22 15:51, Sascha Hauer wrote: > > From: Andy Yan <andy.yan@rock-chips.com> > > > > The VOP2 unit is found on Rockchip SoCs beginning with rk3566/rk3568. > > It replaces the VOP unit found in the older Rockchip SoCs. > > > > This driver has been derived from the downstream Rockchip Kernel and > > heavily modified: > > > > - All nonstandard DRM properties have been removed > > - dropped struct vop2_plane_state and pass around less data between > > functions > > - Dropped all DRM_FORMAT_* not known on upstream > > - rework register access to get rid of excessively used macros > > - Drop all waiting for framesyncs > > > > The driver is tested with HDMI and MIPI-DSI display on a RK3568-EVB > > board. Overlay support is tested with the modetest utility. AFBC support > > on the cluster windows is tested with weston-simple-dmabuf-egl on > > weston using the (yet to be upstreamed) panfrost driver support. > > > When run a weston 10.0.0: I used weston 9.0.90 during testing. I'll try to reproduce the issue with weston 10. Could you maybe have a look at the HCLK issue we are discussing? This thread could use some input from someone who has contact to the hardware guys. Regards, Sascha
Hi Andy, On Mon, 7 Mar 2022 at 12:18, Andy Yan <andy.yan@rock-chips.com> wrote: > On 2/25/22 15:51, Sascha Hauer wrote: > > The VOP2 unit is found on Rockchip SoCs beginning with rk3566/rk3568. > > It replaces the VOP unit found in the older Rockchip SoCs. > > > > This driver has been derived from the downstream Rockchip Kernel and > > heavily modified: > > > > - All nonstandard DRM properties have been removed > > - dropped struct vop2_plane_state and pass around less data between > > functions > > - Dropped all DRM_FORMAT_* not known on upstream > > - rework register access to get rid of excessively used macros > > - Drop all waiting for framesyncs > > > > The driver is tested with HDMI and MIPI-DSI display on a RK3568-EVB > > board. Overlay support is tested with the modetest utility. AFBC support > > on the cluster windows is tested with weston-simple-dmabuf-egl on > > weston using the (yet to be upstreamed) panfrost driver support. > > When run a weston 10.0.0: > > # export XDG_RUNTIME_DIR=/tmp > # weston --backend=drm-backend.so --use-pixma --tty=2 > --continue=without-input > > I got the following error: > > drm_atomic_check_only [PLANE:31:Smart0-win0] CRTC set but no FB Can you please start Weston with --logger-scopes=log,drm-backend and attach the output? Cheers, Daniel
Hi Daniel: On 3/7/22 21:09, Daniel Stone wrote: > Hi Andy, > > On Mon, 7 Mar 2022 at 12:18, Andy Yan <andy.yan@rock-chips.com> wrote: >> On 2/25/22 15:51, Sascha Hauer wrote: >>> The VOP2 unit is found on Rockchip SoCs beginning with rk3566/rk3568. >>> It replaces the VOP unit found in the older Rockchip SoCs. >>> >>> This driver has been derived from the downstream Rockchip Kernel and >>> heavily modified: >>> >>> - All nonstandard DRM properties have been removed >>> - dropped struct vop2_plane_state and pass around less data between >>> functions >>> - Dropped all DRM_FORMAT_* not known on upstream >>> - rework register access to get rid of excessively used macros >>> - Drop all waiting for framesyncs >>> >>> The driver is tested with HDMI and MIPI-DSI display on a RK3568-EVB >>> board. Overlay support is tested with the modetest utility. AFBC support >>> on the cluster windows is tested with weston-simple-dmabuf-egl on >>> weston using the (yet to be upstreamed) panfrost driver support. >> When run a weston 10.0.0: >> >> # export XDG_RUNTIME_DIR=/tmp >> # weston --backend=drm-backend.so --use-pixma --tty=2 >> --continue=without-input >> >> I got the following error: >> >> drm_atomic_check_only [PLANE:31:Smart0-win0] CRTC set but no FB > Can you please start Weston with --logger-scopes=log,drm-backend and > attach the output? Please see the weston ouput here[0] This failed is from drm_atom_plane_check: both CRTC and FB must be set or neither. static int drm_atomic_plane_check(const struct drm_plane_state *old_plane_state, const struct drm_plane_state *new_plane_state) { struct drm_plane *plane = new_plane_state->plane; struct drm_crtc *crtc = new_plane_state->crtc; const struct drm_framebuffer *fb = new_plane_state->fb; unsigned int fb_width, fb_height; struct drm_mode_rect *clips; uint32_t num_clips; int ret; /* either *both* CRTC and FB must be set, or neither */ if (crtc && !fb) { drm_dbg_atomic(plane->dev, "[PLANE:%d:%s] CRTC set but no FB\n", plane->base.id, plane->name); return -EINVAL; } else if (fb && !crtc) { drm_dbg_atomic(plane->dev, "[PLANE:%d:%s] FB set but no CRTC\n", plane->base.id, plane->name); return -EINVAL; } [0]https://pastebin.com/mGXKqD2S > Cheers, > Daniel
On Tue, 8 Mar 2022 at 08:42, Andy Yan <andy.yan@rock-chips.com> wrote: > On 3/7/22 21:09, Daniel Stone wrote: > > On Mon, 7 Mar 2022 at 12:18, Andy Yan <andy.yan@rock-chips.com> wrote: > >> When run a weston 10.0.0: > >> > >> # export XDG_RUNTIME_DIR=/tmp > >> # weston --backend=drm-backend.so --use-pixma --tty=2 > >> --continue=without-input > >> > >> I got the following error: > >> > >> drm_atomic_check_only [PLANE:31:Smart0-win0] CRTC set but no FB > > Can you please start Weston with --logger-scopes=log,drm-backend and > > attach the output? > > Please see the weston ouput here[0] Are you running with musl perhaps? Either way, please make sure your libdrm build includes commit 79fa377c8bdc84fde99c6a6ac17e554971c617be. Cheers, Daniel
Hi Daniel: On 3/8/22 22:04, Daniel Stone wrote: > On Tue, 8 Mar 2022 at 08:42, Andy Yan <andy.yan@rock-chips.com> wrote: >> On 3/7/22 21:09, Daniel Stone wrote: >>> On Mon, 7 Mar 2022 at 12:18, Andy Yan <andy.yan@rock-chips.com> wrote: >>>> When run a weston 10.0.0: >>>> >>>> # export XDG_RUNTIME_DIR=/tmp >>>> # weston --backend=drm-backend.so --use-pixma --tty=2 >>>> --continue=without-input >>>> >>>> I got the following error: >>>> >>>> drm_atomic_check_only [PLANE:31:Smart0-win0] CRTC set but no FB >>> Can you please start Weston with --logger-scopes=log,drm-backend and >>> attach the output? >> Please see the weston ouput here[0] > Are you running with musl perhaps? Do you mean the C library? I chose uClib-ng in buildroot, not use musl. > Either way, please make sure your > libdrm build includes commit 79fa377c8bdc84fde99c6a6ac17e554971c617be. The upstream buildroot use libdrm2.4.109, this commit[0] if from libdrm2.4.110 I cherry-pick this patch to my local libdrm, but has no effect, still has "atomic: couldn't commit new state" error. I have do a search in libdrm and weston, but find no one call drmModeAtomicMerge, is that right? [0]https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/167 > > Cheers, > Daniel
Hi Daniel: On 3/9/22 10:03, Andy Yan wrote: > Hi Daniel: > > On 3/8/22 22:04, Daniel Stone wrote: >> On Tue, 8 Mar 2022 at 08:42, Andy Yan <andy.yan@rock-chips.com> wrote: >>> On 3/7/22 21:09, Daniel Stone wrote: >>>> On Mon, 7 Mar 2022 at 12:18, Andy Yan <andy.yan@rock-chips.com> wrote: >>>>> When run a weston 10.0.0: >>>>> >>>>> # export XDG_RUNTIME_DIR=/tmp >>>>> # weston --backend=drm-backend.so --use-pixma --tty=2 >>>>> --continue=without-input >>>>> >>>>> I got the following error: >>>>> >>>>> drm_atomic_check_only [PLANE:31:Smart0-win0] CRTC set but no FB >>>> Can you please start Weston with --logger-scopes=log,drm-backend and >>>> attach the output? >>> Please see the weston ouput here[0] >> Are you running with musl perhaps? > Do you mean the C library? I chose uClib-ng in buildroot, not use musl. >> Either way, please make sure your >> libdrm build includes commit 79fa377c8bdc84fde99c6a6ac17e554971c617be. > > > The upstream buildroot use libdrm2.4.109, this commit[0] if from > libdrm2.4.110 > > I cherry-pick this patch to my local libdrm, but has no effect, still > has "atomic: couldn't commit new state" error. > > I have do a search in libdrm and weston, but find no one call > drmModeAtomicMerge, is that right? > > [0]https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/167 > With your patch applied from libdrm2.4.110, I do a make clean for buidlroot, than build it again, That's take effect. I can see only the second value (non-zero FB) of plane 31 commit to the kernel. So this is works. Maybe the buidroot should update libdrm package. Thank you. >> >> Cheers, >> Daniel > > _______________________________________________ > Linux-rockchip mailing list > Linux-rockchip@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-rockchip
Hi Daniel: Remember you said our downstream vop2 driver is very slow on weston. Would you please share the case you run ? or how can i test frame rate on weston? On 3/9/22 15:37, Andy Yan wrote: > Hi Daniel: > > On 3/9/22 10:03, Andy Yan wrote: >> Hi Daniel: >> >> On 3/8/22 22:04, Daniel Stone wrote: >>> On Tue, 8 Mar 2022 at 08:42, Andy Yan <andy.yan@rock-chips.com> wrote: >>>> On 3/7/22 21:09, Daniel Stone wrote: >>>>> On Mon, 7 Mar 2022 at 12:18, Andy Yan <andy.yan@rock-chips.com> >>>>> wrote: >>>>>> When run a weston 10.0.0: >>>>>> >>>>>> # export XDG_RUNTIME_DIR=/tmp >>>>>> # weston --backend=drm-backend.so --use-pixma --tty=2 >>>>>> --continue=without-input >>>>>> >>>>>> I got the following error: >>>>>> >>>>>> drm_atomic_check_only [PLANE:31:Smart0-win0] CRTC set but no FB >>>>> Can you please start Weston with --logger-scopes=log,drm-backend and >>>>> attach the output? >>>> Please see the weston ouput here[0] >>> Are you running with musl perhaps? >> Do you mean the C library? I chose uClib-ng in buildroot, not use musl. >>> Either way, please make sure your >>> libdrm build includes commit 79fa377c8bdc84fde99c6a6ac17e554971c617be. >> >> >> The upstream buildroot use libdrm2.4.109, this commit[0] if from >> libdrm2.4.110 >> >> I cherry-pick this patch to my local libdrm, but has no effect, still >> has "atomic: couldn't commit new state" error. >> >> I have do a search in libdrm and weston, but find no one call >> drmModeAtomicMerge, is that right? >> >> [0]https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/167 >> > > With your patch applied from libdrm2.4.110, I do a make clean for > buidlroot, than build it again, That's take effect. > > I can see only the second value (non-zero FB) of plane 31 commit to > the kernel. So this is works. > > Maybe the buidroot should update libdrm package. > > Thank you. > >>> >>> Cheers, >>> Daniel >> >> _______________________________________________ >> Linux-rockchip mailing list >> Linux-rockchip@lists.infradead.org >> http://lists.infradead.org/mailman/listinfo/linux-rockchip
Hi Andy, On Mon, 14 Mar 2022 at 11:02, Andy Yan <andy.yan@rock-chips.com> wrote: > Remember you said our downstream vop2 driver is very slow on weston. > > Would you please share the case you run ? or how can i test frame rate > on weston? We were able to observe this by just using either waylandsink (using dmabuf from the V4L2 rkvdec/rkvpu drivers), or even weston-simple-egl. I have not been able to do a full review of Sascha's submission, but from what I've seen of it, it should have fixed those issues. (I don't have RK3568 hardware to hand anymore.) Cheers, Daniel