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

Merge tag 'drm-misc-next-2025-06-26' of...

Merge tag 'drm-misc-next-2025-06-26' of https://gitlab.freedesktop.org/drm/misc/kernel

 into drm-next

drm-misc-next for 6.17:

UAPI Changes:

Cross-subsystem Changes:

Core Changes:
- ci: Add Device tree validation and kunit
- connector: Move HDR sink metadat to drm_display_info

Driver Changes:
- bochs: drm_panic Support
- panfrost: MT8370 Support

- bridge:
  - tc358767: Convert to devm_drm_bridge_alloc()

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

From: Maxime Ripard <mripard@redhat.com>
Link: https://lore.kernel.org/r/20250626-sincere-loon-of-effort-6dbdf9@houat
parents 36c52fb7 d6b93bfa
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ properties:
          - enum:
              - mediatek,mt8188-mali
              - mediatek,mt8192-mali
              - mediatek,mt8370-mali
          - const: arm,mali-valhall-jm # Mali Valhall GPU model/revision is fully discoverable

  reg:
@@ -225,7 +226,9 @@ allOf:
      properties:
        compatible:
          contains:
            const: mediatek,mt8186-mali
            enum:
              - mediatek,mt8186-mali
              - mediatek,mt8370-mali
    then:
      properties:
        power-domains:
+16 −0
Original line number Diff line number Diff line
@@ -59,6 +59,22 @@ &cpu_little3_cooling_map0 {
				<&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};

/*
 * Please note that overriding compatibles is a discouraged practice and is a
 * clear indication of nodes not being, well, compatible!
 *
 * This is a special case, where the GPU is the same as MT8188, but with one
 * of the cores fused out in this lower-binned SoC.
 */
&gpu {
	compatible = "mediatek,mt8370-mali", "arm,mali-valhall-jm";

	power-domains = <&spm MT8188_POWER_DOMAIN_MFG2>,
			<&spm MT8188_POWER_DOMAIN_MFG3>;

	power-domain-names = "core0", "core1";
};

&ppi_cluster0 {
	affinity = <&cpu0 &cpu1 &cpu2 &cpu3>;
};
+40 −16
Original line number Diff line number Diff line
@@ -344,6 +344,14 @@
#define COLOR_BAR_MODE_BARS	2
#define PLL_DBG			0x0a04

enum tc_mode {
	mode_dpi_to_edp = BIT(1) | BIT(2),
	mode_dpi_to_dp  = BIT(1),
	mode_dsi_to_edp = BIT(0) | BIT(2),
	mode_dsi_to_dp  = BIT(0),
	mode_dsi_to_dpi = BIT(0) | BIT(1),
};

static bool tc_test_pattern;
module_param_named(test, tc_test_pattern, bool, 0644);

@@ -2327,7 +2335,6 @@ static int tc_probe_dpi_bridge_endpoint(struct tc_data *tc)
	if (bridge) {
		tc->panel_bridge = bridge;
		tc->bridge.type = DRM_MODE_CONNECTOR_DPI;
		tc->bridge.funcs = &tc_dpi_bridge_funcs;

		return 0;
	}
@@ -2360,7 +2367,6 @@ static int tc_probe_edp_bridge_endpoint(struct tc_data *tc)
		tc->bridge.type = DRM_MODE_CONNECTOR_DisplayPort;
	}

	tc->bridge.funcs = &tc_edp_bridge_funcs;
	if (tc->hpd_pin >= 0)
		tc->bridge.ops |= DRM_BRIDGE_OP_DETECT;
	tc->bridge.ops |= DRM_BRIDGE_OP_EDID;
@@ -2368,17 +2374,11 @@ static int tc_probe_edp_bridge_endpoint(struct tc_data *tc)
	return 0;
}

static int tc_probe_bridge_endpoint(struct tc_data *tc)
static enum tc_mode tc_probe_get_mode(struct device *dev)
{
	struct device *dev = tc->dev;
	struct of_endpoint endpoint;
	struct device_node *node = NULL;
	const u8 mode_dpi_to_edp = BIT(1) | BIT(2);
	const u8 mode_dpi_to_dp = BIT(1);
	const u8 mode_dsi_to_edp = BIT(0) | BIT(2);
	const u8 mode_dsi_to_dp = BIT(0);
	const u8 mode_dsi_to_dpi = BIT(0) | BIT(1);
	u8 mode = 0;
	enum tc_mode mode = 0;

