Skip to contentSkip to conversation

drm/amd/display: Small comment on dc_commit_planes_to_stream

PATCH In review Harry Wentland 2 participants 2 messages Oct 17, 2017 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/display: Small comment on dc_commit_planes_to_stream

Having one struct on the stack was somewhat confusing. Also mention that the whole function should eventually go.

---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc.c +7 -0
index 7a0593d4ca62..a71392ffc46d 100644
@@ -918,6 +918,12 @@ bool dc_post_update_surfaces_to_stream(struct dc *dc)
 	return true;
 }
 
+/*
+ * TODO this whole function needs to go
+ *
+ * dc_surface_update is needlessly complex. See if we can just replace this
+ * with a dc_plane_state and follow the atomic model a bit more closely here.
+ */
 bool dc_commit_planes_to_stream(
 		struct dc *dc,
 		struct dc_plane_state **plane_states,
@@ -925,6 +931,7 @@ bool dc_commit_planes_to_stream(
 		struct dc_stream_state *dc_stream,
 		struct dc_state *state)
 {
+	/* no need to dynamically allocate this. it's pretty small */
 	struct dc_surface_update updates[MAX_SURFACES];
 	struct dc_flip_addrs *flip_addr;
 	struct dc_plane_info *plane_info;
Signature · 6 lines
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20171017001109.17243-1-harry.wentland-5C7GfCeVMHo@public.gmane.org

Reviewed-by Andrey Grodzovsky
#2 lore raw
Quoted 26 lines · Harry Wentland

Having one struct on the stack was somewhat confusing. Also mention that the whole function should eventually go.

---
  drivers/gpu/drm/amd/display/dc/core/dc.c | 7 +++++++
  1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc.c +6 -0
index 7a0593d4ca62..a71392ffc46d 100644
@@ -918,6 +918,12 @@ bool dc_post_update_surfaces_to_stream(struct dc *dc)
  	return true;
  }
 
+/*
+ * TODO this whole function needs to go
+ *
+ * dc_surface_update is needlessly complex. See if we can just replace this
+ * with a dc_plane_state and follow the atomic model a bit more closely here.
+ */
  bool dc_commit_planes_to_stream(
  		struct dc *dc,
  		struct dc_plane_state **plane_states,

drivers/gpu/drm/amd/display/dc/core/dc.c bool dc_commit_planes_to_stream( · line 937

Quoted 7 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +1 -0
@@ -925,6 +931,7 @@ bool dc_commit_planes_to_stream(
  		struct dc_stream_state *dc_stream,
  		struct dc_state *state)
  {
+	/* no need to dynamically allocate this. it's pretty small */
  	struct dc_surface_update updates[MAX_SURFACES];
  	struct dc_flip_addrs *flip_addr;
  	struct dc_plane_info *plane_info;

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx