Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: Dave Airlie <airlied@redhat.com>

From: Maxime Ripard <mripard@redhat.com>
Link: https://lore.kernel.org/r/20250626-sincere-loon-of-effort-6dbdf9@houat

+292 -61
+4 -1
Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml
··· 42 42 - enum: 43 43 - mediatek,mt8188-mali 44 44 - mediatek,mt8192-mali 45 + - mediatek,mt8370-mali 45 46 - const: arm,mali-valhall-jm # Mali Valhall GPU model/revision is fully discoverable 46 47 47 48 reg: ··· 226 225 properties: 227 226 compatible: 228 227 contains: 229 - const: mediatek,mt8186-mali 228 + enum: 229 + - mediatek,mt8186-mali 230 + - mediatek,mt8370-mali 230 231 then: 231 232 properties: 232 233 power-domains:
+16
arch/arm64/boot/dts/mediatek/mt8370.dtsi
··· 59 59 <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; 60 60 }; 61 61 62 + /* 63 + * Please note that overriding compatibles is a discouraged practice and is a 64 + * clear indication of nodes not being, well, compatible! 65 + * 66 + * This is a special case, where the GPU is the same as MT8188, but with one 67 + * of the cores fused out in this lower-binned SoC. 68 + */ 69 + &gpu { 70 + compatible = "mediatek,mt8370-mali", "arm,mali-valhall-jm"; 71 + 72 + power-domains = <&spm MT8188_POWER_DOMAIN_MFG2>, 73 + <&spm MT8188_POWER_DOMAIN_MFG3>; 74 + 75 + power-domain-names = "core0", "core1"; 76 + }; 77 + 62 78 &ppi_cluster0 { 63 79 affinity = <&cpu0 &cpu1 &cpu2 &cpu3>; 64 80 };
+40 -16
drivers/gpu/drm/bridge/tc358767.c
··· 344 344 #define COLOR_BAR_MODE_BARS 2 345 345 #define PLL_DBG 0x0a04 346 346 347 + enum tc_mode { 348 + mode_dpi_to_edp = BIT(1) | BIT(2), 349 + mode_dpi_to_dp = BIT(1), 350 + mode_dsi_to_edp = BIT(0) | BIT(2), 351 + mode_dsi_to_dp = BIT(0), 352 + mode_dsi_to_dpi = BIT(0) | BIT(1), 353 + }; 354 + 347 355 static bool tc_test_pattern; 348 356 module_param_named(test, tc_test_pattern, bool, 0644); 349 357 ··· 2335 2327 if (bridge) { 2336 2328 tc->panel_bridge = bridge; 2337 2329 tc->bridge.type = DRM_MODE_CONNECTOR_DPI; 2338 - tc->bridge.funcs = &tc_dpi_bridge_funcs; 2339 2330 2340 2331 return 0; 2341 2332 } ··· 2367 2360 tc->bridge.type = DRM_MODE_CONNECTOR_DisplayPort; 2368 2361 } 2369 2362 2370 - tc->bridge.funcs = &tc_edp_bridge_funcs; 2371 2363 if (tc->hpd_pin >= 0) 2372 2364 tc->bridge.ops |= DRM_BRIDGE_OP_DETECT; 2373 2365 tc->bridge.ops |= DRM_BRIDGE_OP_EDID; ··· 2374 2368 return 0; 2375 2369 } 2376 2370 2377 - static int tc_probe_bridge_endpoint(struct tc_data *tc) 2371 + static enum tc_mode tc_probe_get_mode(struct device *dev) 2378 2372 { 2379 - struct device *dev = tc->dev; 2380 2373 struct of_endpoint endpoint; 2381 2374 struct device_node *node = NULL; 2382 - const u8 mode_dpi_to_edp = BIT(1) | BIT(2); 2383 - const u8 mode_dpi_to_dp = BIT(1); 2384 - const u8 mode_dsi_to_edp = BIT(0) | BIT(2); 2385 - const u8 mode_dsi_to_dp = BIT(0); 2386 - const u8 mode_dsi_to_dpi = BIT(0) | BIT(1); 2387 - u8 mode = 0; 2375 + enum tc_mode mode = 0; 2388 2376 2389 2377 /* 2390 2378 * Determine bridge configuration. ··· 2401 2401 return -EINVAL; 2402 2402 } 2403 2403 mode |= BIT(endpoint.port); 2404 + } 2404 2405 2406 + if (mode != mode_dpi_to_edp && 2407 + mode != mode_dpi_to_dp && 2408 + mode != mode_dsi_to_dpi && 2409 + mode != mode_dsi_to_edp && 2410 + mode != mode_dsi_to_dp) { 2411 + dev_warn(dev, "Invalid mode (0x%x) is not supported!\n", mode); 2412 + return -EINVAL; 2413 + } 2414 + 2415 + return mode; 2416 + } 2417 + 2418 + static int tc_probe_bridge_endpoint(struct tc_data *tc, enum tc_mode mode) 2419 + { 2420 + struct device *dev = tc->dev; 2421 + struct of_endpoint endpoint; 2422 + struct device_node *node = NULL; 2423 + 2424 + for_each_endpoint_of_node(dev->of_node, node) { 2405 2425 if (endpoint.port == 2) { 2406 2426 of_property_read_u8_array(node, "toshiba,pre-emphasis", 2407 2427 tc->pre_emphasis, ··· 2447 2427 return tc_probe_edp_bridge_endpoint(tc); 2448 2428 } 2449 2429 2450 - dev_warn(dev, "Invalid mode (0x%x) is not supported!\n", mode); 2451 - 2430 + /* Should never happen, mode was validated by tc_probe_get_mode() */ 2452 2431 return -EINVAL; 2453 2432 } 2454 2433 2455 2434 static int tc_probe(struct i2c_client *client) 2456 2435 { 2457 2436 struct device *dev = &client->dev; 2437 + const struct drm_bridge_funcs *funcs; 2458 2438 struct tc_data *tc; 2439 + int mode; 2459 2440 int ret; 2460 2441 2461 - tc = devm_kzalloc(dev, sizeof(*tc), GFP_KERNEL); 2462 - if (!tc) 2463 - return -ENOMEM; 2442 + mode = tc_probe_get_mode(dev); 2443 + funcs = (mode == mode_dsi_to_dpi) ? &tc_dpi_bridge_funcs : &tc_edp_bridge_funcs; 2444 + 2445 + tc = devm_drm_bridge_alloc(dev, struct tc_data, bridge, funcs); 2446 + if (IS_ERR(tc)) 2447 + return PTR_ERR(tc); 2464 2448 2465 2449 tc->dev = dev; 2466 2450 2467 - ret = tc_probe_bridge_endpoint(tc); 2451 + ret = tc_probe_bridge_endpoint(tc, mode); 2468 2452 if (ret) 2469 2453 return ret; 2470 2454
+50
drivers/gpu/drm/ci/check-devicetrees.yml
··· 1 + .dt-check-base: 2 + stage: static-checks 3 + timeout: "30m" 4 + variables: 5 + GIT_DEPTH: 1 6 + FF_USE_NEW_BASH_EVAL_STRATEGY: 'true' 7 + SCHEMA: "display:gpu" 8 + VENV_PATH: "/tmp/dtcheck-venv" 9 + before_script: 10 + - apt-get update -qq 11 + # Minimum supported version of LLVM for building x86 kernels is 15.0.0. 12 + # In mesa-ci containers, LLVM_VERSION is defined as a container-level property and is currently set to 19. 13 + - apt-get install -y --no-install-recommends clang-${LLVM_VERSION} lld-${LLVM_VERSION} llvm-${LLVM_VERSION} python3-dev python3-venv python3-pip yamllint 14 + - python3 -m venv "${VENV_PATH}" 15 + - source "${VENV_PATH}/bin/activate" 16 + - pip3 install dtschema 17 + script: 18 + - drivers/gpu/drm/ci/${SCRIPT_NAME} 19 + artifacts: 20 + when: on_failure 21 + paths: 22 + - ${ARTIFACT_FILE} 23 + allow_failure: 24 + exit_codes: 25 + - 102 26 + 27 + dtbs-check:arm32: 28 + extends: 29 + - .build:arm32 30 + - .dt-check-base 31 + variables: 32 + SCRIPT_NAME: "dtbs-check.sh" 33 + ARTIFACT_FILE: "dtbs-check.log" 34 + 35 + dtbs-check:arm64: 36 + extends: 37 + - .build:arm64 38 + - .dt-check-base 39 + variables: 40 + SCRIPT_NAME: "dtbs-check.sh" 41 + ARTIFACT_FILE: "dtbs-check.log" 42 + 43 + dt-binding-check: 44 + extends: 45 + - .build 46 + - .use-debian/x86_64_build 47 + - .dt-check-base 48 + variables: 49 + SCRIPT_NAME: "dt-binding-check.sh" 50 + ARTIFACT_FILE: "dt-binding-check.log"
+19
drivers/gpu/drm/ci/dt-binding-check.sh
··· 1 + #!/bin/bash 2 + # SPDX-License-Identifier: MIT 3 + 4 + set -euxo pipefail 5 + 6 + VENV_PATH="${VENV_PATH:-/tmp/dtschema-venv}" 7 + source "${VENV_PATH}/bin/activate" 8 + 9 + if ! make -j"${FDO_CI_CONCURRENT:-4}" dt_binding_check \ 10 + DT_SCHEMA_FILES="${SCHEMA:-}" 2>dt-binding-check.log; then 11 + echo "ERROR: 'make dt_binding_check' failed. Please check dt-binding-check.log for details." 12 + exit 1 13 + fi 14 + 15 + if [[ -s dt-binding-check.log ]]; then 16 + echo "WARNING: dt_binding_check reported warnings. Please check dt-binding-check.log" \ 17 + "for details." 18 + exit 102 19 + fi
+22
drivers/gpu/drm/ci/dtbs-check.sh
··· 1 + #!/bin/bash 2 + # SPDX-License-Identifier: MIT 3 + 4 + set -euxo pipefail 5 + 6 + : "${KERNEL_ARCH:?ERROR: KERNEL_ARCH must be set}" 7 + : "${LLVM_VERSION:?ERROR: LLVM_VERSION must be set}" 8 + 9 + ./drivers/gpu/drm/ci/setup-llvm-links.sh 10 + 11 + make LLVM=1 ARCH="${KERNEL_ARCH}" defconfig 12 + 13 + if ! make -j"${FDO_CI_CONCURRENT:-4}" ARCH="${KERNEL_ARCH}" LLVM=1 dtbs_check \ 14 + DT_SCHEMA_FILES="${SCHEMA:-}" 2>dtbs-check.log; then 15 + echo "ERROR: 'make dtbs_check' failed. Please check dtbs-check.log for details." 16 + exit 1 17 + fi 18 + 19 + if [[ -s dtbs-check.log ]]; then 20 + echo "WARNING: dtbs_check reported warnings. Please check dtbs-check.log for details." 21 + exit 102 22 + fi
+4
drivers/gpu/drm/ci/gitlab-ci.yml
··· 110 110 - drivers/gpu/drm/ci/static-checks.yml 111 111 - drivers/gpu/drm/ci/build.yml 112 112 - drivers/gpu/drm/ci/test.yml 113 + - drivers/gpu/drm/ci/check-devicetrees.yml 114 + - drivers/gpu/drm/ci/kunit.yml 113 115 - 'https://gitlab.freedesktop.org/gfx-ci/lab-status/-/raw/main/lab-status.yml' 114 116 115 117 ··· 121 119 - git-archive 122 120 - build-for-tests 123 121 - build-only 122 + - static-checks 123 + - kunit 124 124 - code-validation 125 125 - amdgpu 126 126 - i915
+16
drivers/gpu/drm/ci/kunit.sh
··· 1 + #!/bin/bash 2 + # SPDX-License-Identifier: MIT 3 + 4 + set -euxo pipefail 5 + 6 + : "${KERNEL_ARCH:?ERROR: KERNEL_ARCH must be set}" 7 + : "${LLVM_VERSION:?ERROR: LLVM_VERSION must be set}" 8 + 9 + ./drivers/gpu/drm/ci/setup-llvm-links.sh 10 + 11 + export PATH="/usr/bin:$PATH" 12 + 13 + ./tools/testing/kunit/kunit.py run \ 14 + --arch "${KERNEL_ARCH}" \ 15 + --make_options LLVM=1 \ 16 + --kunitconfig=drivers/gpu/drm/tests
+37
drivers/gpu/drm/ci/kunit.yml
··· 1 + .kunit-packages: &kunit-packages 2 + - apt-get update -qq 3 + # Minimum supported version of LLVM for building x86 kernels is 15.0.0. 4 + # In mesa-ci containers, LLVM_VERSION is defined as a container-level property and is currently set to 19. 5 + - apt-get install -y --no-install-recommends clang-${LLVM_VERSION} lld-${LLVM_VERSION} llvm-${LLVM_VERSION} 6 + 7 + .kunit-base: 8 + stage: kunit 9 + timeout: "30m" 10 + variables: 11 + GIT_DEPTH: 1 12 + script: 13 + - drivers/gpu/drm/ci/kunit.sh 14 + 15 + kunit:arm32: 16 + extends: 17 + - .build:arm32 18 + - .kunit-base 19 + before_script: 20 + - *kunit-packages 21 + - apt-get install -y --no-install-recommends qemu-system-arm 22 + 23 + kunit:arm64: 24 + extends: 25 + - .build:arm64 26 + - .kunit-base 27 + before_script: 28 + - *kunit-packages 29 + - apt-get install -y --no-install-recommends qemu-system-aarch64 30 + 31 + kunit:x86_64: 32 + extends: 33 + - .build:x86_64 34 + - .kunit-base 35 + before_script: 36 + - *kunit-packages 37 + - apt-get install -y --no-install-recommends qemu-system-x86
+13
drivers/gpu/drm/ci/setup-llvm-links.sh
··· 1 + #!/usr/bin/env bash 2 + # SPDX-License-Identifier: MIT 3 + set -euo pipefail 4 + 5 + ln -svf "$(which clang++-${LLVM_VERSION})" /usr/bin/clang++ 6 + ln -svf "$(which clang-${LLVM_VERSION})" /usr/bin/clang 7 + ln -svf "$(which ld.lld-${LLVM_VERSION})" /usr/bin/ld.lld 8 + ln -svf "$(which lld-${LLVM_VERSION})" /usr/bin/lld 9 + ln -svf "$(which llvm-ar-${LLVM_VERSION})" /usr/bin/llvm-ar 10 + ln -svf "$(which llvm-nm-${LLVM_VERSION})" /usr/bin/llvm-nm 11 + ln -svf "$(which llvm-objcopy-${LLVM_VERSION})" /usr/bin/llvm-objcopy 12 + ln -svf "$(which llvm-readelf-${LLVM_VERSION})" /usr/bin/llvm-readelf 13 + ln -svf "$(which llvm-strip-${LLVM_VERSION})" /usr/bin/llvm-strip
+1 -1
drivers/gpu/drm/display/drm_hdmi_helper.c
··· 45 45 46 46 /* Sink EOTF is Bit map while infoframe is absolute values */ 47 47 if (!is_eotf_supported(hdr_metadata->hdmi_metadata_type1.eotf, 48 - connector->hdr_sink_metadata.hdmi_type1.eotf)) 48 + connector->display_info.hdr_sink_metadata.hdmi_type1.eotf)) 49 49 DRM_DEBUG_KMS("Unknown EOTF %d\n", hdr_metadata->hdmi_metadata_type1.eotf); 50 50 51 51 err = hdmi_drm_infoframe_init(frame);
+1 -1
drivers/gpu/drm/drm_connector.c
··· 1687 1687 * structure from userspace. This is received as blob and stored in 1688 1688 * &drm_connector_state.hdr_output_metadata. It parses EDID and saves the 1689 1689 * sink metadata in &struct hdr_sink_metadata, as 1690 - * &drm_connector.hdr_sink_metadata. Driver uses 1690 + * &drm_connector.display_info.hdr_sink_metadata. Driver uses 1691 1691 * drm_hdmi_infoframe_set_hdr_metadata() helper to set the HDR metadata, 1692 1692 * hdmi_drm_infoframe_pack() to pack the infoframe as per spec, in case of 1693 1693 * HDMI encoder.
+10 -9
drivers/gpu/drm/drm_edid.c
··· 5394 5394 5395 5395 static void drm_calculate_luminance_range(struct drm_connector *connector) 5396 5396 { 5397 - struct hdr_static_metadata *hdr_metadata = &connector->hdr_sink_metadata.hdmi_type1; 5397 + const struct hdr_static_metadata *hdr_metadata = 5398 + &connector->display_info.hdr_sink_metadata.hdmi_type1; 5398 5399 struct drm_luminance_range_info *luminance_range = 5399 5400 &connector->display_info.luminance_range; 5400 5401 static const u8 pre_computed_values[] = { ··· 5456 5455 static void 5457 5456 drm_parse_hdr_metadata_block(struct drm_connector *connector, const u8 *db) 5458 5457 { 5458 + struct hdr_static_metadata *hdr_metadata = 5459 + &connector->display_info.hdr_sink_metadata.hdmi_type1; 5459 5460 u16 len; 5460 5461 5461 5462 len = cea_db_payload_len(db); 5462 5463 5463 - connector->hdr_sink_metadata.hdmi_type1.eotf = 5464 - eotf_supported(db); 5465 - connector->hdr_sink_metadata.hdmi_type1.metadata_type = 5466 - hdr_metadata_type(db); 5464 + hdr_metadata->eotf = eotf_supported(db); 5465 + hdr_metadata->metadata_type = hdr_metadata_type(db); 5467 5466 5468 5467 if (len >= 4) 5469 - connector->hdr_sink_metadata.hdmi_type1.max_cll = db[4]; 5468 + hdr_metadata->max_cll = db[4]; 5470 5469 if (len >= 5) 5471 - connector->hdr_sink_metadata.hdmi_type1.max_fall = db[5]; 5470 + hdr_metadata->max_fall = db[5]; 5472 5471 if (len >= 6) { 5473 - connector->hdr_sink_metadata.hdmi_type1.min_cll = db[6]; 5472 + hdr_metadata->min_cll = db[6]; 5474 5473 5475 5474 /* Calculate only when all values are available */ 5476 5475 drm_calculate_luminance_range(connector); ··· 6618 6617 info->has_hdmi_infoframe = false; 6619 6618 info->rgb_quant_range_selectable = false; 6620 6619 memset(&info->hdmi, 0, sizeof(info->hdmi)); 6621 - memset(&connector->hdr_sink_metadata, 0, sizeof(connector->hdr_sink_metadata)); 6620 + memset(&info->hdr_sink_metadata, 0, sizeof(info->hdr_sink_metadata)); 6622 6621 6623 6622 info->edid_hdmi_rgb444_dc_modes = 0; 6624 6623 info->edid_hdmi_ycbcr444_dc_modes = 0;
+1 -1
drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
··· 145 145 * ranges for such panels. 146 146 */ 147 147 if (display->params.enable_dpcd_backlight != INTEL_DP_AUX_BACKLIGHT_FORCE_INTEL && 148 - !(connector->base.hdr_sink_metadata.hdmi_type1.metadata_type & 148 + !(connector->base.display_info.hdr_sink_metadata.hdmi_type1.metadata_type & 149 149 BIT(HDMI_STATIC_METADATA_TYPE1))) { 150 150 drm_info(display->drm, 151 151 "[CONNECTOR:%d:%s] Panel is missing HDR static metadata. Possible support for Intel HDR backlight interface is not used. If your backlight controls don't work try booting with i915.enable_dpcd_backlight=%d.\n",
+1 -1
drivers/gpu/drm/nouveau/nouveau_display.c
··· 495 495 if (first_changed_connector) 496 496 drm_connector_put(first_changed_connector); 497 497 498 - pm_runtime_mark_last_busy(drm->dev->dev); 498 + pm_runtime_mark_last_busy(dev->dev); 499 499 noop: 500 500 pm_runtime_put_autosuspend(dev->dev); 501 501 }
+33 -28
drivers/gpu/drm/panfrost/panfrost_drv.c
··· 866 866 .vendor_quirk = panfrost_gpu_amlogic_quirk, 867 867 }; 868 868 869 + static const char * const mediatek_pm_domains[] = { "core0", "core1", "core2", 870 + "core3", "core4" }; 869 871 /* 870 872 * The old data with two power supplies for MT8183 is here only to 871 873 * keep retro-compatibility with older devicetrees, as DVFS will ··· 876 874 * On new devicetrees please use the _b variant with a single and 877 875 * coupled regulators instead. 878 876 */ 879 - static const char * const mediatek_mt8183_supplies[] = { "mali", "sram", NULL }; 880 - static const char * const mediatek_mt8183_pm_domains[] = { "core0", "core1", "core2" }; 877 + static const char * const legacy_supplies[] = { "mali", "sram", NULL }; 881 878 static const struct panfrost_compatible mediatek_mt8183_data = { 882 - .num_supplies = ARRAY_SIZE(mediatek_mt8183_supplies) - 1, 883 - .supply_names = mediatek_mt8183_supplies, 884 - .num_pm_domains = ARRAY_SIZE(mediatek_mt8183_pm_domains), 885 - .pm_domain_names = mediatek_mt8183_pm_domains, 879 + .num_supplies = ARRAY_SIZE(legacy_supplies) - 1, 880 + .supply_names = legacy_supplies, 881 + .num_pm_domains = 3, 882 + .pm_domain_names = mediatek_pm_domains, 886 883 }; 887 884 888 - static const char * const mediatek_mt8183_b_supplies[] = { "mali", NULL }; 889 885 static const struct panfrost_compatible mediatek_mt8183_b_data = { 890 - .num_supplies = ARRAY_SIZE(mediatek_mt8183_b_supplies) - 1, 891 - .supply_names = mediatek_mt8183_b_supplies, 892 - .num_pm_domains = ARRAY_SIZE(mediatek_mt8183_pm_domains), 893 - .pm_domain_names = mediatek_mt8183_pm_domains, 886 + .num_supplies = ARRAY_SIZE(default_supplies) - 1, 887 + .supply_names = default_supplies, 888 + .num_pm_domains = 3, 889 + .pm_domain_names = mediatek_pm_domains, 894 890 .pm_features = BIT(GPU_PM_CLK_DIS) | BIT(GPU_PM_VREG_OFF), 895 891 }; 896 892 897 - static const char * const mediatek_mt8186_pm_domains[] = { "core0", "core1" }; 898 893 static const struct panfrost_compatible mediatek_mt8186_data = { 899 - .num_supplies = ARRAY_SIZE(mediatek_mt8183_b_supplies) - 1, 900 - .supply_names = mediatek_mt8183_b_supplies, 901 - .num_pm_domains = ARRAY_SIZE(mediatek_mt8186_pm_domains), 902 - .pm_domain_names = mediatek_mt8186_pm_domains, 894 + .num_supplies = ARRAY_SIZE(default_supplies) - 1, 895 + .supply_names = default_supplies, 896 + .num_pm_domains = 2, 897 + .pm_domain_names = mediatek_pm_domains, 903 898 .pm_features = BIT(GPU_PM_CLK_DIS) | BIT(GPU_PM_VREG_OFF), 904 899 }; 905 900 906 - /* MT8188 uses the same power domains and power supplies as MT8183 */ 907 901 static const struct panfrost_compatible mediatek_mt8188_data = { 908 - .num_supplies = ARRAY_SIZE(mediatek_mt8183_b_supplies) - 1, 909 - .supply_names = mediatek_mt8183_b_supplies, 910 - .num_pm_domains = ARRAY_SIZE(mediatek_mt8183_pm_domains), 911 - .pm_domain_names = mediatek_mt8183_pm_domains, 902 + .num_supplies = ARRAY_SIZE(default_supplies) - 1, 903 + .supply_names = default_supplies, 904 + .num_pm_domains = 3, 905 + .pm_domain_names = mediatek_pm_domains, 912 906 .pm_features = BIT(GPU_PM_CLK_DIS) | BIT(GPU_PM_VREG_OFF), 913 907 .gpu_quirks = BIT(GPU_QUIRK_FORCE_AARCH64_PGTABLE), 914 908 }; 915 909 916 - static const char * const mediatek_mt8192_supplies[] = { "mali", NULL }; 917 - static const char * const mediatek_mt8192_pm_domains[] = { "core0", "core1", "core2", 918 - "core3", "core4" }; 919 910 static const struct panfrost_compatible mediatek_mt8192_data = { 920 - .num_supplies = ARRAY_SIZE(mediatek_mt8192_supplies) - 1, 921 - .supply_names = mediatek_mt8192_supplies, 922 - .num_pm_domains = ARRAY_SIZE(mediatek_mt8192_pm_domains), 923 - .pm_domain_names = mediatek_mt8192_pm_domains, 911 + .num_supplies = ARRAY_SIZE(default_supplies) - 1, 912 + .supply_names = default_supplies, 913 + .num_pm_domains = 5, 914 + .pm_domain_names = mediatek_pm_domains, 915 + .pm_features = BIT(GPU_PM_CLK_DIS) | BIT(GPU_PM_VREG_OFF), 916 + .gpu_quirks = BIT(GPU_QUIRK_FORCE_AARCH64_PGTABLE), 917 + }; 918 + 919 + static const struct panfrost_compatible mediatek_mt8370_data = { 920 + .num_supplies = ARRAY_SIZE(default_supplies) - 1, 921 + .supply_names = default_supplies, 922 + .num_pm_domains = 2, 923 + .pm_domain_names = mediatek_pm_domains, 924 924 .pm_features = BIT(GPU_PM_CLK_DIS) | BIT(GPU_PM_VREG_OFF), 925 925 .gpu_quirks = BIT(GPU_QUIRK_FORCE_AARCH64_PGTABLE), 926 926 }; ··· 949 945 { .compatible = "mediatek,mt8186-mali", .data = &mediatek_mt8186_data }, 950 946 { .compatible = "mediatek,mt8188-mali", .data = &mediatek_mt8188_data }, 951 947 { .compatible = "mediatek,mt8192-mali", .data = &mediatek_mt8192_data }, 948 + { .compatible = "mediatek,mt8370-mali", .data = &mediatek_mt8370_data }, 952 949 { .compatible = "allwinner,sun50i-h616-mali", .data = &allwinner_h616_data }, 953 950 {} 954 951 };
+19
drivers/gpu/drm/tiny/bochs.c
··· 19 19 #include <drm/drm_gem_shmem_helper.h> 20 20 #include <drm/drm_managed.h> 21 21 #include <drm/drm_module.h> 22 + #include <drm/drm_panic.h> 22 23 #include <drm/drm_plane_helper.h> 23 24 #include <drm/drm_probe_helper.h> 24 25 ··· 470 469 bochs_hw_setformat(bochs, fb->format); 471 470 } 472 471 472 + static int bochs_primary_plane_helper_get_scanout_buffer(struct drm_plane *plane, 473 + struct drm_scanout_buffer *sb) 474 + { 475 + struct bochs_device *bochs = to_bochs_device(plane->dev); 476 + struct iosys_map map = IOSYS_MAP_INIT_VADDR_IOMEM(bochs->fb_map); 477 + 478 + if (plane->state && plane->state->fb) { 479 + sb->format = plane->state->fb->format; 480 + sb->width = plane->state->fb->width; 481 + sb->height = plane->state->fb->height; 482 + sb->pitch[0] = plane->state->fb->pitches[0]; 483 + sb->map[0] = map; 484 + return 0; 485 + } 486 + return -ENODEV; 487 + } 488 + 473 489 static const struct drm_plane_helper_funcs bochs_primary_plane_helper_funcs = { 474 490 DRM_GEM_SHADOW_PLANE_HELPER_FUNCS, 475 491 .atomic_check = bochs_primary_plane_helper_atomic_check, 476 492 .atomic_update = bochs_primary_plane_helper_atomic_update, 493 + .get_scanout_buffer = bochs_primary_plane_helper_get_scanout_buffer, 477 494 }; 478 495 479 496 static const struct drm_plane_funcs bochs_primary_plane_funcs = {
+5 -3
include/drm/drm_connector.h
··· 800 800 struct drm_hdmi_info hdmi; 801 801 802 802 /** 803 + * @hdr_sink_metadata: HDR Metadata Information read from sink 804 + */ 805 + struct hdr_sink_metadata hdr_sink_metadata; 806 + 807 + /** 803 808 * @non_desktop: Non desktop display (HMD). 804 809 */ 805 810 bool non_desktop; ··· 2290 2285 * &drm_mode_config.connector_free_work. 2291 2286 */ 2292 2287 struct llist_node free_node; 2293 - 2294 - /** @hdr_sink_metadata: HDR Metadata Information read from sink */ 2295 - struct hdr_sink_metadata hdr_sink_metadata; 2296 2288 2297 2289 /** 2298 2290 * @hdmi: HDMI-related variable and properties.