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

Merge tag 'drm-misc-next-2023-01-12' of git://anongit.freedesktop.org/drm/drm-misc into drm-next



drm-misc-next for v6.3:

UAPI Changes:

 * fourcc: Document Open Source user waiver

Cross-subsystem Changes:

 * firmware: fix color-format selection for system framebuffers

Core Changes:

 * format-helper: Add conversion from XRGB8888 to various sysfb formats;
   Make XRGB8888 the only driver-emulated legacy format

 * fb-helper: Avoid blank consoles from selecting an incorrect color format

 * probe-helper: Enable/disable HPD on connectors plus driver updates

 * Use drm_dbg_ helpers in several places

 * docs: Document defaults for CRTC backgrounds; Document use of drm_minor

Driver Changes:

 * arm/hdlcd: Use new debugfs helpers

 * gud: Use new debugfs helpers

 * panel: Support Visionox VTDR6130 AMOLED DSI; Support Himax HX8394; Convert
   many drivers to common generic DSI write-sequence helper

 * v3d: Do not opencode drm_gem_object_lookup()

 * vc4: Various HVS an CRTC fixes

 * vkms: Fix SEGFAULT from incorrect GEM-buffer mapping

 * Convert various drivers to i2c probe_new()

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

From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/Y8ADeSzZDj+tpibF@linux-uq9g
parents 1f1c24de 6e41acd2
Loading
Loading
Loading
Loading
+76 −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/himax,hx8394.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Himax HX8394 MIPI-DSI LCD panel controller

maintainers:
  - Ondrej Jirman <megi@xff.cz>
  - Javier Martinez Canillas <javierm@redhat.com>

description:
  Device tree bindings for panels based on the Himax HX8394 controller,
  such as the HannStar HSD060BHW4 720x1440 TFT LCD panel connected with
  a MIPI-DSI video interface.

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

properties:
  compatible:
    items:
      - enum:
          - hannstar,hsd060bhw4
      - const: himax,hx8394

  reg: true

  reset-gpios: true

  backlight: true

  port: true

  vcc-supply:
    description: Panel power supply

  iovcc-supply:
    description: I/O voltage supply

required:
  - compatible
  - reg
  - reset-gpios
  - backlight
  - port
  - vcc-supply
  - iovcc-supply

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>

    dsi {
        #address-cells = <1>;
        #size-cells = <0>;
        panel@0 {
            compatible = "hannstar,hsd060bhw4", "himax,hx8394";
            reg = <0>;
            vcc-supply = <&reg_2v8_p>;
            iovcc-supply = <&reg_1v8_p>;
            reset-gpios = <&gpio3 13 GPIO_ACTIVE_LOW>;
            backlight = <&backlight>;

            port {
                mipi_in_panel: endpoint {
                    remote-endpoint = <&mipi_out_panel>;
                };
            };
        };
    };

...
+53 −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/visionox,vtdr6130.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Visionox VTDR6130 AMOLED DSI Panel

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

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

properties:
  compatible:
    const: visionox,vtdr6130

  vddio-supply: true
  vci-supply: true
  vdd-supply: true
  port: true
  reset-gpios: true

additionalProperties: false

required:
  - compatible
  - vddio-supply
  - vci-supply
  - vdd-supply
  - reset-gpios
  - port

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    panel {
        compatible = "visionox,vtdr6130";

        vddio-supply = <&vreg_l12b_1p8>;
        vci-supply = <&vreg_l13b_3p0>;
        vdd-supply = <&vreg_l11b_1p2>;

        reset-gpios = <&tlmm 133 GPIO_ACTIVE_LOW>;

        port {
            panel0_in: endpoint {
                remote-endpoint = <&dsi0_out>;
            };
        };
    };
...
+1 −0
Original line number Diff line number Diff line
@@ -222,6 +222,7 @@ Code Seq# Include File Comments
'a'   00-0F  drivers/crypto/qat/qat_common/adf_cfg_common.h          conflict! qat driver
'b'   00-FF                                                          conflict! bit3 vme host bridge
                                                                     <mailto:natalia@nikhefk.nikhef.nl>
'b'   00-0F  linux/dma-buf.h                                         conflict!
'c'   all    linux/cm4000_cs.h                                       conflict!
'c'   00-7F  linux/comstats.h                                        conflict!
'c'   00-7F  linux/coda.h                                            conflict!
+8 −1
Original line number Diff line number Diff line
@@ -6550,6 +6550,14 @@ S: Maintained
T:	git git://anongit.freedesktop.org/drm/drm-misc
F:	drivers/gpu/drm/tiny/gm12u320.c
DRM DRIVER FOR HIMAX HX8394 MIPI-DSI LCD panels
M:	Ondrej Jirman <megi@xff.cz>
M:	Javier Martinez Canillas <javierm@redhat.com>
S:	Maintained
T:	git git://anongit.freedesktop.org/drm/drm-misc
F:	Documentation/devicetree/bindings/display/panel/himax,hx8394.yaml
F:	drivers/gpu/drm/panel/panel-himax-hx8394.c
DRM DRIVER FOR HX8357D PANELS
M:	Emma Anholt <emma@anholt.net>
S:	Maintained
@@ -7009,7 +7017,6 @@ M: Xinliang Liu <xinliang.liu@linaro.org>
M:	Tian Tao  <tiantao6@hisilicon.com>
R:	John Stultz <jstultz@google.com>
R:	Xinwei Kong <kong.kongxinwei@hisilicon.com>
R:	Chen Feng <puck.chen@hisilicon.com>
L:	dri-devel@lists.freedesktop.org
S:	Maintained
T:	git git://anongit.freedesktop.org/drm/drm-misc
+37 −6
Original line number Diff line number Diff line
@@ -27,25 +27,56 @@ static const struct simplefb_format formats[] = SIMPLEFB_FORMATS;
__init bool sysfb_parse_mode(const struct screen_info *si,
			     struct simplefb_platform_data *mode)
{
	const struct simplefb_format *f;
	__u8 type;
	u32 bits_per_pixel;
	unsigned int i;

	type = si->orig_video_isVGA;
	if (type != VIDEO_TYPE_VLFB && type != VIDEO_TYPE_EFI)
		return false;

	/*
	 * The meaning of depth and bpp for direct-color formats is
	 * inconsistent:
	 *
	 *  - DRM format info specifies depth as the number of color
	 *    bits; including alpha, but not including filler bits.
	 *  - Linux' EFI platform code computes lfb_depth from the
	 *    individual color channels, including the reserved bits.
	 *  - VBE 1.1 defines lfb_depth for XRGB1555 as 16, but later
	 *    versions use 15.
	 *  - On the kernel command line, 'bpp' of 32 is usually
	 *    XRGB8888 including the filler bits, but 15 is XRGB1555
	 *    not including the filler bit.
	 *
	 * It's not easily possible to fix this in struct screen_info,
	 * as this could break UAPI. The best solution is to compute
	 * bits_per_pixel here and ignore lfb_depth. In the loop below,
	 * ignore simplefb formats with alpha bits, as EFI and VESA
	 * don't specify alpha channels.
	 */
	if (si->lfb_depth > 8) {
		bits_per_pixel = max(max3(si->red_size + si->red_pos,
					  si->green_size + si->green_pos,
					  si->blue_size + si->blue_pos),
				     si->rsvd_size + si->rsvd_pos);
	} else {
		bits_per_pixel = si->lfb_depth;
	}

	for (i = 0; i < ARRAY_SIZE(formats); ++i) {
		f = &formats[i];
		if (si->lfb_depth == f->bits_per_pixel &&
		const struct simplefb_format *f = &formats[i];

		if (f->transp.length)
			continue; /* transparent formats are unsupported by VESA/EFI */

		if (bits_per_pixel == f->bits_per_pixel &&
		    si->red_size == f->red.length &&
		    si->red_pos == f->red.offset &&
		    si->green_size == f->green.length &&
		    si->green_pos == f->green.offset &&
		    si->blue_size == f->blue.length &&
		    si->blue_pos == f->blue.offset &&
		    si->rsvd_size == f->transp.length &&
		    si->rsvd_pos == f->transp.offset) {
		    si->blue_pos == f->blue.offset) {
			mode->format = f->name;
			mode->width = si->lfb_width;
			mode->height = si->lfb_height;
Loading