From: Daniel Vetter <daniel@ffwll.ch> To: Mark yao <mark.yao@rock-chips.com> Cc: heiko@sntech.de, Boris BREZILLON <boris.brezillon@free-electrons.com>, David Airlie <airlied@gmail.com>, Rob Clark <robdclark@gmail.com>, Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>, Mark Rutland <mark.rutland@arm.com>, Ian Campbell <ijc+devicetree@hellion.org.uk>, Kumar Gala <galak@codeaurora.org>, Randy Dunlap <rdunlap@infradead.org>, Grant Likely <grant.likely@linaro.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, John Stultz <john.stultz@linaro.org>, Rom Lemarchand <romlem@google.com>, linux-doc@vger.kernel.org, kever.yang@rock-chips.com, dri-devel@lists.freedesktop.org, dianders@chromium.org, xjq@rock-chips.com, zyw@rock-chips.com, cym@rock-chips.com, linux-rockchip@lists.infradead.org, kfx@rock-chips.com, wxt@rock-chips.com, huangtao@rock-chips.com, devicetree@vger.kernel.org, yxj@rock-chips.com, marcheu@chromium.org, xxm@rock-chips.com, xw@rock-chips.com, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, cf@rock-chips.com Subject: Re: [PATCH v2 1/5] drm/rockchip: Add basic drm driver Date: Thu, 18 Sep 2014 16:52:14 +0200 [thread overview] Message-ID: <20140918145214.GA15734@phenom.ffwll.local> (raw) In-Reply-To: <1411032991-9280-1-git-send-email-mark.yao@rock-chips.com> On Thu, Sep 18, 2014 at 05:36:31PM +0800, Mark yao wrote: > This patch adds the basic structure of a DRM Driver for Rockchip Socs. > > Signed-off-by: Mark yao <mark.yao@rock-chips.com> > --- > Changes in v2: > - use the component framework to defer main drm driver probe > until all VOP devices have been probed. > - use dma-mapping API with ARM_DMA_USE_IOMMU, create dma mapping by > master device and each vop device can shared the drm dma mapping. > - use drm_crtc_init_with_planes and drm_universal_plane_init. > - remove unnecessary middle layers. > - add cursor set, move funcs to rockchip drm crtc. > - use vop reset at first init > - reference framebuffer when used and unreference when swap out vop > > +static const struct drm_crtc_funcs rockchip_crtc_funcs = { > + .set_config = drm_crtc_helper_set_config, > + .page_flip = rockchip_drm_crtc_page_flip, > + .destroy = rockchip_drm_crtc_destroy, > + .cursor_set = vop_crtc_cursor_set, > + .cursor_move = vop_crtc_cursor_move, If you expose your cursor plane as a universal you don't need to implement these two cursor functions at all. Actually the core never calls them, see drm_mode_cursor_universal. So if you want to expose cursors, please use universal cursor plane support (like i915). In general that's how new drivers should expose cursors since without universal planes support cursors will not be supported with the atomic ioctl. Since your cursor code just calls the relevant plane functions that should even simplify your driver ;-) Cheers, Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
WARNING: multiple messages have this Message-ID (diff)
From: Daniel Vetter <daniel@ffwll.ch> To: Mark yao <mark.yao@rock-chips.com> Cc: heiko@sntech.de, Boris BREZILLON <boris.brezillon@free-electrons.com>, David Airlie <airlied@gmail.com>, Rob Clark <robdclark@gmail.com>, Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>, Mark Rutland <mark.rutland@arm.com>, Ian Campbell <ijc+devicetree@hellion.org.uk>, Kumar Gala <galak@codeaurora.org>, Randy Dunlap <rdunlap@infradead.org>, Grant Likely <grant.likely@linaro.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, John Stultz <john.stultz@linaro.org>, Rom Lemarchand <romlem@google.com>, linux-doc@vger.kernel.org, kever.yang@rock-chips.com, dri-devel@lists.freedesktop.org, dianders@chromium.org, xjq@rock-chips.com, zyw@rock-chips.com, cym@rock-chips.com, linux-rockchip@lists.infradead.org, kfx@rock-chips.com, wxt@rock-chips.com, huangtao@rock-chips.com, devicetree@vger.kernel.org, yxj@rock-chips.com, marcheu@chromium.org, xxm@rock-chi Subject: Re: [PATCH v2 1/5] drm/rockchip: Add basic drm driver Date: Thu, 18 Sep 2014 16:52:14 +0200 [thread overview] Message-ID: <20140918145214.GA15734@phenom.ffwll.local> (raw) In-Reply-To: <1411032991-9280-1-git-send-email-mark.yao@rock-chips.com> On Thu, Sep 18, 2014 at 05:36:31PM +0800, Mark yao wrote: > This patch adds the basic structure of a DRM Driver for Rockchip Socs. > > Signed-off-by: Mark yao <mark.yao@rock-chips.com> > --- > Changes in v2: > - use the component framework to defer main drm driver probe > until all VOP devices have been probed. > - use dma-mapping API with ARM_DMA_USE_IOMMU, create dma mapping by > master device and each vop device can shared the drm dma mapping. > - use drm_crtc_init_with_planes and drm_universal_plane_init. > - remove unnecessary middle layers. > - add cursor set, move funcs to rockchip drm crtc. > - use vop reset at first init > - reference framebuffer when used and unreference when swap out vop > > +static const struct drm_crtc_funcs rockchip_crtc_funcs = { > + .set_config = drm_crtc_helper_set_config, > + .page_flip = rockchip_drm_crtc_page_flip, > + .destroy = rockchip_drm_crtc_destroy, > + .cursor_set = vop_crtc_cursor_set, > + .cursor_move = vop_crtc_cursor_move, If you expose your cursor plane as a universal you don't need to implement these two cursor functions at all. Actually the core never calls them, see drm_mode_cursor_universal. So if you want to expose cursors, please use universal cursor plane support (like i915). In general that's how new drivers should expose cursors since without universal planes support cursors will not be supported with the atomic ioctl. Since your cursor code just calls the relevant plane functions that should even simplify your driver ;-) Cheers, Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
next prev parent reply other threads:[~2014-09-18 14:52 UTC|newest] Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-08-04 4:41 [PATCH 0/9] Add drm driver for Rockchip Socs mark yao 2014-08-04 4:45 ` [PATCH 1/9] drm: " mark yao 2014-08-04 14:46 ` Daniel Vetter 2014-08-04 14:46 ` Daniel Vetter 2014-08-07 8:32 ` mark yao 2014-08-04 4:47 ` [PATCH 2/9] Add devicetree bindings for panels used by the Rockchip DRM mark yao 2014-08-04 4:47 ` mark yao 2014-08-04 4:48 ` [PATCH 3/9] drm: add driver " mark yao 2014-08-04 4:48 ` mark yao 2014-08-04 4:50 ` [PATCH 4/9] Add devicetree bindings for Rockchip lcd controller mark yao 2014-08-04 4:50 ` mark yao 2014-08-04 4:51 ` [PATCH 5/9] drm: add Rockchip rk3288 lcd controller driver mark yao 2014-08-04 4:51 ` mark yao 2014-08-04 4:53 ` [PATCH 6/9] Add devicetree bindings for Rockchip Soc LVDS mark yao 2014-08-04 4:53 ` mark yao 2014-08-04 4:54 ` [PATCH 7/9] drm: add Rockchip Soc rk3288 lvds connector mark yao 2014-08-04 4:54 ` mark yao 2014-08-04 4:55 ` [PATCH 8/9] Add devicetree bindings for Rockchip Soc EDP mark yao 2014-08-04 19:39 ` Heiko Stübner 2014-08-04 19:39 ` Heiko Stübner 2014-08-04 4:57 ` [PATCH 9/9] drm: add Rockchip Soc rk3288 edp connector mark yao 2014-08-04 4:57 ` mark yao 2014-09-18 9:34 ` [PATCH v2 0/5] Add drm driver for Rockchip Socs Mark yao 2014-09-18 9:34 ` Mark yao 2014-09-18 9:36 ` [PATCH v2 1/5] drm/rockchip: Add basic drm driver Mark yao 2014-09-18 9:36 ` Mark yao 2014-09-18 14:52 ` Daniel Vetter [this message] 2014-09-18 14:52 ` Daniel Vetter 2014-09-18 14:53 ` Daniel Vetter 2014-09-18 14:53 ` Daniel Vetter 2014-09-19 2:03 ` yaozq 2014-09-19 2:03 ` yaozq 2014-09-18 9:37 ` [PATCH v2 2/5] dt-bindings: video: Add for rockchip display subsytem Mark yao 2014-09-18 9:37 ` Mark yao 2014-09-18 9:39 ` [PATCH v2 3/5] dt-bindings: video: Add documentation for rockchip vop Mark yao 2014-09-18 9:41 ` [PATCH v2 4/5] dt-bindings: video: Add documentation for rockchip edp Mark yao 2014-09-18 9:42 ` [PATCH v2 5/5] drm/rockchip: Add support for Rockchip Soc EDP Mark yao 2014-09-18 9:42 ` Mark yao
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20140918145214.GA15734@phenom.ffwll.local \ --to=daniel@ffwll.ch \ --cc=airlied@gmail.com \ --cc=boris.brezillon@free-electrons.com \ --cc=cf@rock-chips.com \ --cc=cym@rock-chips.com \ --cc=devicetree@vger.kernel.org \ --cc=dianders@chromium.org \ --cc=dri-devel@lists.freedesktop.org \ --cc=galak@codeaurora.org \ --cc=grant.likely@linaro.org \ --cc=gregkh@linuxfoundation.org \ --cc=heiko@sntech.de \ --cc=huangtao@rock-chips.com \ --cc=ijc+devicetree@hellion.org.uk \ --cc=john.stultz@linaro.org \ --cc=kever.yang@rock-chips.com \ --cc=kfx@rock-chips.com \ --cc=linux-api@vger.kernel.org \ --cc=linux-doc@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-rockchip@lists.infradead.org \ --cc=marcheu@chromium.org \ --cc=mark.rutland@arm.com \ --cc=mark.yao@rock-chips.com \ --cc=pawel.moll@arm.com \ --cc=rdunlap@infradead.org \ --cc=robdclark@gmail.com \ --cc=robh+dt@kernel.org \ --cc=romlem@google.com \ --cc=wxt@rock-chips.com \ --cc=xjq@rock-chips.com \ --cc=xw@rock-chips.com \ --cc=xxm@rock-chips.com \ --cc=yxj@rock-chips.com \ --cc=zyw@rock-chips.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.