Commit ef23d500 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-misc-next-fixes-2021-02-11' of...

Merge tag 'drm-misc-next-fixes-2021-02-11' of git://anongit.freedesktop.org/drm/drm-misc

 into drm-next

drm-misc-next-fixes cherry picked from drm-misc-next for v5.12:
- Assorted small fixes.
- Disable and remove gma3600 support.
- Fix CEC for vc4/hdmi.

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

From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/dac2ae30-c5d9-4222-39e2-f64067310491@linux.intel.com
parents ac35d19f e2183fb1
Loading
Loading
Loading
Loading
+19 −1
Original line number Diff line number Diff line
@@ -53,6 +53,24 @@ properties:
      - const: audio
      - const: cec

  interrupts:
    items:
      - description: CEC TX interrupt
      - description: CEC RX interrupt
      - description: CEC stuck at low interrupt
      - description: Wake-up interrupt
      - description: Hotplug connected interrupt
      - description: Hotplug removed interrupt

  interrupt-names:
    items:
      - const: cec-tx
      - const: cec-rx
      - const: cec-low
      - const: wakeup
      - const: hpd-connected
      - const: hpd-removed

  ddc:
    allOf:
      - $ref: /schemas/types.yaml#/definitions/phandle
@@ -90,7 +108,7 @@ required:
  - resets
  - ddc

additionalProperties: false
unevaluatedProperties: false

examples:
  - |
+19 −0
Original line number Diff line number Diff line
@@ -23,6 +23,9 @@ Advanced: Tricky tasks that need fairly good understanding of the DRM subsystem
and graphics topics. Generally need the relevant hardware for development and
testing.

Expert: Only attempt these if you've successfully completed some tricky
refactorings already and are an expert in the specific area

Subsystem-wide refactorings
===========================

@@ -168,6 +171,22 @@ Contact: Daniel Vetter, respective driver maintainers

Level: Advanced

Move Buffer Object Locking to dma_resv_lock()
---------------------------------------------

Many drivers have their own per-object locking scheme, usually using
mutex_lock(). This causes all kinds of trouble for buffer sharing, since
depending which driver is the exporter and importer, the locking hierarchy is
reversed.

To solve this we need one standard per-object locking mechanism, which is
dma_resv_lock(). This lock needs to be called as the outermost lock, with all
other driver specific per-object locks removed. The problem is tha rolling out
the actual change to the locking contract is a flag day, due to struct dma_buf
buffer sharing.

Level: Expert

Convert logging to drm_* functions with drm_device paramater
------------------------------------------------------------

+5 −2
Original line number Diff line number Diff line
@@ -471,8 +471,11 @@ static int thread_signal_callback(void *arg)
			dma_fence_signal(f1);

		smp_store_mb(cb.seen, false);
		if (!f2 || dma_fence_add_callback(f2, &cb.cb, simple_callback))
			miss++, cb.seen = true;
		if (!f2 ||
		    dma_fence_add_callback(f2, &cb.cb, simple_callback)) {
			miss++;
			cb.seen = true;
		}

		if (!t->before)
			dma_fence_signal(f1);
+5 −2
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@
 * Copyright (c) 2007 Dave Airlie <airlied@linux.ie>
 */

#include "drm/drm_modeset_lock.h"
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/slab.h>
@@ -1181,9 +1182,11 @@ static void drm_client_modeset_dpms_legacy(struct drm_client_dev *client, int dp
	struct drm_device *dev = client->dev;
	struct drm_connector *connector;
	struct drm_mode_set *modeset;
	struct drm_modeset_acquire_ctx ctx;
	int j;
	int ret;

	drm_modeset_lock_all(dev);
	DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
	drm_client_for_each_modeset(modeset, client) {
		if (!modeset->crtc->enabled)
			continue;
@@ -1195,7 +1198,7 @@ static void drm_client_modeset_dpms_legacy(struct drm_client_dev *client, int dp
				dev->mode_config.dpms_property, dpms_mode);
		}
	}
	drm_modeset_unlock_all(dev);
	DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
}

/**
+2 −1
Original line number Diff line number Diff line
@@ -2302,7 +2302,8 @@ drm_dp_mst_port_add_connector(struct drm_dp_mst_branch *mstb,
	}

	if (port->pdt != DP_PEER_DEVICE_NONE &&
	    drm_dp_mst_is_end_device(port->pdt, port->mcs)) {
	    drm_dp_mst_is_end_device(port->pdt, port->mcs) &&
	    port->port_num >= DP_MST_LOGICAL_PORT_0) {
		port->cached_edid = drm_get_edid(port->connector,
						 &port->aux.ddc);
		drm_connector_set_tile_property(port->connector);
Loading