Commit 4f7d8da5 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-misc-next-2024-08-29' of...

Merge tag 'drm-misc-next-2024-08-29' of https://gitlab.freedesktop.org/drm/misc/kernel

 into drm-next

drm-misc-next for v6.12:

UAPI Changes:

devfs:
- support device numbers up to MINORBITS limit

Core Changes:

ci:
- increase job timeout

devfs:
- use XArray for minor ids

displayport:
- mst: GUID improvements

docs:
- add fixes and cleanups

panic:
- optionally display QR code

Driver Changes:

amdgpu:
- faster vblank disabling
- GUID improvements

gm12u320
- convert to struct drm_edid

host1x:
- fix syncpoint IRQ during resume
- use iommu_paging_domain_alloc()

imx:
- ipuv3: convert to struct drm_edid

omapdrm:
- improve error handling

panel:
- add support for BOE TV101WUM-LL2 plus DT bindings
- novatek-nt35950: improve error handling
- nv3051d: improve error handling
- panel-edp: add support for BOE NE140WUM-N6G; revert support for
  SDC ATNA45AF01
- visionox-vtdr6130: improve error handling; use
  devm_regulator_bulk_get_const()

renesas:
- rz-du: add support for RZ/G2UL plus DT bindings

sti:
- convert to struct drm_edid

tegra:
- gr3d: improve PM domain handling
- convert to struct drm_edid

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

From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20240829144654.GA145538@linux.fritz.box
parents e55ef655 84addde4
Loading
Loading
Loading
Loading
+63 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/panel/boe,tv101wum-ll2.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: BOE TV101WUM-LL2 DSI Display Panel

maintainers:
  - Neil Armstrong <neil.armstrong@linaro.org>

allOf:
  - $ref: panel-common.yaml#

properties:
  compatible:
    const: boe,tv101wum-ll2

  reg:
    maxItems: 1
    description: DSI virtual channel

  backlight: true
  reset-gpios: true
  vsp-supply: true
  vsn-supply: true
  port: true
  rotation: true

required:
  - compatible
  - reg
  - reset-gpios
  - vsp-supply
  - vsn-supply
  - port

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    dsi {
        #address-cells = <1>;
        #size-cells = <0>;
        panel@0 {
            compatible = "boe,tv101wum-ll2";
            reg = <0>;

            vsn-supply = <&vsn_lcd>;
            vsp-supply = <&vsp_lcd>;

            reset-gpios = <&pio 45 GPIO_ACTIVE_LOW>;

            port {
                panel_in: endpoint {
                    remote-endpoint = <&dsi_out>;
                };
            };
        };
    };

...
+29 −3
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ properties:
  compatible:
    oneOf:
      - enum:
          - renesas,r9a07g043u-du # RZ/G2UL
          - renesas,r9a07g044-du # RZ/G2{L,LC}
      - items:
          - enum:
@@ -60,9 +61,6 @@ properties:
        $ref: /schemas/graph.yaml#/properties/port
        unevaluatedProperties: false

    required:
      - port@0

    unevaluatedProperties: false

  renesas,vsps:
@@ -88,6 +86,34 @@ required:

additionalProperties: false

allOf:
  - if:
      properties:
        compatible:
          contains:
            const: renesas,r9a07g043u-du
    then:
      properties:
        ports:
          properties:
            port@0:
              description: DPI

          required:
            - port@0
    else:
      properties:
        ports:
          properties:
            port@0:
              description: DSI
            port@1:
              description: DPI

          required:
            - port@0
            - port@1

examples:
  # RZ/G2L DU
  - |
