drm/komeda: Remove clock ratio property
Subsystems (4)
PATCH 1/5 drm/komeda: Remove clock ratio property
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.
--- .../gpu/drm/arm/display/komeda/komeda_crtc.c | 39 ------------------- .../gpu/drm/arm/display/komeda/komeda_kms.h | 3 -- 2 files changed, 42 deletions(-)
drivers/gpu/drm/arm/display/komeda/komeda_crtc.c +0 -39
@@ -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;
drivers/gpu/drm/arm/display/komeda/komeda_kms.h +0 -3
@@ -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; };
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/5 drm/komeda: remove slave_planes property
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.
--- .../gpu/drm/arm/display/komeda/komeda_crtc.c | 24 ------------------- .../gpu/drm/arm/display/komeda/komeda_kms.h | 3 --- 2 files changed, 27 deletions(-)
drivers/gpu/drm/arm/display/komeda/komeda_crtc.c +0 -24
@@ -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; }
drivers/gpu/drm/arm/display/komeda/komeda_kms.h +0 -3
@@ -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; };/**
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 2/5] drm/komeda: remove slave_planes property
Quoted 18 lines · Daniel Vetter
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.
Quoted 7 lines
Fixes 3b9dfa4ef28c ("drm/komeda: Add slave pipeline support")Cc Lowry Li (Arm Technology China) <[email protected]>Cc James Qian Wang (Arm Technology China) <[email protected]>Cc Liviu Dudau <[email protected]>Cc Mali DP Maintainers <[email protected]>Cc Brian Starkey <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
Hi Daniel:
Thank you for the patch!
Quoted 63 lines
--- .../gpu/drm/arm/display/komeda/komeda_crtc.c | 24 ------------------- .../gpu/drm/arm/display/komeda/komeda_kms.h | 3 --- 2 files changed, 27 deletions(-)drivers/gpu/drm/arm/display/komeda/komeda_crtc.c +0
-24@@ -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; }drivers/gpu/drm/arm/display/komeda/komeda_kms.h +0
-3@@ -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; };/** Signature · 1 line
2.20.1
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 3/5 drm/komeda: remove img_enhancement property
In reply to Daniel VetterProperties 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.
--- .../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(-)
drivers/gpu/drm/arm/display/komeda/komeda_kms.h +0 -2
@@ -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; };
drivers/gpu/drm/arm/display/komeda/komeda_plane.c +2 -17
@@ -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,
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 3/5] drm/komeda: remove img_enhancement property
Quoted 18 lines · Daniel Vetter
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.
Quoted 7 lines
Fixes 42b6f118f6d1 ("drm/komeda: Add image enhancement support")Cc Lowry Li (Arm Technology China) <[email protected]>Cc James Qian Wang (Arm Technology China) <[email protected]>Cc Liviu Dudau <[email protected]>Cc Mali DP Maintainers <[email protected]>Cc Brian Starkey <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
Hi Daniel:
Thank you for the patch!
Quoted 64 lines
--- .../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(-)drivers/gpu/drm/arm/display/komeda/komeda_kms.h +0
-2@@ -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; };drivers/gpu/drm/arm/display/komeda/komeda_plane.c +2
-17@@ -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,Signature · 1 line
2.20.1
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 4/5 drm/komeda: Remove layer_split property
In reply to Daniel VetterProperties 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.
--- .../gpu/drm/arm/display/komeda/komeda_kms.h | 3 - .../gpu/drm/arm/display/komeda/komeda_plane.c | 61 ------------------- 2 files changed, 64 deletions(-)
drivers/gpu/drm/arm/display/komeda/komeda_kms.h +0 -3
@@ -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; };/**
drivers/gpu/drm/arm/display/komeda/komeda_plane.c +0 -61
82 lines not on this page · raw message
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 4/5] drm/komeda: Remove layer_split property
Quoted 21 lines · Daniel Vetter
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_splitmode to make a configuration possible. I.e. inkomeda_plane_atomic_check()first trykomeda_build_layer_data_flow()and if that fails, trykomeda_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.
Quoted 7 lines
Fixes a407a6509393 ("drm/komeda: Add layer split support")Cc Lowry Li (Arm Technology China) <[email protected]>Cc James Qian Wang (Arm Technology China) <[email protected]>Cc Liviu Dudau <[email protected]>Cc Mali DP Maintainers <[email protected]>Cc Brian Starkey <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
Hi Daniel:
Thank you for the patch!
Quoted 110 lines
--- .../gpu/drm/arm/display/komeda/komeda_kms.h | 3 - .../gpu/drm/arm/display/komeda/komeda_plane.c | 61 ------------------- 2 files changed, 64 deletions(-)drivers/gpu/drm/arm/display/komeda/komeda_kms.h +0
-3@@ -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; };/** drivers/gpu/drm/arm/display/komeda/komeda_plane.c +0
-61@@ -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) |Signature · 1 line
2.20.1
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 5/5 RFC: MAINTAINERS: maintain drm/arm drivers in drm-misc for now
In reply to Daniel VetterFrom 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).
--- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
MAINTAINERS +2 -2
@@ -1203,7 +1203,7 @@ M: James (Qian) Wang <[email protected]> M: Liviu Dudau <[email protected]> L: Mali DP Maintainers <[email protected]> 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 <[email protected]> M: Brian Starkey <[email protected]> L: Mali DP Maintainers <[email protected]> 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
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 5/5] RFC: MAINTAINERS: maintain drm/arm drivers in drm-misc for now
Quoted 18 lines · Daniel Vetter
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).
Quoted 10 lines
Cc Lowry Li (Arm Technology China) <[email protected]>Cc James Qian Wang (Arm Technology China) <[email protected]>Cc Liviu Dudau <[email protected]>Cc Mali DP Maintainers <[email protected]>Cc Brian Starkey <[email protected]>Cc Dave Airlie <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Maxime Ripard <[email protected]>Cc Sean Paul <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 5/5] RFC: MAINTAINERS: maintain drm/arm drivers in drm-misc for now
In reply to Daniel VetterQuoted 15 lines · Daniel Vetter
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).
Quoted 6 lines
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) <[email protected]>Cc James Qian Wang (Arm Technology China) <[email protected]>Cc Liviu Dudau <[email protected]>
Quoted 36 lines
Cc Mali DP Maintainers <[email protected]>Cc Brian Starkey <[email protected]>Cc Dave Airlie <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Maxime Ripard <[email protected]>Cc Sean Paul <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)MAINTAINERS +2
-2@@ -1203,7 +1203,7 @@ M: James (Qian) Wang <[email protected]> M: Liviu Dudau <[email protected]> L: Mali DP Maintainers <[email protected]> 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 <[email protected]> M: Brian Starkey <[email protected]> L: Mali DP Maintainers <[email protected]> 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.rstSignature · 1 line
2.20.1
Signature · 12 lines
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-develRe: [PATCH 5/5] RFC: MAINTAINERS: maintain drm/arm drivers in drm-misc for now
Quoted 16 lines · Liviu Dudau
Quoted 15 lines · Daniel Vetter
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).
Quoted 8 lines
Quoted 6 lines
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) <[email protected]>Cc James Qian Wang (Arm Technology China) <[email protected]>Cc Liviu Dudau <[email protected]>Acked-by Liviu Dudau <[email protected]>
Quoted 28 lines
Quoted 28 lines
Cc Mali DP Maintainers <[email protected]>Cc Brian Starkey <[email protected]>Cc Dave Airlie <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Maxime Ripard <[email protected]>Cc Sean Paul <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)MAINTAINERS +1
-1@@ -1203,7 +1203,7 @@ M: James (Qian) Wang <[email protected]> M: Liviu Dudau <[email protected]> L: Mali DP Maintainers <[email protected]> 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 <[email protected]> M: Brian Starkey <[email protected]> L: Mali DP Maintainers <[email protected]> S: Supported
Quoted 18 lines
Quoted 8 lines
MAINTAINERS +1
-1-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.rstSignature · 1 line
2.20.1Signature · 8 lines
==================== | I would like to | | fix the world, | | but they're not | | giving me the | \ source code! / --------------- ¯\_(ツ)_/¯
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 24 lines · Daniel Vetter
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.
Quoted 1 line
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_statecallbacks and infrastructure around them.
Quoted 7 lines
Fixes 1f7f9ab7900e ("drm/komeda: Add engine clock requirement check for the downscaling")Cc Lowry Li (Arm Technology China) <[email protected]>Cc James Qian Wang (Arm Technology China) <[email protected]>Cc Liviu Dudau <[email protected]>Cc Mali DP Maintainers <[email protected]>Cc Brian Starkey <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
Hi Daniel:
Thank you for the patch!
Quoted 92 lines
--- .../gpu/drm/arm/display/komeda/komeda_crtc.c | 39 ------------------- .../gpu/drm/arm/display/komeda/komeda_kms.h | 3 -- 2 files changed, 42 deletions(-)drivers/gpu/drm/arm/display/komeda/komeda_crtc.c +0
-39@@ -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;drivers/gpu/drm/arm/display/komeda/komeda_kms.h +0
-3@@ -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; };Signature · 1 line
2.20.1
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel