Skip to content

Commit

Permalink
drm/i915: s/any_enabled/!fallback/ in fbdev_initial_config
Browse files Browse the repository at this point in the history
It started as a simple check whether anything is lit up, but now is't
used to driver the general fallback logic to the default output
configuration selector in the helper library. So rename it for more
clarity.

Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Daniel Vetter committed Mar 5, 2014
1 parent 7d5e379 commit 7c2bb53
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/gpu/drm/i915/intel_fbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
struct drm_device *dev = fb_helper->dev;
int i, j;
bool *save_enabled;
bool any_enabled = false;
bool fallback = true;

/*
* If the user specified any force options, just bail here
Expand Down Expand Up @@ -347,7 +347,7 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
*/
for (j = 0; j < fb_helper->connector_count; j++) {
if (crtcs[j] == new_crtc) {
any_enabled = false;
fallback = true;
goto out;
}
}
Expand Down Expand Up @@ -390,11 +390,11 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
encoder->crtc->base.id,
modes[i]->name);

any_enabled = true;
fallback = false;
}

out:
if (!any_enabled) {
if (fallback) {
memcpy(enabled, save_enabled, dev->mode_config.num_connector);
kfree(save_enabled);
return false;
Expand Down

0 comments on commit 7c2bb53

Please sign in to comment.