gpu: drm: Change types and format comments
Subsystems (2)
cover gpu: drm: Change types and format comments
Replaced "unsigned" with "unsigned int" and formatted comments according to the Linux style guidelines. Issues detected by checkpatch.pl.
Fabio M. De Francesco (2):
gpu: drm: Replace "unsigned" with "unsigned int"
gpu: drm: Correct comments format
drivers/gpu/drm/drm_atomic_helper.c | 40 ++++++++++++++++++----------- 1 file changed, 25 insertions(+), 15 deletions(-)
Signature · 1 line
2.31.1
PATCH 1/2 gpu: drm: Replace "unsigned" with "unsigned int"
Replaced "unsigned with "unsigned int" since the latter is preferred.
--- drivers/gpu/drm/drm_atomic_helper.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/drm_atomic_helper.c +4 -4
@@ -106,7 +106,7 @@ static int handle_conflicting_encoders(struct drm_atomic_state *state,struct drm_connector *connector;struct drm_connector_list_iter conn_iter;struct drm_encoder *encoder; -unsigned encoder_mask =0 ; +unsigned int encoder_mask =0 ;int i, ret =0 ;/*
@@ -609,7 +609,7 @@ drm_atomic_helper_check_modeset(struct drm_device *dev,struct drm_connector *connector;struct drm_connector_state *old_connector_state, *new_connector_state;int i, ret; -unsigned connectors_mask =0 ; +unsigned int connectors_mask =0 ;for_each_oldnew_crtc_in_state (state, crtc, old_crtc_state, new_crtc_state, i) { bool has_connectors =
@@ -1478,7 +1478,7 @@ drm_atomic_helper_wait_for_vblanks(struct drm_device *dev,struct drm_crtc *crtc;struct drm_crtc_state *old_crtc_state, *new_crtc_state;int i, ret; -unsigned crtc_mask =0 ; +unsigned int crtc_mask =0 ;/* * Legacy cursor ioctls are completely unsynced, and userspace
@@ -2575,7 +2575,7 @@ drm_atomic_helper_commit_planes_on_crtc(struct drm_crtc_state *old_crtc_state)struct drm_crtc_state *new_crtc_state =drm_atomic_get_new_crtc_state (old_state, crtc);struct drm_plane *plane; -unsigned plane_mask; +unsigned int plane_mask; plane_mask = old_crtc_state->plane_mask; plane_mask |= new_crtc_state->plane_mask;
Signature · 1 line
2.31.1
Re: [PATCH 1/2] gpu: drm: Replace "unsigned" with "unsigned int"
Quoted 4 lines · Fabio M. De Francesco
Replaced "unsigned with "unsigned int" since the latter is preferred.
Signed-off-by Fabio M. De Francesco <[email protected]>
Nit for the subjects: In drm we generally don't have the gpu prefix, but just the level below + what component. So for these two patches it would be drm/atomic-helpers: as prefix in the patch summary lines. Can you pls adjust that? Patches look good otherwise.
Thanks, Daniel
Quoted 47 lines
--- drivers/gpu/drm/drm_atomic_helper.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/gpu/drm/drm_atomic_helper.c +4
-5@@ -106,7 +106,7 @@ static int handle_conflicting_encoders(struct drm_atomic_state *state,struct drm_connector *connector;struct drm_connector_list_iter conn_iter;struct drm_encoder *encoder; -unsigned encoder_mask =0 ; +unsigned int encoder_mask =0 ;int i, ret =0 ;/* @@ -609,7 +609,7 @@ drm_atomic_helper_check_modeset(struct drm_device *dev,struct drm_connector *connector;struct drm_connector_state *old_connector_state, *new_connector_state;int i, ret; -unsigned connectors_mask =0 ; +unsigned int connectors_mask =0 ;for_each_oldnew_crtc_in_state (state, crtc, old_crtc_state, new_crtc_state, i) { bool has_connectors =@@ -1478,7 +1478,7 @@ drm_atomic_helper_wait_for_vblanks(struct drm_device *dev,struct drm_crtc *crtc;struct drm_crtc_state *old_crtc_state, *new_crtc_state;int i, ret; -unsigned crtc_mask =0 ; +unsigned int crtc_mask =0 ;/* * Legacy cursor ioctls are completely unsynced, and userspace @@ -2575,7 +2575,7 @@ drm_atomic_helper_commit_planes_on_crtc(struct drm_crtc_state *old_crtc_state)struct drm_crtc_state *new_crtc_state =drm_atomic_get_new_crtc_state (old_state, crtc);struct drm_plane *plane; -unsigned plane_mask; +unsigned int plane_mask; plane_mask = old_crtc_state->plane_mask; plane_mask |= new_crtc_state->plane_mask; --2.31.1
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Re: [Outreachy kernel] Re: [PATCH 1/2] gpu: drm: Replace "unsigned" with "unsigned int"
Quoted 11 lines · Daniel Vetter
Quoted 4 lines · Fabio M. De Francesco
Replaced "unsigned with "unsigned int" since the latter is preferred.
Signed-off-by Fabio M. De Francesco <[email protected]>Nit for the subjects: In drm we generally don't have the gpu prefix, but just the level below + what component. So for these two patches it would be drm/atomic-helpers: as prefix in the patch summary lines. Can you pls adjust that? Patches look good otherwise.
Fabio, you should select the subject line by looking at what others have done on the same file (git log --oneline file.c). Different parts of the kernel have different strategies, so it is better to check every time.
julia
Quoted 61 lines
Thanks, Daniel
Quoted 45 lines
--- drivers/gpu/drm/drm_atomic_helper.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/gpu/drm/drm_atomic_helper.c +4
-5@@ -106,7 +106,7 @@ static int handle_conflicting_encoders(struct drm_atomic_state *state,struct drm_connector *connector;struct drm_connector_list_iter conn_iter;struct drm_encoder *encoder; -unsigned encoder_mask =0 ; +unsigned int encoder_mask =0 ;int i, ret =0 ;/* @@ -609,7 +609,7 @@ drm_atomic_helper_check_modeset(struct drm_device *dev,struct drm_connector *connector;struct drm_connector_state *old_connector_state, *new_connector_state;int i, ret; -unsigned connectors_mask =0 ; +unsigned int connectors_mask =0 ;for_each_oldnew_crtc_in_state (state, crtc, old_crtc_state, new_crtc_state, i) { bool has_connectors =@@ -1478,7 +1478,7 @@ drm_atomic_helper_wait_for_vblanks(struct drm_device *dev,struct drm_crtc *crtc;struct drm_crtc_state *old_crtc_state, *new_crtc_state;int i, ret; -unsigned crtc_mask =0 ; +unsigned int crtc_mask =0 ;/* * Legacy cursor ioctls are completely unsynced, and userspace @@ -2575,7 +2575,7 @@ drm_atomic_helper_commit_planes_on_crtc(struct drm_crtc_state *old_crtc_state)struct drm_crtc_state *new_crtc_state =drm_atomic_get_new_crtc_state (old_state, crtc);struct drm_plane *plane; -unsigned plane_mask; +unsigned int plane_mask; plane_mask = old_crtc_state->plane_mask; plane_mask |= new_crtc_state->plane_mask; --Quoted 2 lines
2.31.1
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/CAKMK7uEzf64xB5TLS7VvyLVJmX4MBNnHcr3_n1zDq3hOVAm1Rg%40mail.gmail.com.
PATCH 2/2 gpu: drm: Correct comments format
In reply to Fabio M. De FrancescoCorrected comments format in accordance to the Linux style guides.
--- drivers/gpu/drm/drm_atomic_helper.c | 32 +++++++++++++++++++---------- 1 file changed, 21 insertions(+), 11 deletions(-)
drivers/gpu/drm/drm_atomic_helper.c +21 -11
@@ -1018,8 +1018,10 @@ disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state)struct drm_encoder *encoder;struct drm_bridge *bridge; -/* Shut down everything that's in the changeset and currently -* still on. So need to check the old, saved state. */ +/* +* Shut down everything that's in the changeset and currently +* still on. So need to check the old, saved state. +*/ if (!old_conn_state->crtc)continue ;
@@ -1409,7 +1411,7 @@ EXPORT_SYMBOL(drm_atomic_helper_commit_modeset_enables);* @dev: DRM device * @state: atomic state object with old state structures * @pre_swap: If true, do an interruptible wait, and @state is the new state. -* Otherwise @state is the old state. +* Otherwise @state is the old state. * * For implicit sync, driver should fish the exclusive fence out from the * incoming fb's and stash it in the drm_plane_state. This is called after
@@ -1953,8 +1955,10 @@ static int stall_checks(struct drm_crtc *crtc, bool nonblock)list_for_each_entry (commit, &crtc->commit_list, commit_entry) {if (i ==0 ) { completed =try_wait_for_completion (&commit->flip_done); -/* Userspace is not allowed to get ahead of the previous -* commit with nonblocking ones. */ +/* +* Userspace is not allowed to get ahead of the previous +* commit with nonblocking ones. +*/ if (!completed && nonblock) {spin_unlock (&crtc->commit_lock); DRM_DEBUG_ATOMIC("[CRTC:%d:%s] busy with a previous commit\n",
@@ -2103,9 +2107,11 @@ int drm_atomic_helper_setup_commit(struct drm_atomic_state *state,if (ret)return ret; -/* Drivers only send out events when at least either current or +/* +* Drivers only send out events when at least either current or * new CRTC state is active. Complete right away if everything -* stays off. */ +* stays off. +*/ if (!old_crtc_state->active && !new_crtc_state->active) {complete_all (&commit->flip_done);continue ;
@@ -2137,8 +2143,10 @@ int drm_atomic_helper_setup_commit(struct drm_atomic_state *state, }for_each_oldnew_connector_in_state (state, conn, old_conn_state, new_conn_state, i) { -/* Userspace is not allowed to get ahead of the previous -* commit with nonblocking ones. */ +/* +* Userspace is not allowed to get ahead of the previous +* commit with nonblocking ones. +*/ if (nonblock && old_conn_state->commit && !try_wait_for_completion (&old_conn_state->commit->flip_done)) { DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] busy with a previous commit\n",
@@ -2156,8 +2164,10 @@ int drm_atomic_helper_setup_commit(struct drm_atomic_state *state, }for_each_oldnew_plane_in_state (state, plane, old_plane_state, new_plane_state, i) { -/* Userspace is not allowed to get ahead of the previous -* commit with nonblocking ones. */ +/* +* Userspace is not allowed to get ahead of the previous +* commit with nonblocking ones. +*/ if (nonblock && old_plane_state->commit && !try_wait_for_completion (&old_plane_state->commit->flip_done)) { DRM_DEBUG_ATOMIC("[PLANE:%d:%s] busy with a previous commit\n",
Signature · 1 line
2.31.1