From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sam Ravnborg Subject: [PATCH v1 2/7] drm: move DRM_SWITCH_POWER defines to drm_device.h Date: Wed, 26 Dec 2018 22:03:48 +0100 Message-ID: <20181226210353.13993-2-sam@ravnborg.org> References: <20181226210215.GA27610@ravnborg.org> Return-path: In-Reply-To: <20181226210215.GA27610@ravnborg.org> Sender: linux-kernel-owner@vger.kernel.org To: Daniel Vetter , David Airlie , Maarten Lankhorst , Maxime Ripard , Sean Paul , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: Sam Ravnborg List-Id: dri-devel@lists.freedesktop.org Move DRM_SWITCH_POWER out of drmP.h to allow users to get rid of the drmP include. DRM_SWITCH_POWER defines are used in combination with drm_device.switch_power_state. Move the DRM_SWITCH_POWER defines to the file where drm_device.switch_power_state is defined. Signed-off-by: Sam Ravnborg Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter --- include/drm/drmP.h | 5 ----- include/drm/drm_device.h | 9 +++++++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/include/drm/drmP.h b/include/drm/drmP.h index b6b8436b5123..2ba786820052 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -95,11 +95,6 @@ struct dma_buf_attachment; struct pci_dev; struct pci_controller; -#define DRM_SWITCH_POWER_ON 0 -#define DRM_SWITCH_POWER_OFF 1 -#define DRM_SWITCH_POWER_CHANGING 2 -#define DRM_SWITCH_POWER_DYNAMIC_OFF 3 - /* returns true if currently okay to sleep */ static inline bool drm_can_sleep(void) { diff --git a/include/drm/drm_device.h b/include/drm/drm_device.h index 42411b3ea0c8..c3da194d25f9 100644 --- a/include/drm/drm_device.h +++ b/include/drm/drm_device.h @@ -24,6 +24,13 @@ struct inode; struct pci_dev; struct pci_controller; + +/* Used by drm_device.switch_power_state */ +#define DRM_SWITCH_POWER_ON 0 +#define DRM_SWITCH_POWER_OFF 1 +#define DRM_SWITCH_POWER_CHANGING 2 +#define DRM_SWITCH_POWER_DYNAMIC_OFF 3 + /** * DRM device structure. This structure represent a complete card that * may contain multiple heads. @@ -222,6 +229,8 @@ struct drm_device { struct idr object_name_idr; struct drm_vma_offset_manager *vma_offset_manager; /*@} */ + + /* See DRM_SWITCH_POWER defines */ int switch_power_state; /** -- 2.12.0