[Intel-gfx] [PATCH 2/4] drm/plane-helper: Add drm_primary_helper_check_update() (v2)

2014-05-16 Thread Matt Roper
when running on Cherrytrail and then program the hardware accordingly, but that's really an extra feature beyond what I'm adding here; we'd want to add that as a follow-on patch later and come up with a whole extra set of tests to exercise it. I'd rather focus on getting this general i915 su

[RFC 4/4] drm/i915: Switch to unified plane cursor handling

2014-05-15 Thread Matt Roper
was called. The aim here is to transition to the universal plane interface with minimal code change. There's a lot of cleanup that can be done (e.g., using state stored in crtc->cursor->fb rather than intel_crtc) that is left to future patches. Signed-off-by: Matt Roper --- drivers/gpu/dr

[RFC 3/4] drm/i915: Add intel_crtc_cursor_set_obj() to set cursor buffer

2014-05-15 Thread Matt Roper
this new function. This refactoring is in preparation for the universal plane cursor support where we'll want to update the cursor with an actual GEM buffer object (obtained via drm_framebuffer) rather than a userspace handle. Signed-off-by: Matt Roper --- drivers/gpu/drm/i915/intel_display.c

[RFC 2/4] drm: Allow drivers to register cursor planes with crtc

2014-05-15 Thread Matt Roper
Universal plane support had placeholders for cursor planes, but didn't actually do anything with them. Save the cursor plane reference inside the crtc and update the cursor plane parameter from void* to drm_plane. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 5 - include/drm

[RFC 1/4] drm: Support legacy cursor ioctls via universal planes when possible

2014-05-15 Thread Matt Roper
and universal cursor calls. With this patch, a driver that switches to universal cursor support may assume that all cursor buffers are wrapped in a drm_framebuffer and can rely on framebuffer reference counting for all cursor operations. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 108

[RFC 0/4] Cursor support with universal planes

2014-05-15 Thread Matt Roper
nformation can be also be derived from crtc->cursor->fb. Matt Roper (4): drm: Support legacy cursor ioctls via universal planes when possible drm: Allow drivers to register cursor planes with crtc drm/i915: Add intel_crtc_cursor_set_obj() to set cursor buffer drm/i915: Switch to unif

[PATCH] drm/plane: Fix a couple of checkpatch warnings

2014-05-13 Thread Matt Roper
tart of a line > #42: FILE: drivers/gpu/drm/drm_plane_helper.c:42: > + DRM_FORMAT_ARGB,$ > > Signed-off-by: Thierry Reding Reviewed-by: Matt Roper > --- > drivers/gpu/drm/drm_plane_helper.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git

[PATCH] drm/plane: Fix sparse warnings

2014-05-13 Thread Matt Roper
mary_helper_create_plane' was here >struct drm_plane *drm_primary_helper_create_plane(struct drm_device > *dev, > ^ > > Which can easily be fixed by making the signatures of the implementation > and the prototype match. > > Signed-off-by: Thi

[PATCH 2/4] drm/plane-helper: Add drm_primary_helper_check_update() (v2)

2014-04-30 Thread Matt Roper
: dri-devel at lists.freedesktop.org Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_plane_helper.c | 123 - include/drm/drm_plane_helper.h | 24 +++- 2 files changed, 116 insertions(+), 31 deletions(-) diff --git a/drivers/gpu/drm/drm_plane_helper.c

[PATCH 1/4] drm: Check CRTC compatibility in setplane

2014-04-30 Thread Matt Roper
helper). Cc: dri-devel at lists.freedesktop.org Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 7 +++ drivers/gpu/drm/drm_plane_helper.c | 6 -- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index

[Intel-gfx] [PATCH 1/3] drm: Check CRTC compatibility in setplane

2014-04-23 Thread Matt Roper
On Wed, Apr 23, 2014 at 08:03:50PM +0200, Daniel Vetter wrote: > On Wed, Apr 23, 2014 at 10:03:59AM -0700, Matt Roper wrote: > > The DRM core setplane code should check that the plane is usable on the > > specified CRTC before calling into the driver. > > > > Pri

[PATCH 2/3] drm/plane-helper: Add drm_primary_helper_check_update()

2014-04-23 Thread Matt Roper
by Ville Syrj?l?. Cc: Ville Syrj?l? Cc: dri-devel at lists.freedesktop.org Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_plane_helper.c | 148 + include/drm/drm_plane_helper.h | 9 +++ 2 files changed, 128 insertions(+), 29 deletions(-) diff --git

[PATCH 1/3] drm: Check CRTC compatibility in setplane

