Commit 49f7844b authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-misc-next-2021-08-05' of git://anongit.freedesktop.org/drm/drm-misc into drm-next



drm-misc-next for v5.15:

UAPI Changes:

Cross-subsystem Changes:

Core Changes:
- Assorted docbook updates.
- Unbreak damage selftests.
- Define DRM_FORMAT_MAX_PLANES, maximum planes for a planar format.
- Add gem fb vmap/vunmap helpers, use them in gud and vkms drivers.

Driver Changes:
- Bridge fixes for ti-sn65dsi86.
- Use a full-featured driver for ATNA33XC20 to get backlight right,
  instead of the simple panel driver.
- Assorted fixes to pl111,.
- Support E Ink VB3300-KCA panel.
- Add support for Gopher 2b LCD and ilitek ili9341 panels.

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

From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/e460fece-cfd9-6aa4-37c1-0fb1b473196d@linux.intel.com
parents 04d505de 5a042273
Loading
Loading
Loading
Loading
+78 −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/ilitek,ili9341.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Ilitek-9341 Display Panel

maintainers:
  - Dillon Min <dillon.minfei@gmail.com>

description: |
  Ilitek ILI9341 TFT panel driver with SPI control bus
  This is a driver for 320x240 TFT panels, accepting a rgb input
  streams with 16 bits or 18 bits.

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

properties:
  compatible:
    items:
      - enum:
          # ili9341 240*320 Color on stm32f429-disco board
        - st,sf-tc240t-9370-t
      - const: ilitek,ili9341

  reg: true

  dc-gpios:
    maxItems: 1
    description: Display data/command selection (D/CX) of this DBI panel

  spi-3wire: true

  spi-max-frequency:
    const: 10000000

  port: true

  vci-supply:
    description: Analog voltage supply (2.5 .. 3.3V)

  vddi-supply:
    description: Voltage supply for interface logic (1.65 .. 3.3 V)

  vddi-led-supply:
    description: Voltage supply for the LED driver (1.65 .. 3.3 V)

additionalProperties: false

required:
  - compatible
  - reg
  - dc-gpios
  - port

examples:
  - |+
    spi {
        #address-cells = <1>;
        #size-cells = <0>;
        panel: display@0 {
                 compatible = "st,sf-tc240t-9370-t",
                              "ilitek,ili9341";
                 reg = <0>;
                 spi-3wire;
                 spi-max-frequency = <10000000>;
                 dc-gpios = <&gpiod 13 0>;
                 port {
                         panel_in: endpoint {
                           remote-endpoint = <&display_out>;
                      };
                 };
             };
        };
...
+4 −0
Original line number Diff line number Diff line
@@ -138,6 +138,8 @@ properties:
        # Emerging Display Technology Corp. 5.7" VGA TFT LCD panel with
        # capacitive touch
      - edt,etmv570g2dhu
        # E Ink VB3300-KCA
      - eink,vb3300-kca
        # Evervision Electronics Co. Ltd. VGG804821 5.0" WVGA TFT LCD Panel
      - evervision,vgg804821
        # Foxlink Group 5" WVGA TFT LCD panel
@@ -254,6 +256,8 @@ properties:
      - powertip,ph800480t013-idf02
        # QiaoDian XianShi Corporation 4"3 TFT LCD panel
      - qiaodian,qd43003c0-40
        # Shenzhen QiShenglong Industrialist Co., Ltd. Gopher 2b 4.3" 480(RGB)x272 TFT LCD panel
      - qishenglong,gopher2b-lcd
        # Rocktech Displays Ltd. RK101II01D-CT 10.1" TFT 1280x800
      - rocktech,rk101ii01d-ct
        # Rocktech Display Ltd. RK070ER9427 800(RGB)x480 TFT LCD panel
+2 −0
Original line number Diff line number Diff line
@@ -339,6 +339,8 @@ patternProperties:
    description: eGalax_eMPIA Technology Inc
  "^einfochips,.*":
    description: Einfochips
  "^eink,.*":
    description: E Ink Corporation
  "^elan,.*":
    description: Elan Microelectronic Corp.
  "^element14,.*":
+2 −0
Original line number Diff line number Diff line
@@ -159,6 +159,8 @@ KMS Core Structures and Functions
.. kernel-doc:: drivers/gpu/drm/drm_mode_config.c
   :export:

.. _kms_base_object_abstraction:

Modeset Base Object Abstraction
===============================

+20 −11
Original line number Diff line number Diff line
@@ -498,13 +498,15 @@ static void ast_set_sync_reg(struct ast_private *ast,

	jreg  = ast_io_read8(ast, AST_IO_MISC_PORT_READ);
	jreg &= ~0xC0;
	if (vbios_mode->enh_table->flags & NVSync) jreg |= 0x80;
	if (vbios_mode->enh_table->flags & NHSync) jreg |= 0x40;
	if (vbios_mode->enh_table->flags & NVSync)
		jreg |= 0x80;
	if (vbios_mode->enh_table->flags & NHSync)
		jreg |= 0x40;
	ast_io_write8(ast, AST_IO_MISC_PORT_WRITE, jreg);
}

static void ast_set_start_address_crt1(struct ast_private *ast,
				       unsigned offset)
				       unsigned int offset)
{
	u32 addr;

@@ -1211,6 +1213,7 @@ static int ast_get_modes(struct drm_connector *connector)
	struct edid *edid;
	int ret;
	bool flags = false;

	if (ast->tx_chip_type == AST_TX_DP501) {
		ast->dp501_maxclk = 0xff;
		edid = kmalloc(128, GFP_KERNEL);
@@ -1230,7 +1233,7 @@ static int ast_get_modes(struct drm_connector *connector)
		ret = drm_add_edid_modes(connector, edid);
		kfree(edid);
		return ret;
	} else
	}
	drm_connector_update_edid_property(&ast_connector->base, NULL);
	return 0;
}
@@ -1271,19 +1274,24 @@ static enum drm_mode_status ast_mode_valid(struct drm_connector *connector,
	}
	switch (mode->hdisplay) {
	case 640:
		if (mode->vdisplay == 480) flags = MODE_OK;
		if (mode->vdisplay == 480)
			flags = MODE_OK;
		break;
	case 800:
		if (mode->vdisplay == 600) flags = MODE_OK;
		if (mode->vdisplay == 600)
			flags = MODE_OK;
		break;
	case 1024:
		if (mode->vdisplay == 768) flags = MODE_OK;
		if (mode->vdisplay == 768)
			flags = MODE_OK;
		break;
	case 1280:
		if (mode->vdisplay == 1024) flags = MODE_OK;
		if (mode->vdisplay == 1024)
			flags = MODE_OK;
		break;
	case 1600:
		if (mode->vdisplay == 1200) flags = MODE_OK;
		if (mode->vdisplay == 1200)
			flags = MODE_OK;
		break;
	default:
		return flags;
@@ -1307,6 +1315,7 @@ static enum drm_connector_status ast_connector_detect(struct drm_connector
static void ast_connector_destroy(struct drm_connector *connector)
{
	struct ast_connector *ast_connector = to_ast_connector(connector);

	ast_i2c_destroy(ast_connector->i2c);
	drm_connector_cleanup(connector);
}
Loading