public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@linux.ie>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	Sean Paul <sean@poorly.run>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Cc: Sam Ravnborg <sam@ravnborg.org>
Subject: [PATCH v1 2/7] drm: move DRM_SWITCH_POWER defines to drm_device.h
Date: Wed, 26 Dec 2018 22:03:48 +0100	[thread overview]
Message-ID: <20181226210353.13993-2-sam@ravnborg.org> (raw)
In-Reply-To: <20181226210215.GA27610@ravnborg.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 <sam@ravnborg.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
---
 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


  parent reply	other threads:[~2018-12-26 21:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-26 21:02 [PATCH v1 0/7] drm: minimize drmP.h dependencies Sam Ravnborg
2018-12-26 21:03 ` [PATCH v1 1/7] drm: move DRM_IF_VERSION to drm_internal.h Sam Ravnborg
2018-12-27 12:09   ` Daniel Vetter
2018-12-26 21:03 ` Sam Ravnborg [this message]
2018-12-27 12:12   ` [PATCH v1 2/7] drm: move DRM_SWITCH_POWER defines to drm_device.h Daniel Vetter
2018-12-27 22:17     ` Sam Ravnborg
2018-12-26 21:03 ` [PATCH v1 3/7] drm: move drm_can_sleep() to drm_util.h Sam Ravnborg
2018-12-27 12:14   ` Daniel Vetter
2018-12-26 21:03 ` [PATCH v1 4/7] drm: remove include of drmP.h from bridge/dw_hdmi.h Sam Ravnborg
2018-12-27 10:02   ` Laurent Pinchart
2018-12-26 21:03 ` [PATCH v1 5/7] drm: remove include of drmP.h from drm_encoder_slave.h Sam Ravnborg
2018-12-26 21:03 ` [PATCH v1 6/7] drm: remove include of drmP.h from drm_modeset_helper.h Sam Ravnborg
2018-12-27 10:04   ` Laurent Pinchart
2018-12-26 21:03 ` [PATCH v1 7/7] drm: remove include of drmP.h from drm_gem_cma_helper.h Sam Ravnborg
2018-12-27 16:28   ` David Lechner
2018-12-27 22:22     ` Sam Ravnborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181226210353.13993-2-sam@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=sean@poorly.run \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox