Commit 3ae32714 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-intel-next-2019-12-23' of git://anongit.freedesktop.org/drm/drm-intel into drm-next



i915 features for v5.6:

- Separate hardware and uapi state (Maarten)

- Expose a number of sprite and plane formats (Ville)

- DDC symlink in HDMI connector sysfs directory (Andrzej Pietrasiewicz)

- Improve obj->mm.lock nesting lock annotation (Daniel)
  (Includes lockdep changes)

- Selftest improvements across the board (Chris)

- ICL/TGL VDSC support on DSI (Jani, Vandita)

- TGL DSB fixes (Animesh, Lucas, Tvrtko)

- VBT parsing improvements and fixes (Lucas, Matt, José, Jani, Dan Carpenter)

- Fix LPSS vs. PMIC PWM backlight use on BYT/CHT (Hans)
  (Includes ACPI+MFD changes)

- Display state, crtc, plane code refactoring (Ville)

- Set opregion chpd value to indicate the driver handles hotplug (Hans de Goede)

- DSI updates and fixes, TGL pipe D support, port mapping (José, Jani, Vandita)

- Make HDCP 2.2 support cover CFL (Juston Li)

- Fix CML PCI IDs and ULT (Shawn Lee)

- CMP-V PCH fix (Imre)

- TGL: Add another TGL PCH ID (James)

- EHL/JSL: Add new PCI IDs (James)

- Rename pipe update tracepoints (Ville)

- Fix FBC on GLK+ (Ville)

- GuC fixes and improvements (Daniele, Don Hiatt, Stuart Summers, Matthew Brost)

- Display debugfs improvements (Ville)

- Hotplug/irq fixes (Matt)

- PSR fixes and improvements (José)

- DRM_I915_GEM_MMAP_OFFSET ioctl (Abdiel)

- Static analysis fixes (Colin Ian King)

- Register sysctl path globally (Venkata Sandeep Dhanalakota)

- Introduce new macros for tracing (Venkata Sandeep Dhanalakota)

- Migrate gt towards intel_uncore_read/write (Andi)

- Add rps frequency translation helpers (Andi)

- Fix TGL transcoder clock off sequence (José)

- Fix TGL port A audio (Kai Vehmanen)

- TGL render decompression (DK)

- GEM/GT improvements and fixes across the board (Chris)

- Couple of backmerges (Jani)

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>

# gpg: Signature made Tue 24 Dec 2019 03:20:48 AM AEST
# gpg:                using RSA key D398079D26ABEE6F
# gpg: Good signature from "Jani Nikula <jani.nikula@intel.com>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 1565 A65B 77B0 632E 1124  E59C D398 079D 26AB EE6F

# Conflicts:
#	drivers/gpu/drm/i915/display/intel_fbc.c
#	drivers/gpu/drm/i915/gt/intel_lrc.c
#	drivers/gpu/drm/i915/i915_gem.c
From: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/87lfr3rkry.fsf@intel.com
parents 5f773e55 3446c63a
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -466,9 +466,6 @@ GuC-based command submission
.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
   :doc: GuC-based command submission

.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
   :internal:

HuC
---
.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_huc.c
+3 −8
Original line number Diff line number Diff line
@@ -69,10 +69,6 @@ ACPI_MODULE_NAME("acpi_lpss");
#define LPSS_SAVE_CTX			BIT(4)
#define LPSS_NO_D3_DELAY		BIT(5)

/* Crystal Cove PMIC shares same ACPI ID between different platforms */
#define BYT_CRC_HRV			2
#define CHT_CRC_HRV			3

struct lpss_private_data;

struct lpss_device_desc {
@@ -158,7 +154,7 @@ static void lpss_deassert_reset(struct lpss_private_data *pdata)
 */
static struct pwm_lookup byt_pwm_lookup[] = {
	PWM_LOOKUP_WITH_MODULE("80860F09:00", 0, "0000:00:02.0",
			       "pwm_backlight", 0, PWM_POLARITY_NORMAL,
			       "pwm_soc_backlight", 0, PWM_POLARITY_NORMAL,
			       "pwm-lpss-platform"),
};

@@ -170,7 +166,6 @@ static void byt_pwm_setup(struct lpss_private_data *pdata)
	if (!adev->pnp.unique_id || strcmp(adev->pnp.unique_id, "1"))
		return;

	if (!acpi_dev_present("INT33FD", NULL, BYT_CRC_HRV))
	pwm_add_table(byt_pwm_lookup, ARRAY_SIZE(byt_pwm_lookup));
}

@@ -204,7 +199,7 @@ static void byt_i2c_setup(struct lpss_private_data *pdata)
/* BSW PWM used for backlight control by the i915 driver */
static struct pwm_lookup bsw_pwm_lookup[] = {
	PWM_LOOKUP_WITH_MODULE("80862288:00", 0, "0000:00:02.0",
			       "pwm_backlight", 0, PWM_POLARITY_NORMAL,
			       "pwm_soc_backlight", 0, PWM_POLARITY_NORMAL,
			       "pwm-lpss-platform"),
};

+4 −0
Original line number Diff line number Diff line
@@ -54,6 +54,9 @@ config DRM_DEBUG_MM

	  If in doubt, say "N".

config DRM_EXPORT_FOR_TESTS
	bool

config DRM_DEBUG_SELFTEST
	tristate "kselftests for DRM"
	depends on DRM
@@ -61,6 +64,7 @@ config DRM_DEBUG_SELFTEST
	select PRIME_NUMBERS
	select DRM_LIB_RANDOM
	select DRM_KMS_HELPER
	select DRM_EXPORT_FOR_TESTS if m
	default n
	help
	  This option provides kernel modules that can be used to run
+65 −13
Original line number Diff line number Diff line
@@ -57,6 +57,22 @@
 * for these functions.
 */

/**
 * __drm_atomic_helper_crtc_state_reset - reset the CRTC state
 * @crtc_state: atomic CRTC state, must not be NULL
 * @crtc: CRTC object, must not be NULL
 *
 * Initializes the newly allocated @crtc_state with default
 * values. This is useful for drivers that subclass the CRTC state.
 */
void
__drm_atomic_helper_crtc_state_reset(struct drm_crtc_state *crtc_state,
				     struct drm_crtc *crtc)
{
	crtc_state->crtc = crtc;
}
EXPORT_SYMBOL(__drm_atomic_helper_crtc_state_reset);

/**
 * __drm_atomic_helper_crtc_reset - reset state on CRTC
 * @crtc: drm CRTC
@@ -74,7 +90,7 @@ __drm_atomic_helper_crtc_reset(struct drm_crtc *crtc,
			       struct drm_crtc_state *crtc_state)
{
	if (crtc_state)
		crtc_state->crtc = crtc;
		__drm_atomic_helper_crtc_state_reset(crtc_state, crtc);

	crtc->state = crtc_state;
}
@@ -212,23 +228,43 @@ void drm_atomic_helper_crtc_destroy_state(struct drm_crtc *crtc,
EXPORT_SYMBOL(drm_atomic_helper_crtc_destroy_state);

/**
 * __drm_atomic_helper_plane_reset - resets planes state to default values
 * __drm_atomic_helper_plane_state_reset - resets plane state to default values
 * @plane_state: atomic plane state, must not be NULL
 * @plane: plane object, must not be NULL
 * @state: atomic plane state, must not be NULL
 *
 * Initializes plane state to default. This is useful for drivers that subclass
 * the plane state.
 * Initializes the newly allocated @plane_state with default
 * values. This is useful for drivers that subclass the CRTC state.
 */
void __drm_atomic_helper_plane_reset(struct drm_plane *plane,
				     struct drm_plane_state *state)
void __drm_atomic_helper_plane_state_reset(struct drm_plane_state *plane_state,
					   struct drm_plane *plane)
{
	state->plane = plane;
	state->rotation = DRM_MODE_ROTATE_0;
	plane_state->plane = plane;
	plane_state->rotation = DRM_MODE_ROTATE_0;

	state->alpha = DRM_BLEND_ALPHA_OPAQUE;
	state->pixel_blend_mode = DRM_MODE_BLEND_PREMULTI;
	plane_state->alpha = DRM_BLEND_ALPHA_OPAQUE;
	plane_state->pixel_blend_mode = DRM_MODE_BLEND_PREMULTI;
}
EXPORT_SYMBOL(__drm_atomic_helper_plane_state_reset);

/**
 * __drm_atomic_helper_plane_reset - reset state on plane
 * @plane: drm plane
 * @plane_state: plane state to assign
 *
 * Initializes the newly allocated @plane_state and assigns it to
 * the &drm_crtc->state pointer of @plane, usually required when
 * initializing the drivers or when called from the &drm_plane_funcs.reset
 * hook.
 *
 * This is useful for drivers that subclass the plane state.
 */
void __drm_atomic_helper_plane_reset(struct drm_plane *plane,
				     struct drm_plane_state *plane_state)
{
	if (plane_state)
		__drm_atomic_helper_plane_state_reset(plane_state, plane);

	plane->state = state;
	plane->state = plane_state;
}
EXPORT_SYMBOL(__drm_atomic_helper_plane_reset);

@@ -335,6 +371,22 @@ void drm_atomic_helper_plane_destroy_state(struct drm_plane *plane,
}
EXPORT_SYMBOL(drm_atomic_helper_plane_destroy_state);

/**
 * __drm_atomic_helper_connector_state_reset - reset the connector state
 * @conn_state: atomic connector state, must not be NULL
 * @connector: connectotr object, must not be NULL
 *
 * Initializes the newly allocated @conn_state with default
 * values. This is useful for drivers that subclass the connector state.
 */
void
__drm_atomic_helper_connector_state_reset(struct drm_connector_state *conn_state,
					  struct drm_connector *connector)
{
	conn_state->connector = connector;
}
EXPORT_SYMBOL(__drm_atomic_helper_connector_state_reset);

/**
 * __drm_atomic_helper_connector_reset - reset state on connector
 * @connector: drm connector
@@ -352,7 +404,7 @@ __drm_atomic_helper_connector_reset(struct drm_connector *connector,
				    struct drm_connector_state *conn_state)
{
	if (conn_state)
		conn_state->connector = connector;
		__drm_atomic_helper_connector_state_reset(conn_state, connector);

	connector->state = conn_state;
}
+42 −0
Original line number Diff line number Diff line
@@ -31,7 +31,9 @@
 * OTHER DEALINGS IN THE SOFTWARE.
 */

#include <linux/anon_inodes.h>
#include <linux/dma-fence.h>
#include <linux/file.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/poll.h>
@@ -754,3 +756,43 @@ void drm_send_event(struct drm_device *dev, struct drm_pending_event *e)
	spin_unlock_irqrestore(&dev->event_lock, irqflags);
}
EXPORT_SYMBOL(drm_send_event);

/**
 * mock_drm_getfile - Create a new struct file for the drm device
 * @minor: drm minor to wrap (e.g. #drm_device.primary)
 * @flags: file creation mode (O_RDWR etc)
 *
 * This create a new struct file that wraps a DRM file context around a
 * DRM minor. This mimicks userspace opening e.g. /dev/dri/card0, but without
 * invoking userspace. The struct file may be operated on using its f_op
 * (the drm_device.driver.fops) to mimick userspace operations, or be supplied
 * to userspace facing functions as an internal/anonymous client.
 *
 * RETURNS:
 * Pointer to newly created struct file, ERR_PTR on failure.
 */
struct file *mock_drm_getfile(struct drm_minor *minor, unsigned int flags)
{
	struct drm_device *dev = minor->dev;
	struct drm_file *priv;
	struct file *file;

	priv = drm_file_alloc(minor);
	if (IS_ERR(priv))
		return ERR_CAST(priv);

	file = anon_inode_getfile("drm", dev->driver->fops, priv, flags);
	if (IS_ERR(file)) {
		drm_file_free(priv);
		return file;
	}

	/* Everyone shares a single global address space */
	file->f_mapping = dev->anon_inode->i_mapping;

	drm_dev_get(dev);
	priv->filp = file;

	return file;
}
EXPORT_SYMBOL_FOR_TESTS_ONLY(mock_drm_getfile);
Loading