+1 −1
Original line number Diff line number Diff line
@@ -7343,10 +7343,10 @@ F: drivers/gpu/drm/udl/
DRM DRIVER FOR VIRTUAL KERNEL MODESETTING (VKMS)
M:	Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
M:	Melissa Wen <melissa.srw@gmail.com>
M:	Maíra Canal <mairacanal@riseup.net>
R:	Haneen Mohammed <hamohammed.sa@gmail.com>
R:	Daniel Vetter <daniel@ffwll.ch>
R:	Melissa Wen <melissa.srw@gmail.com>
L:	dri-devel@lists.freedesktop.org
S:	Maintained
T:	git https://gitlab.freedesktop.org/drm/misc/kernel.git
+7 −103
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@

#include <linux/debugfs.h>
#include <linux/device.h>
#include <linux/idr.h>
#include <linux/xarray.h>

#include <drm/drm_accel.h>
#include <drm/drm_auth.h>
@@ -18,8 +18,7 @@
#include <drm/drm_ioctl.h>
#include <drm/drm_print.h>

static DEFINE_SPINLOCK(accel_minor_lock);
static struct idr accel_minors_idr;
DEFINE_XARRAY_ALLOC(accel_minors_xa);

static struct dentry *accel_debugfs_root;

@@ -117,99 +116,6 @@ void accel_set_device_instance_params(struct device *kdev, int index)
	kdev->type = &accel_sysfs_device_minor;
}

/**
 * accel_minor_alloc() - Allocates a new accel minor
 *
 * This function access the accel minors idr and allocates from it
 * a new id to represent a new accel minor
 *
 * Return: A new id on success or error code in case idr_alloc failed
 */
int accel_minor_alloc(void)
{
	unsigned long flags;
	int r;

	spin_lock_irqsave(&accel_minor_lock, flags);
	r = idr_alloc(&accel_minors_idr, NULL, 0, ACCEL_MAX_MINORS, GFP_NOWAIT);
	spin_unlock_irqrestore(&accel_minor_lock, flags);

	return r;
}

/**
 * accel_minor_remove() - Remove an accel minor
 * @index: The minor id to remove.
 *
 * This function access the accel minors idr and removes from
 * it the member with the id that is passed to this function.
 */
void accel_minor_remove(int index)
{
	unsigned long flags;

	spin_lock_irqsave(&accel_minor_lock, flags);
	idr_remove(&accel_minors_idr, index);
	spin_unlock_irqrestore(&accel_minor_lock, flags);
}

/**
 * accel_minor_replace() - Replace minor pointer in accel minors idr.
 * @minor: Pointer to the new minor.
 * @index: The minor id to replace.
 *
 * This function access the accel minors idr structure and replaces the pointer
 * that is associated with an existing id. Because the minor pointer can be
 * NULL, we need to explicitly pass the index.
 *
 * Return: 0 for success, negative value for error
 */
void accel_minor_replace(struct drm_minor *minor, int index)
{
	unsigned long flags;

	spin_lock_irqsave(&accel_minor_lock, flags);
	idr_replace(&accel_minors_idr, minor, index);
	spin_unlock_irqrestore(&accel_minor_lock, flags);
}

/*
 * Looks up the given minor-ID and returns the respective DRM-minor object. The
 * refence-count of the underlying device is increased so you must release this
 * object with accel_minor_release().
 *
 * The object can be only a drm_minor that represents an accel device.
 *
 * As long as you hold this minor, it is guaranteed that the object and the
 * minor->dev pointer will stay valid! However, the device may get unplugged and
 * unregistered while you hold the minor.
 */
static struct drm_minor *accel_minor_acquire(unsigned int minor_id)
{
	struct drm_minor *minor;
	unsigned long flags;

	spin_lock_irqsave(&accel_minor_lock, flags);
	minor = idr_find(&accel_minors_idr, minor_id);
	if (minor)
		drm_dev_get(minor->dev);
	spin_unlock_irqrestore(&accel_minor_lock, flags);

	if (!minor) {
		return ERR_PTR(-ENODEV);
	} else if (drm_dev_is_unplugged(minor->dev)) {
		drm_dev_put(minor->dev);
		return ERR_PTR(-ENODEV);
	}