	/*
	 * Determine bridge configuration.
@@ -2401,7 +2401,27 @@ static int tc_probe_bridge_endpoint(struct tc_data *tc)
			return -EINVAL;
		}
		mode |= BIT(endpoint.port);
	}

	if (mode != mode_dpi_to_edp &&
	    mode != mode_dpi_to_dp  &&
	    mode != mode_dsi_to_dpi &&
	    mode != mode_dsi_to_edp &&
	    mode != mode_dsi_to_dp) {
		dev_warn(dev, "Invalid mode (0x%x) is not supported!\n", mode);
		return -EINVAL;
	}

	return mode;
}

static int tc_probe_bridge_endpoint(struct tc_data *tc, enum tc_mode mode)
{
	struct device *dev = tc->dev;
	struct of_endpoint endpoint;
	struct device_node *node = NULL;

	for_each_endpoint_of_node(dev->of_node, node) {
		if (endpoint.port == 2) {
			of_property_read_u8_array(node, "toshiba,pre-emphasis",
						  tc->pre_emphasis,
@@ -2427,24 +2447,28 @@ static int tc_probe_bridge_endpoint(struct tc_data *tc)
		return tc_probe_edp_bridge_endpoint(tc);
	}

	dev_warn(dev, "Invalid mode (0x%x) is not supported!\n", mode);

	/* Should never happen, mode was validated by tc_probe_get_mode() */
	return -EINVAL;
}

static int tc_probe(struct i2c_client *client)
{
	struct device *dev = &client->dev;
	const struct drm_bridge_funcs *funcs;
	struct tc_data *tc;
	int mode;
	int ret;

	tc = devm_kzalloc(dev, sizeof(*tc), GFP_KERNEL);
	if (!tc)
		return -ENOMEM;
	mode = tc_probe_get_mode(dev);
	funcs = (mode == mode_dsi_to_dpi) ? &tc_dpi_bridge_funcs : &tc_edp_bridge_funcs;

	tc = devm_drm_bridge_alloc(dev, struct tc_data, bridge, funcs);
	if (IS_ERR(tc))
		return PTR_ERR(tc);

	tc->dev = dev;

	ret = tc_probe_bridge_endpoint(tc);
	ret = tc_probe_bridge_endpoint(tc, mode);
	if (ret)
		return ret;

+50 −0
Original line number Diff line number Diff line
.dt-check-base:
  stage: static-checks
  timeout: "30m"
  variables:
    GIT_DEPTH: 1
    FF_USE_NEW_BASH_EVAL_STRATEGY: 'true'
    SCHEMA: "display:gpu"
    VENV_PATH: "/tmp/dtcheck-venv"
  before_script:
    - apt-get update -qq
    # Minimum supported version of LLVM for building x86 kernels is 15.0.0.
    # In mesa-ci containers, LLVM_VERSION is defined as a container-level property and is currently set to 19.
    - apt-get install -y --no-install-recommends clang-${LLVM_VERSION} lld-${LLVM_VERSION} llvm-${LLVM_VERSION} python3-dev python3-venv python3-pip yamllint
    - python3 -m venv "${VENV_PATH}"
    - source "${VENV_PATH}/bin/activate"
    - pip3 install dtschema
  script:
    - drivers/gpu/drm/ci/${SCRIPT_NAME}
  artifacts:
    when: on_failure
    paths:
      - ${ARTIFACT_FILE}
  allow_failure:
    exit_codes:
      - 102

dtbs-check:arm32:
  extends:
    - .build:arm32
    - .dt-check-base
  variables:
    SCRIPT_NAME: "dtbs-check.sh"
    ARTIFACT_FILE: "dtbs-check.log"

dtbs-check:arm64:
  extends:
    - .build:arm64
    - .dt-check-base
  variables:
    SCRIPT_NAME: "dtbs-check.sh"
    ARTIFACT_FILE: "dtbs-check.log"

dt-binding-check:
  extends:
    - .build
    - .use-debian/x86_64_build
    - .dt-check-base
  variables:
    SCRIPT_NAME: "dt-binding-check.sh"
    ARTIFACT_FILE: "dt-binding-check.log"
+19 −0
Original line number Diff line number Diff line
#!/bin/bash
# SPDX-License-Identifier: MIT

set -euxo pipefail

VENV_PATH="${VENV_PATH:-/tmp/dtschema-venv}"
source "${VENV_PATH}/bin/activate"

if ! make -j"${FDO_CI_CONCURRENT:-4}" dt_binding_check \
        DT_SCHEMA_FILES="${SCHEMA:-}" 2>dt-binding-check.log; then
    echo "ERROR: 'make dt_binding_check' failed. Please check dt-binding-check.log for details."
    exit 1
fi

if [[ -s dt-binding-check.log ]]; then
    echo "WARNING: dt_binding_check reported warnings. Please check dt-binding-check.log" \
         "for details."
    exit 102
fi
Loading