Commit 04ed7ed7 authored by Hans de Goede's avatar Hans de Goede Committed by Greg Kroah-Hartman

staging: vboxvideo: Fix DPMS support after atomic conversion

Atomic modesetting does not use the traditional dpms call backs, instead
we should check crtc_state->active.
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5cf5332d
...@@ -139,7 +139,6 @@ struct vbox_connector { ...@@ -139,7 +139,6 @@ struct vbox_connector {
struct vbox_crtc { struct vbox_crtc {
struct drm_crtc base; struct drm_crtc base;
bool blanked;
bool disconnected; bool disconnected;
unsigned int crtc_id; unsigned int crtc_id;
u32 fb_offset; u32 fb_offset;
......
...@@ -84,14 +84,13 @@ static void vbox_do_modeset(struct drm_crtc *crtc) ...@@ -84,14 +84,13 @@ static void vbox_do_modeset(struct drm_crtc *crtc)
} }
flags = VBVA_SCREEN_F_ACTIVE; flags = VBVA_SCREEN_F_ACTIVE;
flags |= (fb && !vbox_crtc->blanked) ? 0 : VBVA_SCREEN_F_BLANK; flags |= (fb && crtc->state->active) ? 0 : VBVA_SCREEN_F_BLANK;
flags |= vbox_crtc->disconnected ? VBVA_SCREEN_F_DISABLED : 0; flags |= vbox_crtc->disconnected ? VBVA_SCREEN_F_DISABLED : 0;
hgsmi_process_display_info(vbox->guest_pool, vbox_crtc->crtc_id, hgsmi_process_display_info(vbox->guest_pool, vbox_crtc->crtc_id,
x_offset, y_offset, x_offset, y_offset,
vbox_crtc->x * bpp / 8 + vbox_crtc->x * bpp / 8 +
vbox_crtc->y * pitch, vbox_crtc->y * pitch,
pitch, width, height, pitch, width, height, bpp, flags);
vbox_crtc->blanked ? 0 : bpp, flags);
} }
static int vbox_set_view(struct drm_crtc *crtc) static int vbox_set_view(struct drm_crtc *crtc)
...@@ -128,27 +127,6 @@ static int vbox_set_view(struct drm_crtc *crtc) ...@@ -128,27 +127,6 @@ static int vbox_set_view(struct drm_crtc *crtc)
return 0; return 0;
} }
static void vbox_crtc_dpms(struct drm_crtc *crtc, int mode)
{
struct vbox_crtc *vbox_crtc = to_vbox_crtc(crtc);
struct vbox_private *vbox = crtc->dev->dev_private;
switch (mode) {
case DRM_MODE_DPMS_ON:
vbox_crtc->blanked = false;
break;
case DRM_MODE_DPMS_STANDBY:
case DRM_MODE_DPMS_SUSPEND:
case DRM_MODE_DPMS_OFF:
vbox_crtc->blanked = true;
break;
}
mutex_lock(&vbox->hw_mutex);
vbox_do_modeset(crtc);
mutex_unlock(&vbox->hw_mutex);
}
/* /*
* Try to map the layout of virtual screens to the range of the input device. * Try to map the layout of virtual screens to the range of the input device.
* Return true if we need to re-set the crtc modes due to screen offset * Return true if we need to re-set the crtc modes due to screen offset
...@@ -276,7 +254,6 @@ static void vbox_crtc_atomic_flush(struct drm_crtc *crtc, ...@@ -276,7 +254,6 @@ static void vbox_crtc_atomic_flush(struct drm_crtc *crtc,
} }
static const struct drm_crtc_helper_funcs vbox_crtc_helper_funcs = { static const struct drm_crtc_helper_funcs vbox_crtc_helper_funcs = {
.dpms = vbox_crtc_dpms,
.disable = vbox_crtc_disable, .disable = vbox_crtc_disable,
.commit = vbox_crtc_commit, .commit = vbox_crtc_commit,
.atomic_flush = vbox_crtc_atomic_flush, .atomic_flush = vbox_crtc_atomic_flush,
...@@ -861,7 +838,6 @@ static const struct drm_connector_helper_funcs vbox_connector_helper_funcs = { ...@@ -861,7 +838,6 @@ static const struct drm_connector_helper_funcs vbox_connector_helper_funcs = {
}; };
static const struct drm_connector_funcs vbox_connector_funcs = { static const struct drm_connector_funcs vbox_connector_funcs = {
.dpms = drm_helper_connector_dpms,
.detect = vbox_connector_detect, .detect = vbox_connector_detect,
.fill_modes = vbox_fill_modes, .fill_modes = vbox_fill_modes,
.destroy = vbox_connector_destroy, .destroy = vbox_connector_destroy,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment