All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] drm/komeda: Remove clock ratio property
@ 2019-07-05 12:10 Daniel Vetter
  2019-07-05 12:10 ` [PATCH 2/5] drm/komeda: remove slave_planes property Daniel Vetter
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Daniel Vetter @ 2019-07-05 12:10 UTC (permalink / raw)
  To: DRI Development
  Cc: Daniel Vetter, Liviu Dudau, James Qian Wang, Daniel Vetter,
	Mali DP Maintainers, Lowry Li

Properties are uapi like anything else, with all the usual rules
regarding review, testcases, open source userspace ... Furthermore
driver-private kms properties are highly discouraged, over the past
few years we've realized we need to make a serious effort at better
standardizing this stuff.

From the discussion with Liviu the solution for these here needs
multiple pieces:

- For being able to reliably read the memory clock we need a DT
  property, plus maybe DT override snippets to fix it if it's wrong.

- For exposing plane limitations to userspace there's TEST_ONLY. There
  is a bit a gap in telling userspace better that scaling doesn't work
  due to limits (atm a good strategy is to retry again without scaling
  when adding a plane didn't work the first time around). But that
  needs a more generic solution, not exposing something extremely
  komeda specific.

- If this is needed by validation tools, you can still expose it in
  debugfs. We have an entire nice infrastructure for debug printing of
  kms objects already, see the various atomic_print_state callbacks
  and infrastructure around them.

Fixes: 1f7f9ab7900e ("drm/komeda: Add engine clock requirement check for the downscaling")
Cc: Lowry Li (Arm Technology China) <lowry.li@arm.com>
Cc: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Mali DP Maintainers <malidp@foss.arm.com>
Cc: Brian Starkey <brian.starkey@arm.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 .../gpu/drm/arm/display/komeda/komeda_crtc.c  | 39 -------------------
 .../gpu/drm/arm/display/komeda/komeda_kms.h   |  3 --
 2 files changed, 42 deletions(-)

diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
index 3f222f464eb2..e852dc27f1b8 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
@@ -454,24 +454,6 @@ static void komeda_crtc_vblank_disable(struct drm_crtc *crtc)
 	mdev->funcs->on_off_vblank(mdev, kcrtc->master->id, false);
 }
 
-static int
-komeda_crtc_atomic_get_property(struct drm_crtc *crtc,
-				const struct drm_crtc_state *state,
-				struct drm_property *property, uint64_t *val)
-{
-	struct komeda_crtc *kcrtc = to_kcrtc(crtc);
-	struct komeda_crtc_state *kcrtc_st = to_kcrtc_st(state);
-
-	if (property == kcrtc->clock_ratio_property) {
-		*val = kcrtc_st->clock_ratio;
-	} else {
-		DRM_DEBUG_DRIVER("Unknown property %s\n", property->name);
-		return -EINVAL;
-	}
-
-	return 0;
-}
-
 static const struct drm_crtc_funcs komeda_crtc_funcs = {
 	.gamma_set		= drm_atomic_helper_legacy_gamma_set,
 	.destroy		= drm_crtc_cleanup,
@@ -482,7 +464,6 @@ static const struct drm_crtc_funcs komeda_crtc_funcs = {
 	.atomic_destroy_state	= komeda_crtc_atomic_destroy_state,
 	.enable_vblank		= komeda_crtc_vblank_enable,
 	.disable_vblank		= komeda_crtc_vblank_disable,
-	.atomic_get_property	= komeda_crtc_atomic_get_property,
 };
 
 int komeda_kms_setup_crtcs(struct komeda_kms_dev *kms,
@@ -518,22 +499,6 @@ int komeda_kms_setup_crtcs(struct komeda_kms_dev *kms,
 	return 0;
 }
 
-static int komeda_crtc_create_clock_ratio_property(struct komeda_crtc *kcrtc)
-{
-	struct drm_crtc *crtc = &kcrtc->base;
-	struct drm_property *prop;
-
-	prop = drm_property_create_range(crtc->dev, DRM_MODE_PROP_ATOMIC,
-					 "CLOCK_RATIO", 0, U64_MAX);
-	if (!prop)
-		return -ENOMEM;
-
-	drm_object_attach_property(&crtc->base, prop, 0);
-	kcrtc->clock_ratio_property = prop;
-
-	return 0;
-}
-
 static int komeda_crtc_create_slave_planes_property(struct komeda_crtc *kcrtc)
 {
 	struct drm_crtc *crtc = &kcrtc->base;
@@ -590,10 +555,6 @@ static int komeda_crtc_add(struct komeda_kms_dev *kms,
 
 	crtc->port = kcrtc->master->of_output_port;
 
-	err = komeda_crtc_create_clock_ratio_property(kcrtc);
-	if (err)
-		return err;
-
 	err = komeda_crtc_create_slave_planes_property(kcrtc);
 	if (err)
 		return err;
diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.h b/drivers/gpu/drm/arm/display/komeda/komeda_kms.h
index 219fa3f0c336..2775f34bf4ab 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.h
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.h
@@ -95,9 +95,6 @@ struct komeda_crtc {
 	/** @disable_done: this flip_done is for tracing the disable */
 	struct completion *disable_done;
 
-	/** @clock_ratio_property: property for ratio of (aclk << 32)/pxlclk */
-	struct drm_property *clock_ratio_property;
-
 	/** @slave_planes_property: property for slaves of the planes */
 	struct drm_property *slave_planes_property;
 };
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/5] drm/komeda: remove slave_planes property
  2019-07-05 12:10 [PATCH 1/5] drm/komeda: Remove clock ratio property Daniel Vetter
@ 2019-07-05 12:10 ` Daniel Vetter
  2019-07-09  8:07   ` james qian wang (Arm Technology China)
  2019-07-05 12:10 ` [PATCH 3/5] drm/komeda: remove img_enhancement property Daniel Vetter
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Daniel Vetter @ 2019-07-05 12:10 UTC (permalink / raw)
  To: DRI Development
  Cc: Daniel Vetter, Liviu Dudau, James Qian Wang, Daniel Vetter,
	Mali DP Maintainers, Lowry Li

Properties are uapi like anything else, with all the usual rules
regarding review, testcases, open source userspace ... Furthermore
driver-private kms properties are highly discouraged, over the past
few years we've realized we need to make a serious effort at better
standardizing this stuff.

Again this probably needs multiple pieces to solve this properly:

- To make plane configuration less surprising to userspace you
  propably need to virtualize planes, and reorder which logical plane
  you map to which physical one dynamically. Instead of exposing a
  komeda-specific limitation to userspace and expecting them to dtrt.
  I think msm and rcar-du do that already (and others), if you need
  people to chat with or example code.

- If this is needed for validation, again ->atomic_print_state and the
  infrastructure around that is your friend.

