Skip to content

Commit 84bb65b

Browse files
committed
drm/i915: rip out intel_crtc->dpms_mode
Afaict this has been used for two things: - To prevent the crtc enable code from being run twice. We have now intel_crtc->active to track this in a more precise way. - To ensure the code copes correctly with the unknown hw state after boot and resume. Thanks to the hw state readout and sanitize code we have now a better way to handle this. The only thing it still does is complicate our modeset state space. Having outlived its usefullness, let it just die. Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
1 parent 0a91ca2 commit 84bb65b

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

drivers/gpu/drm/i915/intel_display.c

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3470,18 +3470,10 @@ void intel_crtc_update_dpms(struct drm_crtc *crtc)
34703470
struct intel_encoder *intel_encoder;
34713471
int pipe = intel_crtc->pipe;
34723472
bool enabled, enable = false;
3473-
int mode;
34743473

34753474
for_each_encoder_on_crtc(dev, crtc, intel_encoder)
34763475
enable |= intel_encoder->connectors_active;
34773476

3478-
mode = enable ? DRM_MODE_DPMS_ON : DRM_MODE_DPMS_OFF;
3479-
3480-
if (intel_crtc->dpms_mode == mode)
3481-
return;
3482-
3483-
intel_crtc->dpms_mode = mode;
3484-
34853477
if (enable)
34863478
dev_priv->display.crtc_enable(crtc);
34873479
else
@@ -5037,11 +5029,6 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
50375029
x, y, old_fb);
50385030
drm_vblank_post_modeset(dev, pipe);
50395031

5040-
if (ret)
5041-
intel_crtc->dpms_mode = DRM_MODE_DPMS_OFF;
5042-
else
5043-
intel_crtc->dpms_mode = DRM_MODE_DPMS_ON;
5044-
50455032
return ret;
50465033
}
50475034

@@ -7621,10 +7608,6 @@ static void intel_sanitize_crtc(struct intel_crtc *crtc)
76217608
struct drm_i915_private *dev_priv = dev->dev_private;
76227609
u32 reg, val;
76237610

7624-
/* Clear the dpms state for compatibility with code still using that
7625-
* deprecated state variable. */
7626-
crtc->dpms_mode = -1;
7627-
76287611
/* Clear any frame start delays used for debugging left by the BIOS */
76297612
reg = PIPECONF(crtc->pipe);
76307613
I915_WRITE(reg, I915_READ(reg) & ~PIPECONF_FRAME_START_DELAY_MASK);

drivers/gpu/drm/i915/intel_drv.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ struct intel_crtc {
164164
enum pipe pipe;
165165
enum plane plane;
166166
u8 lut_r[256], lut_g[256], lut_b[256];
167-
int dpms_mode;
168167
/*
169168
* Whether the crtc and the connected output pipeline is active. Implies
170169
* that crtc->enabled is set, i.e. the current mode configuration has

0 commit comments

Comments
 (0)