drm-backend: cosmetic changes to make the code easier to read

There are some places where we can make some cosmetic changes
to make code simpler and easier to read. Make these cosmetic
changes. Note that they do not change the code behavior.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
This commit is contained in:
Leandro Ribeiro
2020-08-13 17:34:58 -03:00
parent 3be23eff99
commit 05cecc8ef3
2 changed files with 4 additions and 7 deletions
+3 -5
View File
@@ -345,8 +345,7 @@ drm_output_render(struct drm_output_state *state, pixman_region32_t *damage)
/* If we already have a client buffer promoted to scanout, then we don't
* want to render. */
scanout_state = drm_output_state_get_plane(state,
output->scanout_plane);
scanout_state = drm_output_state_get_plane(state, scanout_plane);
if (scanout_state->fb)
return;
@@ -518,7 +517,7 @@ drm_output_start_repaint_loop(struct weston_output *output_base)
if (output->disable_pending || output->destroy_pending)
return 0;
if (!output->scanout_plane->state_cur->fb) {
if (!scanout_plane->state_cur->fb) {
/* We can't page flip if there's no mode set */
goto finish_frame;
}
@@ -897,8 +896,7 @@ drm_output_find_special_plane(struct drm_backend *b, struct drm_output *output,
/* On some platforms, primary/cursor planes can roam
* between different CRTCs, so make sure we don't claim the
* same plane for two outputs. */
wl_list_for_each(tmp, &b->compositor->output_list,
base.link) {
wl_list_for_each(tmp, &b->compositor->output_list, base.link) {
if (tmp->cursor_plane == plane ||
tmp->scanout_plane == plane) {
found_elsewhere = true;
+1 -2
View File
@@ -323,8 +323,7 @@ drm_output_prepare_cursor_view(struct drm_output_state *output_state,
if (b->gbm == NULL)
return NULL;
plane_state =
drm_output_state_get_plane(output_state, output->cursor_plane);
plane_state = drm_output_state_get_plane(output_state, plane);
if (plane_state && plane_state->fb)
return NULL;