Fixes: 3b9dfa4ef28c ("drm/komeda: Add slave pipeline support")
Cc: Lowry Li (Arm Technology China) <lowry.li@arm.com>
Cc: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Mali DP Maintainers <malidp@foss.arm.com>
Cc: Brian Starkey <brian.starkey@arm.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 .../gpu/drm/arm/display/komeda/komeda_crtc.c  | 24 -------------------
 .../gpu/drm/arm/display/komeda/komeda_kms.h   |  3 ---
 2 files changed, 27 deletions(-)

diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
index e852dc27f1b8..f4400788ab94 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
@@ -499,26 +499,6 @@ int komeda_kms_setup_crtcs(struct komeda_kms_dev *kms,
 	return 0;
 }
 
-static int komeda_crtc_create_slave_planes_property(struct komeda_crtc *kcrtc)
-{
-	struct drm_crtc *crtc = &kcrtc->base;
-	struct drm_property *prop;
-
-	if (kcrtc->slave_planes == 0)
-		return 0;
-
-	prop = drm_property_create_range(crtc->dev, DRM_MODE_PROP_IMMUTABLE,
-					 "slave_planes", 0, U32_MAX);
-	if (!prop)
-		return -ENOMEM;
-
-	drm_object_attach_property(&crtc->base, prop, kcrtc->slave_planes);
-
-	kcrtc->slave_planes_property = prop;
-
-	return 0;
-}
-
 static struct drm_plane *
 get_crtc_primary(struct komeda_kms_dev *kms, struct komeda_crtc *crtc)
 {
@@ -555,10 +535,6 @@ static int komeda_crtc_add(struct komeda_kms_dev *kms,
 
 	crtc->port = kcrtc->master->of_output_port;
 
-	err = komeda_crtc_create_slave_planes_property(kcrtc);
-	if (err)
-		return err;
-
 	return err;
 }
 
diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.h b/drivers/gpu/drm/arm/display/komeda/komeda_kms.h
index 2775f34bf4ab..c545cb963d40 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.h
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.h
@@ -94,9 +94,6 @@ struct komeda_crtc {
 
 	/** @disable_done: this flip_done is for tracing the disable */
 	struct completion *disable_done;
-
-	/** @slave_planes_property: property for slaves of the planes */
-	struct drm_property *slave_planes_property;
 };
 
 /**
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/5] drm/komeda: remove img_enhancement property
  2019-07-05 12:10 [PATCH 1/5] drm/komeda: Remove clock ratio property Daniel Vetter
  2019-07-05 12:10 ` [PATCH 2/5] drm/komeda: remove slave_planes property Daniel Vetter
@ 2019-07-05 12:10 ` Daniel Vetter
  2019-07-09  8:08   ` james qian wang (Arm Technology China)
  2019-07-05 12:10 ` [PATCH 4/5] drm/komeda: Remove layer_split property Daniel Vetter
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Daniel Vetter @ 2019-07-05 12:10 UTC (permalink / raw)
  To: DRI Development
  Cc: Daniel Vetter, Liviu Dudau, James Qian Wang, Daniel Vetter,
	Mali DP Maintainers, Lowry Li

Properties are uapi like anything else, with all the usual rules
regarding review, testcases, open source userspace ... Furthermore
driver-private kms properties are highly discouraged, over the past
few years we've realized we need to make a serious effort at better
standardizing this stuff.

Again this probably needs multiple pieces to solve this properly:

- Instead of expecting userspace to compute this (and duplicating
  modeset code), the kernel driver should compute when it's possible
  to enable this better up/downscale mode (assuming I understood
  Liviu correctly on what this does) automatically.

- If this is needed for validation then you want a debugfs file to
  force this one way or the other, or alternatively  use
  ->atomic_print_state to dump such hidden driver-private state.
  Depends upon how you do your validation ofc.

Fixes: 42b6f118f6d1 ("drm/komeda: Add image enhancement support")
Cc: Lowry Li (Arm Technology China) <lowry.li@arm.com>
Cc: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Mali DP Maintainers <malidp@foss.arm.com>
Cc: Brian Starkey <brian.starkey@arm.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 .../gpu/drm/arm/display/komeda/komeda_kms.h   |  2 --
 .../gpu/drm/arm/display/komeda/komeda_plane.c | 19 ++-----------------
 2 files changed, 2 insertions(+), 19 deletions(-)

diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.h b/drivers/gpu/drm/arm/display/komeda/komeda_kms.h
index c545cb963d40..fb2adc233760 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.h
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.h
@@ -34,8 +34,6 @@ struct komeda_plane {
 	 */
 	struct komeda_layer *layer;
 
-	/** @prop_img_enhancement: for on/off image enhancement */
-	struct drm_property *prop_img_enhancement;
 	/** @prop_layer_split: for on/off layer_split */
 	struct drm_property *prop_layer_split;
 };
diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_plane.c b/drivers/gpu/drm/arm/display/komeda/komeda_plane.c
index 04b122f28fb6..23db38650a46 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_plane.c
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_plane.c
@@ -197,9 +197,7 @@ komeda_plane_atomic_get_property(struct drm_plane *plane,
 	struct komeda_plane *kplane = to_kplane(plane);
 	struct komeda_plane_state *st = to_kplane_st(state);
 
-	if (property == kplane->prop_img_enhancement)
-		*val = st->img_enhancement;
-	else if (property == kplane->prop_layer_split)
+	if (property == kplane->prop_layer_split)
 		*val = st->layer_split;
 	else
 		return -EINVAL;
@@ -216,9 +214,7 @@ komeda_plane_atomic_set_property(struct drm_plane *plane,
 	struct komeda_plane *kplane = to_kplane(plane);
 	struct komeda_plane_state *st = to_kplane_st(state);
 
-	if (property == kplane->prop_img_enhancement)
-		st->img_enhancement = !!val;
-	else if (property == kplane->prop_layer_split)
+	if (property == kplane->prop_layer_split)
 		st->layer_split = !!val;
 	else
 		return -EINVAL;
@@ -258,17 +254,6 @@ komeda_plane_create_layer_properties(struct komeda_plane *kplane,
 	struct drm_plane *plane = &kplane->base;
 	struct drm_property *prop = NULL;
 
-	/* property: layer image_enhancement */
-	if (layer->base.supported_outputs & KOMEDA_PIPELINE_SCALERS) {
-		prop = drm_property_create_bool(drm, DRM_MODE_PROP_ATOMIC,
-						"img_enhancement");
-		if (!prop)
-			return -ENOMEM;
-
-		drm_object_attach_property(&plane->base, prop, 0);
-		kplane->prop_img_enhancement = prop;
-	}
-
 	/* property: layer split */
 	if (layer->right) {
 		prop = drm_property_create_bool(drm, DRM_MODE_PROP_ATOMIC,
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 4/5] drm/komeda: Remove layer_split property
  2019-07-05 12:10 [PATCH 1/5] drm/komeda: Remove clock ratio property Daniel Vetter
  2019-07-05 12:10 ` [PATCH 2/5] drm/komeda: remove slave_planes property Daniel Vetter
  2019-07-05 12:10 ` [PATCH 3/5] drm/komeda: remove img_enhancement property Daniel Vetter
@ 2019-07-05 12:10 ` Daniel Vetter
  2019-07-09  8:08   ` james qian wang (Arm Technology China)
  2019-07-05 12:10 ` [PATCH 5/5] RFC: MAINTAINERS: maintain drm/arm drivers in drm-misc for now Daniel Vetter
  2019-07-09  8:06 ` [PATCH 1/5] drm/komeda: Remove clock ratio property james qian wang (Arm Technology China)
  4 siblings, 1 reply; 12+ messages in thread
From: Daniel Vetter @ 2019-07-05 12:10 UTC (permalink / raw)
  To: DRI Development
  Cc: Daniel Vetter, Liviu Dudau, James Qian Wang, Daniel Vetter,
	Mali DP Maintainers, Lowry Li

Properties are uapi like anything else, with all the usual rules
regarding review, testcases, open source userspace ... Furthermore
driver-private kms properties are highly discouraged, over the past
few years we've realized we need to make a serious effort at better
standardizing this stuff.

Again this probably needs multiple pieces to solve this properly:

- Instead of expecting userspace to compute this (and duplicating
  modeset code), the kernel driver should compute when it's necessary
  to enable layer_split mode to make a configuration possible. I.e. in
  komeda_plane_atomic_check() first try komeda_build_layer_data_flow()
  and if that fails, try komeda_build_layer_split_data_flow(), and set
  dflow.en_split accordingly. Assuming I understand somewhat correctly
  what this does.

- If this is needed for validation then you want a debugfs file to
  force this one way or the other, or alternatively  use
  ->atomic_print_state to dump such hidden driver-private state.
  Depends upon how you do your validation ofc.

Fixes: a407a6509393 ("drm/komeda: Add layer split support")
Cc: Lowry Li (Arm Technology China) <lowry.li@arm.com>
Cc: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Mali DP Maintainers <malidp@foss.arm.com>
Cc: Brian Starkey <brian.starkey@arm.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 .../gpu/drm/arm/display/komeda/komeda_kms.h   |  3 -
 .../gpu/drm/arm/display/komeda/komeda_plane.c | 61 -------------------
 2 files changed, 64 deletions(-)

diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.h b/drivers/gpu/drm/arm/display/komeda/komeda_kms.h
index fb2adc233760..0c006576a25c 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.h
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.h
@@ -33,9 +33,6 @@ struct komeda_plane {
 	 * Layers with same capabilities.
 	 */
 	struct komeda_layer *layer;
-
-	/** @prop_layer_split: for on/off layer_split */
-	struct drm_property *prop_layer_split;
 };
 
 /**
diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_plane.c b/drivers/gpu/drm/arm/display/komeda/komeda_plane.c
index 23db38650a46..5bb8553cc117 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_plane.c
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_plane.c
@@ -188,40 +188,6 @@ komeda_plane_atomic_destroy_state(struct drm_plane *plane,
 	kfree(to_kplane_st(state));
 }
 
-static int
-komeda_plane_atomic_get_property(struct drm_plane *plane,
-				 const struct drm_plane_state *state,
-				 struct drm_property *property,
-				 uint64_t *val)
-{
-	struct komeda_plane *kplane = to_kplane(plane);
-	struct komeda_plane_state *st = to_kplane_st(state);
-
-	if (property == kplane->prop_layer_split)
-		*val = st->layer_split;
-	else
-		return -EINVAL;
-
-	return 0;
-}
-
-static int
-komeda_plane_atomic_set_property(struct drm_plane *plane,
-				 struct drm_plane_state *state,
-				 struct drm_property *property,
-				 uint64_t val)
-{
-	struct komeda_plane *kplane = to_kplane(plane);
-	struct komeda_plane_state *st = to_kplane_st(state);
-
-	if (property == kplane->prop_layer_split)
-		st->layer_split = !!val;
-	else
-		return -EINVAL;
-
-	return 0;
-}
-
 static bool
 komeda_plane_format_mod_supported(struct drm_plane *plane,
 				  u32 format, u64 modifier)
@@ -241,32 +207,9 @@ static const struct drm_plane_funcs komeda_plane_funcs = {
 	.reset			= komeda_plane_reset,
 	.atomic_duplicate_state	= komeda_plane_atomic_duplicate_state,
 	.atomic_destroy_state	= komeda_plane_atomic_destroy_state,
-	.atomic_get_property	= komeda_plane_atomic_get_property,
-	.atomic_set_property	= komeda_plane_atomic_set_property,
 	.format_mod_supported	= komeda_plane_format_mod_supported,
 };
 
-static int
-komeda_plane_create_layer_properties(struct komeda_plane *kplane,
-				     struct komeda_layer *layer)
-{
-	struct drm_device *drm = kplane->base.dev;
-	struct drm_plane *plane = &kplane->base;
-	struct drm_property *prop = NULL;
-
-	/* property: layer split */
-	if (layer->right) {
-		prop = drm_property_create_bool(drm, DRM_MODE_PROP_ATOMIC,
-						"layer_split");
-		if (!prop)
-			return -ENOMEM;
-		kplane->prop_layer_split = prop;
-		drm_object_attach_property(&plane->base, prop, 0);
-	}
-
-	return 0;
-}
-
 /* for komeda, which is pipeline can be share between crtcs */
 static u32 get_possible_crtcs(struct komeda_kms_dev *kms,
 			      struct komeda_pipeline *pipe)
@@ -360,10 +303,6 @@ static int komeda_plane_add(struct komeda_kms_dev *kms,
 	if (err)
 		goto cleanup;
 
-	err = komeda_plane_create_layer_properties(kplane, layer);
-	if (err)
-		goto cleanup;
-
 	err = drm_plane_create_color_properties(plane,
 			BIT(DRM_COLOR_YCBCR_BT601) |
 			BIT(DRM_COLOR_YCBCR_BT709) |
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 5/5] RFC: MAINTAINERS: maintain drm/arm drivers in drm-misc for now
  2019-07-05 12:10 [PATCH 1/5] drm/komeda: Remove clock ratio property Daniel Vetter
                   ` (2 preceding siblings ...)
  2019-07-05 12:10 ` [PATCH 4/5] drm/komeda: Remove layer_split property Daniel Vetter
@ 2019-07-05 12:10 ` Daniel Vetter
  2019-07-05 12:31   ` Maxime Ripard
  2019-07-05 13:57   ` Liviu Dudau
  2019-07-09  8:06 ` [PATCH 1/5] drm/komeda: Remove clock ratio property james qian wang (Arm Technology China)
  4 siblings, 2 replies; 12+ messages in thread
From: Daniel Vetter @ 2019-07-05 12:10 UTC (permalink / raw)
  To: DRI Development
  Cc: Daniel Vetter, Liviu Dudau, Daniel Vetter, Maxime Ripard,
	James Qian Wang, Dave Airlie, Mali DP Maintainers, Lowry Li,
	Sean Paul

From discussions with Liviu it sounded like the komeda team would
benefit a bit from more cross-review with other drivers. To make sure
komeda is aligned with how similar problems are solved in other
drivers (in the end everyone ends up with similar ideas on how to
solve various display engine design issues).

An option would be to use drm-misc as an incubator for a few kernel
releases, at least until the big design items have been tackled: Aside
from the four kms properties already landed that we need to take out
again there's also a pile of new ones proposed already for komeda.
drm-misc seems to work fairly well at encouraging these kind of
cross-driver reviews and working on cross-driver infrastructure in drm
core. Later on we can move all the drivers out to a dedicated arm tree
again (if that's desired).

Of coures that would mean Lowry and James need drm-misc commit rights
(all other arm contributors have it already I think).

Cc: Lowry Li (Arm Technology China) <lowry.li@arm.com>
Cc: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Mali DP Maintainers <malidp@foss.arm.com>
Cc: Brian Starkey <brian.starkey@arm.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Sean Paul <sean@poorly.run>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 MAINTAINERS | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index d119d53e48de..a5319eddcee1 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1203,7 +1203,7 @@ M:	James (Qian) Wang <james.qian.wang@arm.com>
 M:	Liviu Dudau <liviu.dudau@arm.com>
 L:	Mali DP Maintainers <malidp@foss.arm.com>
 S:	Supported
-T:	git git://linux-arm.org/linux-ld.git for-upstream/mali-dp
+T:	git git://anongit.freedesktop.org/drm/drm-misc
 F:	drivers/gpu/drm/arm/display/include/
 F:	drivers/gpu/drm/arm/display/komeda/
 F:	Documentation/devicetree/bindings/display/arm,komeda.txt
@@ -1214,7 +1214,7 @@ M:	Liviu Dudau <liviu.dudau@arm.com>
 M:	Brian Starkey <brian.starkey@arm.com>
 L:	Mali DP Maintainers <malidp@foss.arm.com>
 S:	Supported
-T:	git git://linux-arm.org/linux-ld.git for-upstream/mali-dp
+T:	git git://anongit.freedesktop.org/drm/drm-misc
 F:	drivers/gpu/drm/arm/
 F:	Documentation/devicetree/bindings/display/arm,malidp.txt
 F:	Documentation/gpu/afbc.rst
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 5/5] RFC: MAINTAINERS: maintain drm/arm drivers in drm-misc for now
  2019-07-05 12:10 ` [PATCH 5/5] RFC: MAINTAINERS: maintain drm/arm drivers in drm-misc for now Daniel Vetter
@ 2019-07-05 12:31   ` Maxime Ripard
  2019-07-05 13:57   ` Liviu Dudau
  1 sibling, 0 replies; 12+ messages in thread
From: Maxime Ripard @ 2019-07-05 12:31 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Daniel Vetter, Liviu Dudau, DRI Development, James Qian Wang,
	Dave Airlie, Mali DP Maintainers, Lowry Li, Sean Paul


[-- Attachment #1.1: Type: text/plain, Size: 1686 bytes --]

On Fri, Jul 05, 2019 at 02:10:06PM +0200, Daniel Vetter wrote:
> From discussions with Liviu it sounded like the komeda team would
> benefit a bit from more cross-review with other drivers. To make sure
> komeda is aligned with how similar problems are solved in other
> drivers (in the end everyone ends up with similar ideas on how to
> solve various display engine design issues).
>
> An option would be to use drm-misc as an incubator for a few kernel
> releases, at least until the big design items have been tackled: Aside
> from the four kms properties already landed that we need to take out
> again there's also a pile of new ones proposed already for komeda.
> drm-misc seems to work fairly well at encouraging these kind of
> cross-driver reviews and working on cross-driver infrastructure in drm
> core. Later on we can move all the drivers out to a dedicated arm tree
> again (if that's desired).
>
> Of coures that would mean Lowry and James need drm-misc commit rights
> (all other arm contributors have it already I think).
>
> Cc: Lowry Li (Arm Technology China) <lowry.li@arm.com>
> Cc: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Mali DP Maintainers <malidp@foss.arm.com>
> Cc: Brian Starkey <brian.starkey@arm.com>
> Cc: Dave Airlie <airlied@redhat.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Maxime Ripard <maxime.ripard@bootlin.com>
> Cc: Sean Paul <sean@poorly.run>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 5/5] RFC: MAINTAINERS: maintain drm/arm drivers in drm-misc for now
  2019-07-05 12:10 ` [PATCH 5/5] RFC: MAINTAINERS: maintain drm/arm drivers in drm-misc for now Daniel Vetter
  2019-07-05 12:31   ` Maxime Ripard
@ 2019-07-05 13:57   ` Liviu Dudau
  2019-07-08  4:57     ` james qian wang (Arm Technology China)
  1 sibling, 1 reply; 12+ messages in thread
From: Liviu Dudau @ 2019-07-05 13:57 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Maxime Ripard, DRI Development, Mali DP Maintainers,
	Daniel Vetter, Dave Airlie, James Qian Wang, Lowry Li, Sean Paul

On Fri, Jul 05, 2019 at 02:10:06PM +0200, Daniel Vetter wrote:
> From discussions with Liviu it sounded like the komeda team would
> benefit a bit from more cross-review with other drivers. To make sure
> komeda is aligned with how similar problems are solved in other
> drivers (in the end everyone ends up with similar ideas on how to
> solve various display engine design issues).
> 
> An option would be to use drm-misc as an incubator for a few kernel
> releases, at least until the big design items have been tackled: Aside
> from the four kms properties already landed that we need to take out
> again there's also a pile of new ones proposed already for komeda.
> drm-misc seems to work fairly well at encouraging these kind of
> cross-driver reviews and working on cross-driver infrastructure in drm
> core. Later on we can move all the drivers out to a dedicated arm tree
> again (if that's desired).
> 
> Of coures that would mean Lowry and James need drm-misc commit rights
> (all other arm contributors have it already I think).
> 
> Cc: Lowry Li (Arm Technology China) <lowry.li@arm.com>
> Cc: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
> Cc: Liviu Dudau <liviu.dudau@arm.com>

Acked-by: Liviu Dudau <liviu.dudau@arm.com>

> Cc: Mali DP Maintainers <malidp@foss.arm.com>
> Cc: Brian Starkey <brian.starkey@arm.com>
> Cc: Dave Airlie <airlied@redhat.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Maxime Ripard <maxime.ripard@bootlin.com>
> Cc: Sean Paul <sean@poorly.run>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  MAINTAINERS | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index d119d53e48de..a5319eddcee1 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -1203,7 +1203,7 @@ M:	James (Qian) Wang <james.qian.wang@arm.com>
>  M:	Liviu Dudau <liviu.dudau@arm.com>
>  L:	Mali DP Maintainers <malidp@foss.arm.com>
>  S:	Supported
> -T:	git git://linux-arm.org/linux-ld.git for-upstream/mali-dp
> +T:	git git://anongit.freedesktop.org/drm/drm-misc
>  F:	drivers/gpu/drm/arm/display/include/
>  F:	drivers/gpu/drm/arm/display/komeda/
>  F:	Documentation/devicetree/bindings/display/arm,komeda.txt
> @@ -1214,7 +1214,7 @@ M:	Liviu Dudau <liviu.dudau@arm.com>
>  M:	Brian Starkey <brian.starkey@arm.com>
>  L:	Mali DP Maintainers <malidp@foss.arm.com>
>  S:	Supported
> -T:	git git://linux-arm.org/linux-ld.git for-upstream/mali-dp
> +T:	git git://anongit.freedesktop.org/drm/drm-misc
>  F:	drivers/gpu/drm/arm/
>  F:	Documentation/devicetree/bindings/display/arm,malidp.txt
>  F:	Documentation/gpu/afbc.rst
> -- 
> 2.20.1
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 5/5] RFC: MAINTAINERS: maintain drm/arm drivers in drm-misc for now
  2019-07-05 13:57   ` Liviu Dudau
@ 2019-07-08  4:57     ` james qian wang (Arm Technology China)
  0 siblings, 0 replies; 12+ messages in thread
From: james qian wang (Arm Technology China) @ 2019-07-08  4:57 UTC (permalink / raw)
  To: Liviu Dudau
  Cc: nd, Maxime Ripard, Daniel Vetter, DRI Development,
	Mali DP Maintainers, Daniel Vetter, Dave Airlie,
	Lowry Li (Arm Technology China),
	Sean Paul

On Fri, Jul 05, 2019 at 09:57:37PM +0800, Liviu Dudau wrote:
> On Fri, Jul 05, 2019 at 02:10:06PM +0200, Daniel Vetter wrote:
> > From discussions with Liviu it sounded like the komeda team would
> > benefit a bit from more cross-review with other drivers. To make sure
> > komeda is aligned with how similar problems are solved in other
> > drivers (in the end everyone ends up with similar ideas on how to
> > solve various display engine design issues).
> > 
> > An option would be to use drm-misc as an incubator for a few kernel
> > releases, at least until the big design items have been tackled: Aside
> > from the four kms properties already landed that we need to take out
> > again there's also a pile of new ones proposed already for komeda.
> > drm-misc seems to work fairly well at encouraging these kind of
> > cross-driver reviews and working on cross-driver infrastructure in drm
> > core. Later on we can move all the drivers out to a dedicated arm tree
> > again (if that's desired).
> > 
> > Of coures that would mean Lowry and James need drm-misc commit rights
> > (all other arm contributors have it already I think).
> > 
> > Cc: Lowry Li (Arm Technology China) <lowry.li@arm.com>
> > Cc: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
> > Cc: Liviu Dudau <liviu.dudau@arm.com>
> 
> Acked-by: Liviu Dudau <liviu.dudau@arm.com>

Acked-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>

> > Cc: Mali DP Maintainers <malidp@foss.arm.com>
> > Cc: Brian Starkey <brian.starkey@arm.com>
> > Cc: Dave Airlie <airlied@redhat.com>
> > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > Cc: Maxime Ripard <maxime.ripard@bootlin.com>
> > Cc: Sean Paul <sean@poorly.run>
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > ---
> >  MAINTAINERS | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index d119d53e48de..a5319eddcee1 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -1203,7 +1203,7 @@ M:	James (Qian) Wang <james.qian.wang@arm.com>
> >  M:	Liviu Dudau <liviu.dudau@arm.com>
> >  L:	Mali DP Maintainers <malidp@foss.arm.com>
> >  S:	Supported
> > -T:	git git://linux-arm.org/linux-ld.git for-upstream/mali-dp
> > +T:	git git://anongit.freedesktop.org/drm/drm-misc
> >  F:	drivers/gpu/drm/arm/display/include/
> >  F:	drivers/gpu/drm/arm/display/komeda/
> >  F:	Documentation/devicetree/bindings/display/arm,komeda.txt
> > @@ -1214,7 +1214,7 @@ M:	Liviu Dudau <liviu.dudau@arm.com>
> >  M:	Brian Starkey <brian.starkey@arm.com>
> >  L:	Mali DP Maintainers <malidp@foss.arm.com>
> >  S:	Supported
> > -T:	git git://linux-arm.org/linux-ld.git for-upstream/mali-dp
> > +T:	git git://anongit.freedesktop.org/drm/drm-misc
> >  F:	drivers/gpu/drm/arm/
> >  F:	Documentation/devicetree/bindings/display/arm,malidp.txt
> >  F:	Documentation/gpu/afbc.rst
> > -- 
> > 2.20.1
> > 
> 
> -- 
> ====================
> | I would like to |
> | fix the world,  |
> | but they're not |
> | giving me the   |
>  \ source code!  /
>   ---------------
>     ¯\_(ツ)_/¯
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/5] drm/komeda: Remove clock ratio property
  2019-07-05 12:10 [PATCH 1/5] drm/komeda: Remove clock ratio property Daniel Vetter
                   ` (3 preceding siblings ...)
  2019-07-05 12:10 ` [PATCH 5/5] RFC: MAINTAINERS: maintain drm/arm drivers in drm-misc for now Daniel Vetter
@ 2019-07-09  8:06 ` james qian wang (Arm Technology China)
  4 siblings, 0 replies; 12+ messages in thread
From: james qian wang (Arm Technology China) @ 2019-07-09  8:06 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: nd, Liviu Dudau, DRI Development, Mali DP Maintainers,
	Daniel Vetter, Lowry Li (Arm Technology China)

On Fri, Jul 05, 2019 at 02:10:02PM +0200, Daniel Vetter wrote:
> Properties are uapi like anything else, with all the usual rules
> regarding review, testcases, open source userspace ... Furthermore
> driver-private kms properties are highly discouraged, over the past
> few years we've realized we need to make a serious effort at better
> standardizing this stuff.
> 
> >From the discussion with Liviu the solution for these here needs
> multiple pieces:
> 
> - For being able to reliably read the memory clock we need a DT
>   property, plus maybe DT override snippets to fix it if it's wrong.
> 
> - For exposing plane limitations to userspace there's TEST_ONLY. There
>   is a bit a gap in telling userspace better that scaling doesn't work
>   due to limits (atm a good strategy is to retry again without scaling
>   when adding a plane didn't work the first time around). But that
>   needs a more generic solution, not exposing something extremely
>   komeda specific.
> 
> - If this is needed by validation tools, you can still expose it in
>   debugfs. We have an entire nice infrastructure for debug printing of
>   kms objects already, see the various atomic_print_state callbacks
>   and infrastructure around them.
> 
> Fixes: 1f7f9ab7900e ("drm/komeda: Add engine clock requirement check for the downscaling")
> Cc: Lowry Li (Arm Technology China) <lowry.li@arm.com>
> Cc: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Mali DP Maintainers <malidp@foss.arm.com>
> Cc: Brian Starkey <brian.starkey@arm.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Hi Daniel:
Thank you for the patch!

Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>

> ---
>  .../gpu/drm/arm/display/komeda/komeda_crtc.c  | 39 -------------------
>  .../gpu/drm/arm/display/komeda/komeda_kms.h   |  3 --
>  2 files changed, 42 deletions(-)
> 
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
> index 3f222f464eb2..e852dc27f1b8 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
> @@ -454,24 +454,6 @@ static void komeda_crtc_vblank_disable(struct drm_crtc *crtc)
>  	mdev->funcs->on_off_vblank(mdev, kcrtc->master->id, false);
>  }
>  
> -static int
> -komeda_crtc_atomic_get_property(struct drm_crtc *crtc,
> -				const struct drm_crtc_state *state,
> -				struct drm_property *property, uint64_t *val)
> -{
> -	struct komeda_crtc *kcrtc = to_kcrtc(crtc);
> -	struct komeda_crtc_state *kcrtc_st = to_kcrtc_st(state);
> -
> -	if (property == kcrtc->clock_ratio_property) {
> -		*val = kcrtc_st->clock_ratio;
> -	} else {
> -		DRM_DEBUG_DRIVER("Unknown property %s\n", property->name);
> -		return -EINVAL;
> -	}
> -
> -	return 0;
> -}
> -
>  static const struct drm_crtc_funcs komeda_crtc_funcs = {
>  	.gamma_set		= drm_atomic_helper_legacy_gamma_set,
>  	.destroy		= drm_crtc_cleanup,
> @@ -482,7 +464,6 @@ static const struct drm_crtc_funcs komeda_crtc_funcs = {
>  	.atomic_destroy_state	= komeda_crtc_atomic_destroy_state,
>  	.enable_vblank		= komeda_crtc_vblank_enable,
>  	.disable_vblank		= komeda_crtc_vblank_disable,
> -	.atomic_get_property	= komeda_crtc_atomic_get_property,
>  };
>  
>  int komeda_kms_setup_crtcs(struct komeda_kms_dev *kms,
> @@ -518,22 +499,6 @@ int komeda_kms_setup_crtcs(struct komeda_kms_dev *kms,
>  	return 0;
>  }
>  
> -static int komeda_crtc_create_clock_ratio_property(struct komeda_crtc *kcrtc)
> -{
> -	struct drm_crtc *crtc = &kcrtc->base;
> -	struct drm_property *prop;
> -
> -	prop = drm_property_create_range(crtc->dev, DRM_MODE_PROP_ATOMIC,
> -					 "CLOCK_RATIO", 0, U64_MAX);
> -	if (!prop)
> -		return -ENOMEM;
> -
> -	drm_object_attach_property(&crtc->base, prop, 0);
> -	kcrtc->clock_ratio_property = prop;
> -
> -	return 0;
> -}
> -
>  static int komeda_crtc_create_slave_planes_property(struct komeda_crtc *kcrtc)
>  {
>  	struct drm_crtc *crtc = &kcrtc->base;
> @@ -590,10 +555,6 @@ static int komeda_crtc_add(struct komeda_kms_dev *kms,
>  
>  	crtc->port = kcrtc->master->of_output_port;
>  
> -	err = komeda_crtc_create_clock_ratio_property(kcrtc);
> -	if (err)
> -		return err;
> -
>  	err = komeda_crtc_create_slave_planes_property(kcrtc);
>  	if (err)
>  		return err;
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.h b/drivers/gpu/drm/arm/display/komeda/komeda_kms.h
> index 219fa3f0c336..2775f34bf4ab 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.h
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.h
> @@ -95,9 +95,6 @@ struct komeda_crtc {
>  	/** @disable_done: this flip_done is for tracing the disable */
>  	struct completion *disable_done;
>  
> -	/** @clock_ratio_property: property for ratio of (aclk << 32)/pxlclk */
> -	struct drm_property *clock_ratio_property;
> -
>  	/** @slave_planes_property: property for slaves of the planes */
>  	struct drm_property *slave_planes_property;
>  };
> -- 
> 2.20.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/5] drm/komeda: remove slave_planes property
  2019-07-05 12:10 ` [PATCH 2/5] drm/komeda: remove slave_planes property Daniel Vetter
@ 2019-07-09  8:07   ` james qian wang (Arm Technology China)
  0 siblings, 0 replies; 12+ messages in thread
From: james qian wang (Arm Technology China) @ 2019-07-09  8:07 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: nd, Liviu Dudau, DRI Development, Mali DP Maintainers,
	Daniel Vetter, Lowry Li (Arm Technology China)

On Fri, Jul 05, 2019 at 02:10:03PM +0200, Daniel Vetter wrote:
> Properties are uapi like anything else, with all the usual rules
> regarding review, testcases, open source userspace ... Furthermore
> driver-private kms properties are highly discouraged, over the past
> few years we've realized we need to make a serious effort at better
> standardizing this stuff.
> 
> Again this probably needs multiple pieces to solve this properly:
> 
> - To make plane configuration less surprising to userspace you
>   propably need to virtualize planes, and reorder which logical plane
>   you map to which physical one dynamically. Instead of exposing a
>   komeda-specific limitation to userspace and expecting them to dtrt.
>   I think msm and rcar-du do that already (and others), if you need
>   people to chat with or example code.
> 
> - If this is needed for validation, again ->atomic_print_state and the
>   infrastructure around that is your friend.
> 
> Fixes: 3b9dfa4ef28c ("drm/komeda: Add slave pipeline support")
> Cc: Lowry Li (Arm Technology China) <lowry.li@arm.com>
> Cc: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Mali DP Maintainers <malidp@foss.arm.com>
> Cc: Brian Starkey <brian.starkey@arm.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Hi Daniel:
Thank you for the patch!

Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>

> ---
>  .../gpu/drm/arm/display/komeda/komeda_crtc.c  | 24 -------------------
>  .../gpu/drm/arm/display/komeda/komeda_kms.h   |  3 ---
>  2 files changed, 27 deletions(-)
> 
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
> index e852dc27f1b8..f4400788ab94 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
> @@ -499,26 +499,6 @@ int komeda_kms_setup_crtcs(struct komeda_kms_dev *kms,
>  	return 0;
>  }
>  
> -static int komeda_crtc_create_slave_planes_property(struct komeda_crtc *kcrtc)
> -{
> -	struct drm_crtc *crtc = &kcrtc->base;
> -	struct drm_property *prop;
> -
> -	if (kcrtc->slave_planes == 0)
> -		return 0;
> -
> -	prop = drm_property_create_range(crtc->dev, DRM_MODE_PROP_IMMUTABLE,
> -					 "slave_planes", 0, U32_MAX);
> -	if (!prop)
> -		return -ENOMEM;
> -
> -	drm_object_attach_property(&crtc->base, prop, kcrtc->slave_planes);
> -
> -	kcrtc->slave_planes_property = prop;
> -
> -	return 0;
> -}
> -
>  static struct drm_plane *
>  get_crtc_primary(struct komeda_kms_dev *kms, struct komeda_crtc *crtc)
>  {
> @@ -555,10 +535,6 @@ static int komeda_crtc_add(struct komeda_kms_dev *kms,
>  
>  	crtc->port = kcrtc->master->of_output_port;
>  
> -	err = komeda_crtc_create_slave_planes_property(kcrtc);
> -	if (err)
> -		return err;
> -
>  	return err;
>  }
>  
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.h b/drivers/gpu/drm/arm/display/komeda/komeda_kms.h
> index 2775f34bf4ab..c545cb963d40 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.h
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.h
> @@ -94,9 +94,6 @@ struct komeda_crtc {
>  
>  	/** @disable_done: this flip_done is for tracing the disable */
>  	struct completion *disable_done;
> -
> -	/** @slave_planes_property: property for slaves of the planes */
> -	struct drm_property *slave_planes_property;
>  };
>  
>  /**
> -- 
> 2.20.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 3/5] drm/komeda: remove img_enhancement property
  2019-07-05 12:10 ` [PATCH 3/5] drm/komeda: remove img_enhancement property Daniel Vetter
@ 2019-07-09  8:08   ` james qian wang (Arm Technology China)
  0 siblings, 0 replies; 12+ messages in thread
From: james qian wang (Arm Technology China) @ 2019-07-09  8:08 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: nd, Liviu Dudau, DRI Development, Mali DP Maintainers,
	Daniel Vetter, Lowry Li (Arm Technology China)

On Fri, Jul 05, 2019 at 02:10:04PM +0200, Daniel Vetter wrote:
> Properties are uapi like anything else, with all the usual rules
> regarding review, testcases, open source userspace ... Furthermore
> driver-private kms properties are highly discouraged, over the past
> few years we've realized we need to make a serious effort at better
> standardizing this stuff.
> 
> Again this probably needs multiple pieces to solve this properly:
> 
> - Instead of expecting userspace to compute this (and duplicating
>   modeset code), the kernel driver should compute when it's possible
>   to enable this better up/downscale mode (assuming I understood
>   Liviu correctly on what this does) automatically.
> 
> - If this is needed for validation then you want a debugfs file to
>   force this one way or the other, or alternatively  use
>   ->atomic_print_state to dump such hidden driver-private state.
>   Depends upon how you do your validation ofc.
> 
> Fixes: 42b6f118f6d1 ("drm/komeda: Add image enhancement support")
> Cc: Lowry Li (Arm Technology China) <lowry.li@arm.com>
> Cc: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Mali DP Maintainers <malidp@foss.arm.com>
> Cc: Brian Starkey <brian.starkey@arm.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Hi Daniel:
Thank you for the patch!

Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>

> ---
>  .../gpu/drm/arm/display/komeda/komeda_kms.h   |  2 --
>  .../gpu/drm/arm/display/komeda/komeda_plane.c | 19 ++-----------------
>  2 files changed, 2 insertions(+), 19 deletions(-)
> 
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.h b/drivers/gpu/drm/arm/display/komeda/komeda_kms.h
> index c545cb963d40..fb2adc233760 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.h
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.h
> @@ -34,8 +34,6 @@ struct komeda_plane {
>  	 */
>  	struct komeda_layer *layer;
>  
> -	/** @prop_img_enhancement: for on/off image enhancement */
> -	struct drm_property *prop_img_enhancement;
>  	/** @prop_layer_split: for on/off layer_split */
>  	struct drm_property *prop_layer_split;
>  };
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_plane.c b/drivers/gpu/drm/arm/display/komeda/komeda_plane.c
> index 04b122f28fb6..23db38650a46 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_plane.c
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_plane.c
> @@ -197,9 +197,7 @@ komeda_plane_atomic_get_property(struct drm_plane *plane,
>  	struct komeda_plane *kplane = to_kplane(plane);
>  	struct komeda_plane_state *st = to_kplane_st(state);
>  
> -	if (property == kplane->prop_img_enhancement)
> -		*val = st->img_enhancement;
> -	else if (property == kplane->prop_layer_split)
> +	if (property == kplane->prop_layer_split)
>  		*val = st->layer_split;
>  	else
>  		return -EINVAL;
> @@ -216,9 +214,7 @@ komeda_plane_atomic_set_property(struct drm_plane *plane,
>  	struct komeda_plane *kplane = to_kplane(plane);
>  	struct komeda_plane_state *st = to_kplane_st(state);
>  
> -	if (property == kplane->prop_img_enhancement)
> -		st->img_enhancement = !!val;
> -	else if (property == kplane->prop_layer_split)
> +	if (property == kplane->prop_layer_split)
>  		st->layer_split = !!val;
>  	else
>  		return -EINVAL;
> @@ -258,17 +254,6 @@ komeda_plane_create_layer_properties(struct komeda_plane *kplane,
>  	struct drm_plane *plane = &kplane->base;
>  	struct drm_property *prop = NULL;
>  
> -	/* property: layer image_enhancement */
> -	if (layer->base.supported_outputs & KOMEDA_PIPELINE_SCALERS) {
> -		prop = drm_property_create_bool(drm, DRM_MODE_PROP_ATOMIC,
> -						"img_enhancement");
> -		if (!prop)
> -			return -ENOMEM;
> -
> -		drm_object_attach_property(&plane->base, prop, 0);
> -		kplane->prop_img_enhancement = prop;
> -	}
> -
>  	/* property: layer split */
>  	if (layer->right) {
>  		prop = drm_property_create_bool(drm, DRM_MODE_PROP_ATOMIC,
> -- 
> 2.20.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 4/5] drm/komeda: Remove layer_split property
  2019-07-05 12:10 ` [PATCH 4/5] drm/komeda: Remove layer_split property Daniel Vetter
@ 2019-07-09  8:08   ` james qian wang (Arm Technology China)
  0 siblings, 0 replies; 12+ messages in thread
From: james qian wang (Arm Technology China) @ 2019-07-09  8:08 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: nd, Liviu Dudau, DRI Development, Mali DP Maintainers,
	Daniel Vetter, Lowry Li (Arm Technology China)

On Fri, Jul 05, 2019 at 02:10:05PM +0200, Daniel Vetter wrote:
> Properties are uapi like anything else, with all the usual rules
> regarding review, testcases, open source userspace ... Furthermore
> driver-private kms properties are highly discouraged, over the past
> few years we've realized we need to make a serious effort at better
> standardizing this stuff.
> 
> Again this probably needs multiple pieces to solve this properly:
> 
> - Instead of expecting userspace to compute this (and duplicating
>   modeset code), the kernel driver should compute when it's necessary
>   to enable layer_split mode to make a configuration possible. I.e. in
>   komeda_plane_atomic_check() first try komeda_build_layer_data_flow()
>   and if that fails, try komeda_build_layer_split_data_flow(), and set
>   dflow.en_split accordingly. Assuming I understand somewhat correctly
>   what this does.
> 
> - If this is needed for validation then you want a debugfs file to
>   force this one way or the other, or alternatively  use
>   ->atomic_print_state to dump such hidden driver-private state.
>   Depends upon how you do your validation ofc.
> 
> Fixes: a407a6509393 ("drm/komeda: Add layer split support")
> Cc: Lowry Li (Arm Technology China) <lowry.li@arm.com>
> Cc: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Mali DP Maintainers <malidp@foss.arm.com>
> Cc: Brian Starkey <brian.starkey@arm.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Hi Daniel:
Thank you for the patch!

Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>

> ---
>  .../gpu/drm/arm/display/komeda/komeda_kms.h   |  3 -
>  .../gpu/drm/arm/display/komeda/komeda_plane.c | 61 -------------------
>  2 files changed, 64 deletions(-)
> 
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.h b/drivers/gpu/drm/arm/display/komeda/komeda_kms.h
> index fb2adc233760..0c006576a25c 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.h
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.h
> @@ -33,9 +33,6 @@ struct komeda_plane {
>  	 * Layers with same capabilities.
>  	 */
>  	struct komeda_layer *layer;
> -
> -	/** @prop_layer_split: for on/off layer_split */
> -	struct drm_property *prop_layer_split;
>  };
>  
>  /**
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_plane.c b/drivers/gpu/drm/arm/display/komeda/komeda_plane.c
> index 23db38650a46..5bb8553cc117 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_plane.c
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_plane.c
> @@ -188,40 +188,6 @@ komeda_plane_atomic_destroy_state(struct drm_plane *plane,
>  	kfree(to_kplane_st(state));
>  }
>  
> -static int
> -komeda_plane_atomic_get_property(struct drm_plane *plane,
> -				 const struct drm_plane_state *state,
> -				 struct drm_property *property,
> -				 uint64_t *val)
> -{
> -	struct komeda_plane *kplane = to_kplane(plane);
> -	struct komeda_plane_state *st = to_kplane_st(state);
> -
> -	if (property == kplane->prop_layer_split)
> -		*val = st->layer_split;
> -	else
> -		return -EINVAL;
> -
> -	return 0;
> -}
> -
> -static int
> -komeda_plane_atomic_set_property(struct drm_plane *plane,
> -				 struct drm_plane_state *state,
> -				 struct drm_property *property,
> -				 uint64_t val)
> -{
> -	struct komeda_plane *kplane = to_kplane(plane);
> -	struct komeda_plane_state *st = to_kplane_st(state);
> -
> -	if (property == kplane->prop_layer_split)
> -		st->layer_split = !!val;
> -	else
> -		return -EINVAL;
> -
> -	return 0;
> -}
> -
>  static bool
>  komeda_plane_format_mod_supported(struct drm_plane *plane,
>  				  u32 format, u64 modifier)
> @@ -241,32 +207,9 @@ static const struct drm_plane_funcs komeda_plane_funcs = {
>  	.reset			= komeda_plane_reset,
>  	.atomic_duplicate_state	= komeda_plane_atomic_duplicate_state,
>  	.atomic_destroy_state	= komeda_plane_atomic_destroy_state,
> -	.atomic_get_property	= komeda_plane_atomic_get_property,
> -	.atomic_set_property	= komeda_plane_atomic_set_property,
>  	.format_mod_supported	= komeda_plane_format_mod_supported,
>  };
>  
> -static int
> -komeda_plane_create_layer_properties(struct komeda_plane *kplane,
> -				     struct komeda_layer *layer)
> -{
> -	struct drm_device *drm = kplane->base.dev;
> -	struct drm_plane *plane = &kplane->base;
> -	struct drm_property *prop = NULL;
> -
> -	/* property: layer split */
> -	if (layer->right) {
> -		prop = drm_property_create_bool(drm, DRM_MODE_PROP_ATOMIC,
> -						"layer_split");
> -		if (!prop)
> -			return -ENOMEM;
> -		kplane->prop_layer_split = prop;
> -		drm_object_attach_property(&plane->base, prop, 0);
> -	}
> -
> -	return 0;
> -}
> -
>  /* for komeda, which is pipeline can be share between crtcs */
>  static u32 get_possible_crtcs(struct komeda_kms_dev *kms,
>  			      struct komeda_pipeline *pipe)
> @@ -360,10 +303,6 @@ static int komeda_plane_add(struct komeda_kms_dev *kms,
>  	if (err)
>  		goto cleanup;
>  
> -	err = komeda_plane_create_layer_properties(kplane, layer);
> -	if (err)
> -		goto cleanup;
> -
>  	err = drm_plane_create_color_properties(plane,
>  			BIT(DRM_COLOR_YCBCR_BT601) |
>  			BIT(DRM_COLOR_YCBCR_BT709) |
> -- 
> 2.20.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-07-09  8:08 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-05 12:10 [PATCH 1/5] drm/komeda: Remove clock ratio property Daniel Vetter
2019-07-05 12:10 ` [PATCH 2/5] drm/komeda: remove slave_planes property Daniel Vetter
2019-07-09  8:07   ` james qian wang (Arm Technology China)
2019-07-05 12:10 ` [PATCH 3/5] drm/komeda: remove img_enhancement property Daniel Vetter
2019-07-09  8:08   ` james qian wang (Arm Technology China)
2019-07-05 12:10 ` [PATCH 4/5] drm/komeda: Remove layer_split property Daniel Vetter
2019-07-09  8:08   ` james qian wang (Arm Technology China)
2019-07-05 12:10 ` [PATCH 5/5] RFC: MAINTAINERS: maintain drm/arm drivers in drm-misc for now Daniel Vetter
2019-07-05 12:31   ` Maxime Ripard
2019-07-05 13:57   ` Liviu Dudau
2019-07-08  4:57     ` james qian wang (Arm Technology China)
2019-07-09  8:06 ` [PATCH 1/5] drm/komeda: Remove clock ratio property james qian wang (Arm Technology China)

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.