2014-04-23 Thread Matt Roper
helper). Cc: dri-devel at lists.freedesktop.org Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 7 +++ drivers/gpu/drm/drm_plane_helper.c | 6 -- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index

[PATCH] drm: Simplify fb refcounting rules around ->update_plane

2014-04-23 Thread Matt Roper
: Keep still useful comments about directly calling ->set_config, > which I should have done for v4 already. Requested by Matt. > > Cc: Thierry Reding > Cc: Ville Syrj?l? > Cc: Matt Roper > Signed-off-by: Daniel Vetter Reviewed-by: Matt Roper > --- > drivers/gpu/drm/d

[PATCH] drm/tegra: restrict plane loops to legacy planes

2014-04-23 Thread Matt Roper
On Wed, Apr 23, 2014 at 03:15:32PM +0200, Daniel Vetter wrote: > In Matt Ropers primary plane series a set of prep patches like > > commit af2b653bfb4ef40931b4d101ca842ce0c5da57ef > Author: Matt Roper > Date: Tue Apr 1 15:22:32 2014 -0700 > > drm/i915: Restrict plane

[PATCH 2/2] drm: Handle ->disable_plane failures correctly

2014-04-23 Thread Matt Roper
appen, but it might fix the fb refcount > underrun Thierry is seeing. Matt Roper spotted this issue. > > Cc: Thierry Reding > Cc: Ville Syrj?l? > Cc: Matt Roper > Signed-off-by: Daniel Vetter Reviewed-by: Matt Roper > --- > drivers/gpu/drm/drm_crtc.c | 14

[PATCH 1/2] drm: Simplify fb refcounting rules around ->update_plane

2014-04-23 Thread Matt Roper
mode_setplane (Ville). Also polish > the commit message a bit. > > v4: Also fix up the handling of ->disable_plane in > drm_plane_force_disable. The issue was that we didn't save plane->fb > over the ->disable_plane call. Just paranoia, nothing relies on this. > >

[PATCH] drm: Simplify fb refcounting rules around ->update_plane

2014-04-22 Thread Matt Roper
> - * cross-CRTC fb refcounting to accomodate stealing connectors. > - * drm_mode_setplane() already handles the basic refcounting for the > - * framebuffers involved in this operation. > - */ I think there's still some value in the part of this comment that explains why w

[PATCH] drm/plane-helper: Don't fake-implement primary plane disabling

2014-04-15 Thread Matt Roper
. actually disabling > the primary plane without disabling the CRTC) is really simple, at > least if all the hw needs is flipping a bit. The big task is > auditing all the interactions with other ioctls when the CRTC is on > but there's no primary plane (e.g. pageflips). And some of

[PATCH] drm/plane_helper: don't disable plane in destroy function

2014-04-11 Thread Matt Roper
trying to disable things harder is a bit a bug. Caught by Thierry > since it resulted in some mode_config.mutex locking backtraces. > > Cc: Thierry Reding > Cc: Matt Roper > Signed-off-by: Daniel Vetter Reviewed-by: Matt Roper > --- > drivers/gpu/drm/drm_plane_helpe

[PATCH libdrm] drm: Add universal plane capability bit and plane type enums

2014-04-10 Thread Matt Roper
Signed-off-by: Matt Roper --- include/drm/drm.h | 8 xf86drmMode.h | 4 2 files changed, 12 insertions(+) diff --git a/include/drm/drm.h b/include/drm/drm.h index f0b4c16..229a29f 100644 --- a/include/drm/drm.h +++ b/include/drm/drm.h @@ -627,6 +627,14 @@ struct drm_get_cap

[PATCH] drm/plane-helper: Fix primary plane scaling check

2014-04-10 Thread Matt Roper
The src_w / src_h parameters to update_plane include a subpixel offset; we need to shift off the subpixel bits before comparing to CRTC size when checking for primary plane scaling. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_plane_helper.c | 2 ++ 1 file changed, 2 insertions(+) diff

[PULL] Universal plane support

2014-04-01 Thread Matt Roper
plane helper library (2014-04-01 20:18:29 -0400) Matt Roper (13): drm: Add support for multiple plane types (v2) drm/exynos: Restrict plane loops to only operate on overlay planes (v2) drm/i915: Restrict plane loops

[PATCHv5 14/14] drm/doc: Update plane documentation and add plane helper library

2014-04-01 Thread Matt Roper
Signed-off-by: Matt Roper --- Documentation/DocBook/drm.tmpl | 50 -- 1 file changed, 43 insertions(+), 7 deletions(-) diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl index 9f5457a..702c4474 100644 --- a/Documentation/DocBook

[PATCHv5 13/14] drm: Allow userspace to ask for universal plane list (v2)

2014-04-01 Thread Matt Roper
Userspace clients which wish to receive all DRM planes (primary and cursor planes in addition to the traditional overlay planes) may set the DRM_CLIENT_CAP_UNIVERSAL_PLANES capability. v2: Hide behind drm.universal_planes module option [suggested by Daniel Vetter] Signed-off-by: Matt Roper

[PATCHv5 12/14] drm: Remove unused drm_crtc->fb

2014-04-01 Thread Matt Roper
Signed-off-by: Matt Roper --- include/drm/drm_crtc.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index f147a84..c061bb3 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -311,9 +311,6 @@ struct drm_crtc { struct

[PATCHv5 11/14] drm: Replace crtc fb with primary plane fb (v3)

2014-04-01 Thread Matt Roper
s that were missed in the first patch iteration. [Rob Clark] Signed-off-by: Matt Roper --- drivers/gpu/drm/armada/armada_crtc.c | 23 ++--- drivers/gpu/drm/ast/ast_mode.c | 12 +-- drivers/gpu/drm/bochs/bochs_kms.c| 4 +- drivers/gpu/drm/cirrus/cirrus_mode.c

[PATCHv5 10/14] drm/msm: Switch to universal plane API's

2014-04-01 Thread Matt Roper
Use drm_universal_plane_init() and drm_crtc_init_with_planes() rather than the legacy drm_plane_init() / drm_crtc_init(). This will ensure that the proper primary plane is registered with the DRM (and eventually exposed to userspace in future patches). Cc: Rob Clark Signed-off-by: Matt Roper

[PATCHv5 09/14] drm: Add drm_crtc_init_with_planes() (v2)

2014-04-01 Thread Matt Roper
-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 19 +++ drivers/gpu/drm/drm_plane_helper.c | 21 + include/drm/drm_crtc.h | 11 +++ 3 files changed, 47 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu

[PATCHv5 08/14] drm: Add plane type property (v2)

2014-04-01 Thread Matt Roper
Add a plane type property to allow userspace to distinguish plane types. v2: Driver-specific churn eliminated now that drm_plane_init() and drm_universal_plane_init() were separated out in a previous patch. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 23

[PATCHv5 07/14] drm: Add drm_universal_plane_init()

2014-04-01 Thread Matt Roper
is_primary' under the assumption that all existing uses of private planes were representing primary planes. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 84 ++ include/drm/drm_crtc.h | 9 - 2 files changed, 63 insertions(+), 30 deletions

[PATCHv5 06/14] drm: Add primary plane helpers (v3)

2014-04-01 Thread Matt Roper
a minimal format list that should work on all hardware/drivers. Drivers may call this function with a more accurate plane list to enable additional formats they can support. Signed-off-by: Matt Roper --- drivers/gpu/drm/Makefile | 3 +- drivers/gpu/drm/drm_plane_helper.c | 312

[PATCHv5 05/14] drm: Make drm_crtc_check_viewport non-static

2014-04-01 Thread Matt Roper
This function will be used by the universal plane helpers and may also be useful for individual drivers. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 20 +--- include/drm/drm_crtc.h | 4 2 files changed, 17 insertions(+), 7 deletions(-) diff --git

[PATCHv5 04/14] drm/shmobile: Restrict plane loops to only operate on legacy planes

2014-04-01 Thread Matt Roper
Ensure that existing driver loops over all planes do not change behavior when we begin adding new types of planes (primary and cursor) to the DRM plane list in future patches. Acked-by: Laurent Pinchart Signed-off-by: Matt Roper --- drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 2 +- 1 file

[PATCHv5 03/14] drm/i915: Restrict plane loops to only operate on overlay planes (v2)

2014-04-01 Thread Matt Roper
Ensure that existing driver loops over all planes do not change behavior when we begin adding new types of planes (primary and cursor) to the DRM plane list in future patches. v2: Switch to using drm_for_each_legacy_plane() Cc: Intel Graphics Development Signed-off-by: Matt Roper --- drivers

[PATCHv5 02/14] drm/exynos: Restrict plane loops to only operate on overlay planes (v2)

2014-04-01 Thread Matt Roper
Ensure that existing driver loops over all planes do not change behavior when we begin adding new types of planes (primary and cursor) to the DRM plane list in future patches. v2: Switch to using drm_for_each_legacy_plane() Cc: Inki Dae Signed-off-by: Matt Roper --- drivers/gpu/drm/exynos

[PATCHv5 01/14] drm: Add support for multiple plane types (v2)

2014-04-01 Thread Matt Roper
Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 21 - drivers/gpu/drm/drm_fb_helper.c | 3 ++- include/drm/drm_crtc.h | 24 +++- 3 files changed, 41 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/drive

[PATCHv5 00/14] Universal plane preparation patches

2014-04-01 Thread Matt Roper
evel/2014-February/054719.html Matt Roper (14): drm: Add support for multiple plane types (v2) drm/exynos: Restrict plane loops to only operate on overlay planes (v2) drm/i915: Restrict plane loops to only operate on overlay planes (v2) drm/shmobile: Restrict plane loops to only ope

[PATCHv4 06/13] drm: Add primary plane helpers (v2)

2014-03-31 Thread Matt Roper
On Fri, Mar 28, 2014 at 09:32:06AM +0100, Daniel Vetter wrote: > On Thu, Mar 27, 2014 at 05:44:31PM -0700, Matt Roper wrote: ... > > +* N.B., we call set_config() directly here rather than using > > +* drm_mode_set_config_internal. We're reprogramming the same > &

[PATCHv4 13/13] drm: Remove unused drm_crtc->fb

2014-03-27 Thread Matt Roper
Signed-off-by: Matt Roper --- include/drm/drm_crtc.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index e7ed766..282f823 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -311,9 +311,6 @@ struct drm_crtc { struct

[PATCHv4 12/13] drm: Replace crtc fb with primary plane fb (v3)

2014-03-27 Thread Matt Roper
s that were missed in the first patch iteration. [Rob Clark] Signed-off-by: Matt Roper --- This patch will cause some heartache for tree maintainers since it's pretty much a point of no return and touches so many drivers. There's been some discussion on the mailing list about how this might be split

[PATCHv4 11/13] drm/msm: Switch to universal plane API's

2014-03-27 Thread Matt Roper
Use drm_universal_plane_init() and drm_crtc_init_with_planes() rather than the legacy drm_plane_init() / drm_crtc_init(). This will ensure that the proper primary plane is registered with the DRM (and eventually exposed to userspace in future patches). Cc: Rob Clark Signed-off-by: Matt Roper

[PATCHv4 10/13] drm: Add drm_crtc_init_with_planes()

2014-03-27 Thread Matt Roper
and no cursor plane. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 44 +--- include/drm/drm_crtc.h | 11 +++ 2 files changed, 52 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 24226de

[PATCHv4 09/13] drm: Add plane max width/height properties

2014-03-27 Thread Matt Roper
planes and mode_config.cursor_{width,height} are used for cursors; drivers should override these defaults after calling plane_init, if necessary. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 30 ++ include/drm/drm_crtc.h | 2 ++ 2 files changed, 32

[PATCHv4 08/13] drm: Add plane type property (v2)

2014-03-27 Thread Matt Roper
Add a plane type property to allow userspace to distinguish plane types. v2: Driver-specific churn eliminated now that drm_plane_init() and drm_universal_plane_init() were separated out in a previous patch. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 23

[PATCHv4 07/13] drm: Add drm_universal_plane_init()

2014-03-27 Thread Matt Roper
is_primary' under the assumption that all existing uses of private planes were representing primary planes. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 84 ++ include/drm/drm_crtc.h | 9 - 2 files changed, 63 insertions(+), 30 deletions

[PATCHv4 06/13] drm: Add primary plane helpers (v2)

2014-03-27 Thread Matt Roper
/drivers. Drivers may call this function with a more accurate plane list to enable additional formats they can support. Signed-off-by: Matt Roper --- drivers/gpu/drm/Makefile | 3 +- drivers/gpu/drm/drm_plane_helper.c | 312 + include/drm

[PATCHv4 05/13] drm: Make drm_crtc_check_viewport non-static

2014-03-27 Thread Matt Roper
This function will be used by the universal plane helpers and may also be useful for individual drivers. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 20 +--- include/drm/drm_crtc.h | 4 2 files changed, 17 insertions(+), 7 deletions(-) diff --git

[PATCHv4 04/13] drm/shmobile: Restrict plane loops to only operate on legacy planes

2014-03-27 Thread Matt Roper
Ensure that existing driver loops over all planes do not change behavior when we begin adding new types of planes (primary and cursor) to the DRM plane list in future patches. Cc: Laurent Pinchart <laurent.pinchart+renesas at ideasonboard.com> Signed-off-by: Matt Roper --- drivers/g

[PATCHv4 03/13] drm/i915: Restrict plane loops to only operate on overlay planes (v2)

2014-03-27 Thread Matt Roper
Ensure that existing driver loops over all planes do not change behavior when we begin adding new types of planes (primary and cursor) to the DRM plane list in future patches. v2: Switch to using drm_for_each_legacy_plane() Cc: Intel Graphics Development Signed-off-by: Matt Roper --- drivers

[PATCHv4 02/13] drm/exynos: Restrict plane loops to only operate on overlay planes (v2)

2014-03-27 Thread Matt Roper
Ensure that existing driver loops over all planes do not change behavior when we begin adding new types of planes (primary and cursor) to the DRM plane list in future patches. v2: Switch to using drm_for_each_legacy_plane() Cc: Inki Dae Signed-off-by: Matt Roper --- drivers/gpu/drm/exynos

[PATCHv4 01/13] drm: Add support for multiple plane types (v2)

2014-03-27 Thread Matt Roper
Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 21 - drivers/gpu/drm/drm_fb_helper.c | 3 ++- include/drm/drm_crtc.h | 24 +++- 3 files changed, 41 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/drive

[PATCHv4 00/13] Universal plane preparation patches

2014-03-27 Thread Matt Roper
reedesktop.org/archives/dri-devel/2014-March/055222.html [3] http://lists.freedesktop.org/archives/dri-devel/2014-February/054719.html [4] http://lists.freedesktop.org/archives/dri-devel/2014-March/055216.html Matt Roper (13): drm: Add support for multiple plane types (v2) drm/exynos: Restr

[RFCv3 08/14] drm: Replace crtc fb with primary plane fb (v2)

2014-03-24 Thread Matt Roper
On Wed, Mar 19, 2014 at 12:57:21PM +0100, Daniel Vetter wrote: > On Tue, Mar 18, 2014 at 05:22:53PM -0700, Matt Roper wrote: > > Now that CRTC's have a primary plane, there's no need to track the > > framebuffer in the CRTC. Replace all references to the CRTC fb > > with t

[RFCv3 03/14] drm: Add primary plane helpers

2014-03-19 Thread Matt Roper
On Wed, Mar 19, 2014 at 01:24:23PM +0100, Daniel Vetter wrote: > On Tue, Mar 18, 2014 at 05:22:48PM -0700, Matt Roper wrote: > > When we expose non-overlay planes to userspace, they will become > > accessible via standard userspace plane API's. We should be able to > > hand

[RFCv3 03/14] drm: Add primary plane helpers

2014-03-19 Thread Matt Roper
On Wed, Mar 19, 2014 at 12:28:43PM +0100, Daniel Vetter wrote: > On Tue, Mar 18, 2014 at 05:22:48PM -0700, Matt Roper wrote: ... > > + > > + /* > > +* set_config() adjusts crtc->primary->fb; however the DRM setplane > > +* code that called us expects

[RFCv3 14/14] drm/i915: Add cursor handlers and create cursor at crtc init

2014-03-18 Thread Matt Roper
Cc: Intel Graphics Development Signed-off-by: Matt Roper --- drivers/gpu/drm/i915/intel_display.c | 90 +++- 1 file changed, 89 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index f661469

[RFCv3 13/14] drm/i915: Split cursor update code from cursor ioctl handling

2014-03-18 Thread Matt Roper
common code between both interfaces. Cc: Intel Graphics Development Signed-off-by: Matt Roper --- drivers/gpu/drm/i915/intel_display.c | 197 --- drivers/gpu/drm/i915/intel_drv.h | 2 - 2 files changed, 134 insertions(+), 65 deletions(-) diff --git a/drivers

[RFCv3 12/14] drm: Specify cursor plane at CRTC initialization

2014-03-18 Thread Matt Roper
-by: Matt Roper --- drivers/gpu/drm/armada/armada_crtc.c | 2 +- drivers/gpu/drm/ast/ast_mode.c | 2 +- drivers/gpu/drm/bochs/bochs_kms.c | 2 +- drivers/gpu/drm/cirrus/cirrus_mode.c | 3 ++- drivers/gpu/drm/drm_crtc.c | 6 ++ drivers/gpu/drm/exynos

[RFCv3 11/14] drm/i915: Intel-specific primary plane handling

2014-03-18 Thread Matt Roper
Intel hardware allows the primary plane to be disabled independently of the CRTC. Provide custom primary plane handling to allow this. Cc: Intel Graphics Development Signed-off-by: Matt Roper --- drivers/gpu/drm/i915/intel_display.c | 132 ++- drivers/gpu/drm

[RFCv3 10/14] drm/i915: Rename similar plane functions to avoid confusion

2014-03-18 Thread Matt Roper
intel_disable_primary_plane() to intel_disable_primary_hw_plane() to make the two names a little more distinct. Cc: Intel Graphics Development Signed-off-by: Matt Roper --- drivers/gpu/drm/i915/i915_drv.h | 5 +-- drivers/gpu/drm/i915/intel_display.c | 60 2 files

[RFCv3 09/14] drm: Allow userspace to ask for full plane list (universal planes)

2014-03-18 Thread Matt Roper
Userspace clients which wish to receive all DRM planes (primary and cursor planes in addition to the traditional overlay planes) may set the DRM_CLIENT_CAP_UNIVERSAL_PLANES capability. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 20 +++- drivers/gpu/drm

[RFCv3 08/14] drm: Replace crtc fb with primary plane fb (v2)

2014-03-18 Thread Matt Roper
the framebuffer since the existing loop over all planes will take care of disabling the primary plane (and on most hardware, the CRTC by extension). v2: Fixup several lingering crtc->fb instances that were missed in the first patch iteration. Tested-by: Rob Clark Signed-off-by: Matt Ro

[RFCv3 07/14] drm: Specify primary plane at CRTC initialization (v2)

2014-03-18 Thread Matt Roper
Add primary plane as a parameter to drm_crtc_init() and update all existing DRM drivers to use a helper-provided primary plane. v2: Update msm & omap drivers to use existing "private" planes as primary planes instead of helper [Rob Clark] Tested-by: Rob Clark Signed-off-

[RFCv3 06/14] drm: Add plane type property

2014-03-18 Thread Matt Roper
Add a plane type property to allow userspace to distinguish plane types. The type of the plane will now be established at drm_plane_init() time (replacing the 'priv' parameter previously used). Signed-off-by: Matt Roper --- drivers/gpu/drm/armada/armada_overlay.c| 3 +- drivers/gpu/drm

[RFCv3 05/14] drm/i915: Restrict plane loops to only operate on overlay planes

2014-03-18 Thread Matt Roper
Before we add additional types of planes to the DRM plane list, ensure that existing loops over all planes continue to operate only on "overlay" planes and ignore primary & cursor planes. Cc: Intel Graphics Development Signed-off-by: Matt Roper --- drivers/gpu/drm/i915/intel

[RFCv3 04/14] drm/exynos: Restrict plane loops to only operate on overlay planes

2014-03-18 Thread Matt Roper
Before we add additional types of planes to the DRM plane list, ensure that existing loops over all planes continue to operate only on "overlay" planes and ignore primary & cursor planes. Cc: Inki Dae Signed-off-by: Matt Roper --- drivers/gpu/drm/exynos/exynos_drm_encoder.c | 6

[RFCv3 03/14] drm: Add primary plane helpers

2014-03-18 Thread Matt Roper
more efficiently, that want to use their own primary plane structure to track additional information, or that don't have the limitations assumed by the helpers are free to provide their own implementation of some or all of these handlers. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c

[RFCv3 02/14] drm: Add support for multiple plane types

2014-03-18 Thread Matt Roper
The DRM core currently only tracks "overlay"-style planes. Start refactoring the plane handling to allow other plane types (primary and cursor) to also be placed on the DRM plane list. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 21 - drive

[RFCv3 01/14] SQUASH! drm/i915: Do not dereference pointers from ring buffer in evict event

2014-03-18 Thread Matt Roper
Build fix for drm-intel-nightly: there is no 'dev' variable for TP_fast_assign(); should be vm->dev. Cc: intel-gfx at lists.freedesktop.org Signed-off-by: Matt Roper --- drivers/gpu/drm/i915/i915_trace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i

[RFCv3 00/14] Unified plane support

2014-03-18 Thread Matt Roper
l-nightly branch of the drm-intel repo. Matt Roper (14): SQUASH! drm/i915: Do not dereference pointers from ring buffer in evict event drm: Add support for multiple plane types drm: Add primary plane helpers drm/exynos: Restrict plane loops to only operate on overlay planes drm/i915: R

[RFCv2 05/10] drm: Add plane type property

2014-03-12 Thread Matt Roper
On Tue, Mar 11, 2014 at 04:45:00PM -0700, Bob Paauwe wrote: > On Fri, 7 Mar 2014 16:03:17 -0800 > Matt Roper wrote: ... > > +static int drm_mode_create_standard_plane_properties(struct drm_device > > *dev) > > +{ > > + struct drm_property *type; > > + >

[RFCv2 06/10] drm: Specify primary plane at CRTC initialization

2014-03-10 Thread Matt Roper
On Sun, Mar 09, 2014 at 05:12:31PM -0400, Rob Clark wrote: > On Fri, Mar 7, 2014 at 7:03 PM, Matt Roper > wrote: > > Add primary plane as a parameter to drm_crtc_init() and update all > > existing DRM drivers to use a helper-provided primary plane. > > >

[RFC 3/4] drm: add generic blob properties for image enhancement

2014-03-07 Thread Matt Roper
odeset / nuclear pageflip is still a WIP, so it isn't upstream yet, but you can see the userspace-facing API in Rob Clark's repo here: https://github.com/robclark/libdrm/blob/atomic/xf86drmMode.h Note the drmModePropertySet{Alloc,Add,Commit,Free}() functions near the bottom. Matt -- Matt Roper Graphics Software Engineer ISG Platform Enabling & Development Intel Corporation (916) 356-2795

[RFCv2 10/10] drm/i915: Intel-specific primary plane handling

2014-03-07 Thread Matt Roper
Intel hardware allows the primary plane to be disabled independently of the CRTC. Provide custom primary plane handling to allow this. Cc: Intel Graphics Development Signed-off-by: Matt Roper --- drivers/gpu/drm/i915/intel_display.c | 132 ++- drivers/gpu/drm

[RFCv2 09/10] drm/i915: Rename similar plane functions to avoid confusion

2014-03-07 Thread Matt Roper
intel_disable_primary_plane() to intel_disable_primary_hw_plane() to make the two names a little more distinct. Cc: Intel Graphics Development Signed-off-by: Matt Roper --- drivers/gpu/drm/i915/i915_drv.h | 5 +-- drivers/gpu/drm/i915/intel_display.c | 60 2 files

[RFCv2 08/10] drm: Allow userspace to ask for full plane list (universal planes)

2014-03-07 Thread Matt Roper
Userspace clients which wish to receive all DRM planes (primary and cursor planes in addition to the traditional overlay planes) may set the DRM_CLIENT_CAP_UNIVERSAL_PLANES capability. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 20 +++- drivers/gpu/drm

[RFCv2 07/10] drm: Replace crtc fb with primary plane fb

2014-03-07 Thread Matt Roper
the framebuffer since the existing loop over all planes will take care of disabling the primary plane (and on most hardware, the CRTC by extension). Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 56 - drivers/gpu/drm/drm_crtc_helper.c

[RFCv2 06/10] drm: Specify primary plane at CRTC initialization

2014-03-07 Thread Matt Roper
Add primary plane as a parameter to drm_crtc_init() and update all existing DRM drivers to use a helper-provided primary plane. Signed-off-by: Matt Roper --- drivers/gpu/drm/armada/armada_crtc.c | 4 +++- drivers/gpu/drm/ast/ast_mode.c | 4 +++- drivers/gpu/drm/bochs

[RFCv2 05/10] drm: Add plane type property

2014-03-07 Thread Matt Roper
Add a plane type property to allow userspace to distinguish plane types. The type of the plane will now be established at drm_plane_init() time (replacing the 'priv' parameter previously used). Signed-off-by: Matt Roper --- drivers/gpu/drm/armada/armada_overlay.c| 3 +- drivers/gpu/drm

[RFCv2 04/10] drm/i915: Restrict plane loops to only operate on overlay planes

2014-03-07 Thread Matt Roper
Before we add additional types of planes to the DRM plane list, ensure that existing loops over all planes continue to operate only on "overlay" planes and ignore primary & cursor planes. Cc: Intel Graphics Development Signed-off-by: Matt Roper --- drivers/gpu/drm/i915/intel

[RFCv2 03/10] drm/exynos: Restrict plane loops to only operate on overlay planes

2014-03-07 Thread Matt Roper
Before we add additional types of planes to the DRM plane list, ensure that existing loops over all planes continue to operate only on "overlay" planes and ignore primary & cursor planes. Cc: Inki Dae Signed-off-by: Matt Roper --- drivers/gpu/drm/exynos/exynos_drm_encoder.c | 6

[RFCv2 02/10] drm: Add primary plane helpers

2014-03-07 Thread Matt Roper
more efficiently, that want to use their own primary plane structure to track additional information, or that don't have the limitations assumed by the helpers are free to provide their own implementation of some or all of these handlers. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c

[RFCv2 01/10] drm: Add support for multiple plane types

2014-03-07 Thread Matt Roper
The DRM core currently only tracks "overlay"-style planes. Start refactoring the plane handling to allow other plane types (primary and cursor) to also be placed on the DRM plane list. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 21 - drive

[RFCv2 00/10] Universal plane support

2014-03-07 Thread Matt Roper
ied interface the only interface for clients that can support it. [suggested by Ville Syrj?l?] Matt Roper (10): drm: Add support for multiple plane types drm: Add primary plane helpers drm/exynos: Restrict plane loops to only operate on overlay planes drm/i915: Restrict plane loops to only

[PATCH 1/4] drm: Add support for CRTC primary planes

2014-03-03 Thread Matt Roper
On Mon, Mar 03, 2014 at 03:47:43PM +, Damien Lespiau wrote: > On Thu, Feb 27, 2014 at 02:14:40PM -0800, Matt Roper wrote: > > Allow drivers to provide a drm_plane structure corresponding to a CRTC's > > primary plane. These planes will be included in the plane list for any >

[Intel-gfx] [PATCH] drm/i915: add support for Z-order of planes.

2014-02-28 Thread Matt Roper
On Fri, Feb 28, 2014 at 06:03:11PM +0200, Ville Syrj?l? wrote: > On Thu, Feb 27, 2014 at 03:44:04PM -0800, Matt Roper wrote: > > On Thu, Feb 27, 2014 at 02:36:06PM -0800, Yu Dai wrote: > > > On 14-02-25 04:19 PM, Matt Roper wrote: > > > > > > >On Thu, F

[PATCH 2/4] drm: Add plane type property

2014-02-27 Thread Matt Roper
On Thu, Feb 27, 2014 at 05:39:00PM -0500, Rob Clark wrote: > On Thu, Feb 27, 2014 at 5:14 PM, Matt Roper > wrote: > > Add a plane type property to allow userspace to distinguish > > sprite/overlay planes from primary planes. In the future we may extend > > this to cov

[PATCH 4/4] drm/i915: Register primary plane for each CRTC

2014-02-27 Thread Matt Roper
will be more useful. Cc: Intel Graphics Development Signed-off-by: Matt Roper --- drivers/gpu/drm/i915/intel_display.c | 92 1 file changed, 92 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 9757010

[PATCH 3/4] drm/i915: Rename similar plane functions to avoid confusion

2014-02-27 Thread Matt Roper
intel_disable_primary_plane() to intel_disable_primary_hw_plane() to make the two names a little more distinct. Cc: Intel Graphics Development Signed-off-by: Matt Roper --- drivers/gpu/drm/i915/i915_drv.h | 5 +++-- drivers/gpu/drm/i915/intel_display.c | 40 +--- 2 files

[PATCH 2/4] drm: Add plane type property

2014-02-27 Thread Matt Roper
Add a plane type property to allow userspace to distinguish sprite/overlay planes from primary planes. In the future we may extend this to cover cursor planes as well. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 32 include/drm/drm_crtc.h

[PATCH 1/4] drm: Add support for CRTC primary planes

2014-02-27 Thread Matt Roper
Allow drivers to provide a drm_plane structure corresponding to a CRTC's primary plane. These planes will be included in the plane list for any clients setting the DRM_CLIENT_CAP_EXPOSE_PRIMARY_PLANES capability bit. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 168

[PATCH 0/4] Expose primary planes to userspace

2014-02-27 Thread Matt Roper
each CRTC at CRTC initialization time and register it with the DRM core. The setplane handler for primary planes simply performs an MMIO flip of the provided framebuffer. Matt Roper (4): drm: Add support for CRTC primary planes drm: Add plane type property drm/i915: Rename sim

[RFCv4 10/14] drm: convert crtc to properties/state

2013-12-11 Thread Matt Roper
unsigned i; > + > + if (ocrtc == crtc) > + continue; > + > + ostate = drm_atomic_get_crtc_state(crtc, state); I think you meant to use ocrtc here rather than crtc, right? I think you might also want to move patch 11 up above 9 & 10, otherwise

[RFCv2 10/13] drm: convert plane to properties/state

2013-10-24 Thread Matt Roper
On Mon, Oct 14, 2013 at 01:26:45PM -0400, Rob Clark wrote: > Break the mutable state of a plane out into a separate structure > and use atomic properties mechanism to set plane attributes. This > makes it easier to have some helpers for plane->set_property() > and for checking for invalid params.

[RFCv2 11/13] drm: convert crtc to properties/state

2013-10-22 Thread Matt Roper
On Mon, Oct 14, 2013 at 01:26:46PM -0400, Rob Clark wrote: > Break the mutable state of a crtc out into a separate structure > and use atomic properties mechanism to set crtc attributes. This > makes it easier to have some helpers for crtc->set_property() > and for checking for invalid params.

Re: [RFCv1 11/12] drm: Atomic modeset ioctl

2013-10-08 Thread Matt Roper
; + __u64 user_data; +}; + #endif -- 1.8.3.1 -- Ville Syrjälä Intel OTC -- Ville Syrjälä Intel OTC ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel -- Matt

<    1   2   3   4