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

Merge tag 'drm-misc-fixes-2023-11-29' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes



Fixes for v6.7-rc4:
- Revert panel fixes as they require exporting device_is_dependent.
- Do not double add fences in dma_resv_add_fence.
- Fix GPUVM license identifier.
- Assorted nouveau fixes.
- Fix error check for nt36523.

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/561f807e-f9d3-43c1-80d3-8b41ba83c9ec@linux.intel.com
parents 54001331 fb18fe0f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -301,7 +301,7 @@ void dma_resv_add_fence(struct dma_resv *obj, struct dma_fence *fence,

		dma_resv_list_entry(fobj, i, obj, &old, &old_usage);
		if ((old->context == fence->context && old_usage >= usage &&
		     dma_fence_is_later(fence, old)) ||
		     dma_fence_is_later_or_same(fence, old)) ||
		    dma_fence_is_signaled(old)) {
			dma_resv_list_set(fobj, i, fence, usage);
			dma_fence_put(old);
+0 −17
Original line number Diff line number Diff line
@@ -4,8 +4,6 @@
 * Copyright (C) 2017 Broadcom
 */

#include <linux/device.h>

#include <drm/drm_atomic_helper.h>
#include <drm/drm_bridge.h>
#include <drm/drm_connector.h>
@@ -21,7 +19,6 @@ struct panel_bridge {
	struct drm_bridge bridge;
	struct drm_connector connector;
	struct drm_panel *panel;
	struct device_link *link;
	u32 connector_type;
};

@@ -63,24 +60,13 @@ static int panel_bridge_attach(struct drm_bridge *bridge,
{
	struct panel_bridge *panel_bridge = drm_bridge_to_panel_bridge(bridge);
	struct drm_connector *connector = &panel_bridge->connector;
	struct drm_panel *panel = panel_bridge->panel;
	struct drm_device *drm_dev = bridge->dev;
	int ret;

	panel_bridge->link = device_link_add(drm_dev->dev, panel->dev,
					     DL_FLAG_STATELESS);
	if (!panel_bridge->link) {
		DRM_ERROR("Failed to add device link between %s and %s\n",
			  dev_name(drm_dev->dev), dev_name(panel->dev));
		return -EINVAL;
	}

	if (flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR)
		return 0;

	if (!bridge->encoder) {
		DRM_ERROR("Missing encoder\n");
		device_link_del(panel_bridge->link);
		return -ENODEV;
	}

@@ -92,7 +78,6 @@ static int panel_bridge_attach(struct drm_bridge *bridge,
				 panel_bridge->connector_type);
	if (ret) {
		DRM_ERROR("Failed to initialize connector\n");
		device_link_del(panel_bridge->link);
		return ret;
	}

@@ -115,8 +100,6 @@ static void panel_bridge_detach(struct drm_bridge *bridge)
	struct panel_bridge *panel_bridge = drm_bridge_to_panel_bridge(bridge);
	struct drm_connector *connector = &panel_bridge->connector;

	device_link_del(panel_bridge->link);

	/*
	 * Cleanup the connector if we know it was initialized.
	 *
+1 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0 OR MIT
// SPDX-License-Identifier: GPL-2.0-only OR MIT
/*
 * Copyright (c) 2022 Red Hat.
 *
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ typedef struct PACKED_REGISTRY_TABLE
{
    NvU32                   size;
    NvU32                   numEntries;
    PACKED_REGISTRY_ENTRY   entries[0];
    PACKED_REGISTRY_ENTRY   entries[] __counted_by(numEntries);
} PACKED_REGISTRY_TABLE;

#endif
+3 −2
Original line number Diff line number Diff line
@@ -318,8 +318,9 @@ nouveau_bo_alloc(struct nouveau_cli *cli, u64 *size, int *align, u32 domain,
			    (!vmm->page[i].host || vmm->page[i].shift > PAGE_SHIFT))
				continue;

			if (pi < 0)
			/* pick the last one as it will be smallest. */
			pi = i;

			/* Stop once the buffer is larger than the current page size. */
			if (*size >= 1ULL << vmm->page[i].shift)
				break;
Loading