Merge remote-tracking branch 'drm/drm-next' into drm-misc-next
drm-next is forwarded to v4.20-rc1, and we need this to make a patch series apply. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
This commit is contained in:
@@ -154,6 +154,17 @@ struct __drm_planes_state {
|
||||
struct __drm_crtcs_state {
|
||||
struct drm_crtc *ptr;
|
||||
struct drm_crtc_state *state, *old_state, *new_state;
|
||||
|
||||
/**
|
||||
* @commit:
|
||||
*
|
||||
* A reference to the CRTC commit object that is kept for use by
|
||||
* drm_atomic_helper_wait_for_flip_done() after
|
||||
* drm_atomic_helper_commit_hw_done() is called. This ensures that a
|
||||
* concurrent commit won't free a commit object that is still in use.
|
||||
*/
|
||||
struct drm_crtc_commit *commit;
|
||||
|
||||
s32 __user *out_fence_ptr;
|
||||
u64 last_vblank_count;
|
||||
};
|
||||
|
@@ -87,9 +87,10 @@ struct drm_client_dev {
|
||||
struct drm_file *file;
|
||||
};
|
||||
|
||||
int drm_client_new(struct drm_device *dev, struct drm_client_dev *client,
|
||||
const char *name, const struct drm_client_funcs *funcs);
|
||||
int drm_client_init(struct drm_device *dev, struct drm_client_dev *client,
|
||||
const char *name, const struct drm_client_funcs *funcs);
|
||||
void drm_client_release(struct drm_client_dev *client);
|
||||
void drm_client_add(struct drm_client_dev *client);
|
||||
|
||||
void drm_client_dev_unregister(struct drm_device *dev);
|
||||
void drm_client_dev_hotplug(struct drm_device *dev);
|
||||
|
@@ -82,6 +82,53 @@ enum drm_connector_status {
|
||||
connector_status_unknown = 3,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum drm_connector_registration_status - userspace registration status for
|
||||
* a &drm_connector
|
||||
*
|
||||
* This enum is used to track the status of initializing a connector and
|
||||
* registering it with userspace, so that DRM can prevent bogus modesets on
|
||||
* connectors that no longer exist.
|
||||
*/
|
||||
enum drm_connector_registration_state {
|
||||
/**
|
||||
* @DRM_CONNECTOR_INITIALIZING: The connector has just been created,
|
||||
* but has yet to be exposed to userspace. There should be no
|
||||
* additional restrictions to how the state of this connector may be
|
||||
* modified.
|
||||
*/
|
||||
DRM_CONNECTOR_INITIALIZING = 0,
|
||||
|
||||
/**
|
||||
* @DRM_CONNECTOR_REGISTERED: The connector has been fully initialized
|
||||
* and registered with sysfs, as such it has been exposed to
|
||||
* userspace. There should be no additional restrictions to how the
|
||||
* state of this connector may be modified.
|
||||
*/
|
||||
DRM_CONNECTOR_REGISTERED = 1,
|
||||
|
||||
/**
|
||||
* @DRM_CONNECTOR_UNREGISTERED: The connector has either been exposed
|
||||
* to userspace and has since been unregistered and removed from
|
||||
* userspace, or the connector was unregistered before it had a chance
|
||||
* to be exposed to userspace (e.g. still in the
|
||||
* @DRM_CONNECTOR_INITIALIZING state). When a connector is
|
||||
* unregistered, there are additional restrictions to how its state
|
||||
* may be modified:
|
||||
*
|
||||
* - An unregistered connector may only have its DPMS changed from
|
||||
* On->Off. Once DPMS is changed to Off, it may not be switched back
|
||||
* to On.
|
||||
* - Modesets are not allowed on unregistered connectors, unless they
|
||||
* would result in disabling its assigned CRTCs. This means
|
||||
* disabling a CRTC on an unregistered connector is OK, but enabling
|
||||
* one is not.
|
||||
* - Removing a CRTC from an unregistered connector is OK, but new
|
||||
* CRTCs may never be assigned to an unregistered connector.
|
||||
*/
|
||||
DRM_CONNECTOR_UNREGISTERED = 2,
|
||||
};
|
||||
|
||||
enum subpixel_order {
|
||||
SubPixelUnknown = 0,
|
||||
SubPixelHorizontalRGB,
|
||||
@@ -853,10 +900,12 @@ struct drm_connector {
|
||||
bool ycbcr_420_allowed;
|
||||
|
||||
/**
|
||||
* @registered: Is this connector exposed (registered) with userspace?
|
||||
* @registration_state: Is this connector initializing, exposed
|
||||
* (registered) with userspace, or unregistered?
|
||||
*
|
||||
* Protected by @mutex.
|
||||
*/
|
||||
bool registered;
|
||||
enum drm_connector_registration_state registration_state;
|
||||
|
||||
/**
|
||||
* @modes:
|
||||
@@ -1167,6 +1216,24 @@ static inline void drm_connector_unreference(struct drm_connector *connector)
|
||||
drm_connector_put(connector);
|
||||
}
|
||||
|
||||
/**
|
||||
* drm_connector_is_unregistered - has the connector been unregistered from
|
||||
* userspace?
|
||||
* @connector: DRM connector
|
||||
*
|
||||
* Checks whether or not @connector has been unregistered from userspace.
|
||||
*
|
||||
* Returns:
|
||||
* True if the connector was unregistered, false if the connector is
|
||||
* registered or has not yet been registered with userspace.
|
||||
*/
|
||||
static inline bool
|
||||
drm_connector_is_unregistered(struct drm_connector *connector)
|
||||
{
|
||||
return READ_ONCE(connector->registration_state) ==
|
||||
DRM_CONNECTOR_UNREGISTERED;
|
||||
}
|
||||
|
||||
const char *drm_get_connector_status_name(enum drm_connector_status status);
|
||||
const char *drm_get_subpixel_order_name(enum subpixel_order order);
|
||||
const char *drm_get_dpms_name(int val);
|
||||
|
@@ -214,9 +214,9 @@ struct detailed_timing {
|
||||
#define DRM_EDID_HDMI_DC_Y444 (1 << 3)
|
||||
|
||||
/* YCBCR 420 deep color modes */
|
||||
#define DRM_EDID_YCBCR420_DC_48 (1 << 6)
|
||||
#define DRM_EDID_YCBCR420_DC_36 (1 << 5)
|
||||
#define DRM_EDID_YCBCR420_DC_30 (1 << 4)
|
||||
#define DRM_EDID_YCBCR420_DC_48 (1 << 2)
|
||||
#define DRM_EDID_YCBCR420_DC_36 (1 << 1)
|
||||
#define DRM_EDID_YCBCR420_DC_30 (1 << 0)
|
||||
#define DRM_EDID_YCBCR420_DC_MASK (DRM_EDID_YCBCR420_DC_48 | \
|
||||
DRM_EDID_YCBCR420_DC_36 | \
|
||||
DRM_EDID_YCBCR420_DC_30)
|
||||
|
Reference in New Issue
Block a user