#include <linux/backlight.h>
#include <drm/drm.h>
-#include <drm/drm_drv.h>
#include "gma_device.h"
#include "intel_bios.h"
{
struct drm_psb_private *dev_priv = to_drm_psb_private(dev);
struct drm_crtc *crtc;
- struct drm_modeset_acquire_ctx ctx;
struct gma_connector *connector;
struct psb_state *regs = &dev_priv->regs.psb;
- int ret;
/* Display arbitration control + watermarks */
regs->saveDSPARB = PSB_RVDC32(DSPARB);
regs->saveCHICKENBIT = PSB_RVDC32(DSPCHICKENBIT);
/* Save crtc and output state */
- DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
+ drm_modeset_lock_all(dev);
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
if (drm_helper_crtc_in_use(crtc))
dev_priv->ops->save_crtc(crtc);
if (connector->save)
connector->save(&connector->base);
- DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
-
- return ret;
+ drm_modeset_unlock_all(dev);
+ return 0;
}
/**
{
struct drm_psb_private *dev_priv = to_drm_psb_private(dev);
struct drm_crtc *crtc;
- struct drm_modeset_acquire_ctx ctx;
struct gma_connector *connector;
struct psb_state *regs = &dev_priv->regs.psb;
- int ret;
/* Display arbitration + watermarks */
PSB_WVDC32(regs->saveDSPARB, DSPARB);
/*make sure VGA plane is off. it initializes to on after reset!*/
PSB_WVDC32(0x80000000, VGACNTRL);
- DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
+ drm_modeset_lock_all(dev);
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head)
if (drm_helper_crtc_in_use(crtc))
dev_priv->ops->restore_crtc(crtc);
if (connector->restore)
connector->restore(&connector->base);
- DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
- return ret;
+ drm_modeset_unlock_all(dev);
+ return 0;
}
static int psb_power_down(struct drm_device *dev)