	return minor;
}

static void accel_minor_release(struct drm_minor *minor)
{
	drm_dev_put(minor->dev);
}

/**
 * accel_open - open method for ACCEL file
 * @inode: device inode
@@ -227,7 +133,7 @@ int accel_open(struct inode *inode, struct file *filp)
	struct drm_minor *minor;
	int retcode;

	minor = accel_minor_acquire(iminor(inode));
	minor = drm_minor_acquire(&accel_minors_xa, iminor(inode));
	if (IS_ERR(minor))
		return PTR_ERR(minor);

@@ -246,7 +152,7 @@ int accel_open(struct inode *inode, struct file *filp)

err_undo:
	atomic_dec(&dev->open_count);
	accel_minor_release(minor);
	drm_minor_release(minor);
	return retcode;
}
EXPORT_SYMBOL_GPL(accel_open);
@@ -257,7 +163,7 @@ static int accel_stub_open(struct inode *inode, struct file *filp)
	struct drm_minor *minor;
	int err;

	minor = accel_minor_acquire(iminor(inode));
	minor = drm_minor_acquire(&accel_minors_xa, iminor(inode));
	if (IS_ERR(minor))
		return PTR_ERR(minor);

@@ -274,7 +180,7 @@ static int accel_stub_open(struct inode *inode, struct file *filp)
		err = 0;

out:
	accel_minor_release(minor);
	drm_minor_release(minor);

	return err;
}
@@ -290,15 +196,13 @@ void accel_core_exit(void)
	unregister_chrdev(ACCEL_MAJOR, "accel");
	debugfs_remove(accel_debugfs_root);
	accel_sysfs_destroy();
	idr_destroy(&accel_minors_idr);
	WARN_ON(!xa_empty(&accel_minors_xa));
}

int __init accel_core_init(void)
{
	int ret;

	idr_init(&accel_minors_idr);

	ret = accel_sysfs_init();
	if (ret < 0) {
		DRM_ERROR("Cannot create ACCEL class: %d\n", ret);
+31 −0
Original line number Diff line number Diff line
@@ -149,6 +149,37 @@ config DRM_PANIC_SCREEN
	  or by writing to /sys/module/drm/parameters/panic_screen sysfs entry
	  Default is "user"

config DRM_PANIC_SCREEN_QR_CODE
	bool "Add a panic screen with a QR code"
	depends on DRM_PANIC && RUST
	help
	  This option adds a QR code generator, and a panic screen with a QR
	  code. The QR code will contain the last lines of kmsg and other debug
	  information. This should be easier for the user to report a kernel
	  panic, with all debug information available.
	  To use this panic screen, also set DRM_PANIC_SCREEN to "qr_code"

config DRM_PANIC_SCREEN_QR_CODE_URL
	string "Base URL of the QR code in the panic screen"
	depends on DRM_PANIC_SCREEN_QR_CODE
	help
	  This option sets the base URL to report the kernel panic. If it's set
	  the QR code will contain the URL and the kmsg compressed with zlib as
	  a URL parameter. If it's empty, the QR code will contain the kmsg as
	  uncompressed text only.
	  There is a demo code in javascript, to decode and uncompress the kmsg
	  data from the URL parameter at https://github.com/kdj0c/panic_report

config DRM_PANIC_SCREEN_QR_VERSION
	int "Maximum version (size) of the QR code."
	depends on DRM_PANIC_SCREEN_QR_CODE
	default 40
	help
	  This option limits the version (or size) of the QR code. QR code
	  version ranges from Version 1 (21x21) to Version 40 (177x177).
	  Smaller QR code are easier to read, but will contain less debugging
	  data. Default is 40.

config DRM_DEBUG_DP_MST_TOPOLOGY_REFS
        bool "Enable refcount backtrace history in the DP MST helpers"
	depends on STACKTRACE_SUPPORT
Loading