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-2022-07-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-next

drm-misc-next for $kernel-version:

UAPI Changes:

Cross-subsystem Changes:

Core Changes:

* crtc: Remove unnessary include statements from drm_crtc.h, plus
fallout in drivers

* edid: More use of struct drm_edid; implement HF-EEODB extension

Driver Changes:

* bridge:
* anx7625: Implement HDP timeout via callback; Cleanups
* fsl-ldb: Drop DE flip; Modesetting fixes
* imx: Depend on ARCH_MXC
* sil8620: Fix off-by-one
* ti-sn65dsi86: Convert to atomic modesetting

* ingenic: Fix display at maximum resolution

* panel:
* simple: Add support for HannStar HSD101PWW2, plus DT bindings; Add
support for ETML0700Y5DHA, plus DT bindings

* rockchip: Fixes

* vc4: Cleanups

* vmwgfx: Cleanups

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

From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/YsaHq1pvE699NtOM@linux-uq9g

+644 -300
+4
Documentation/devicetree/bindings/display/panel/panel-simple.yaml
··· 141 141 # Emerging Display Technology Corp. WVGA TFT Display with capacitive touch 142 142 - edt,etm0700g0dh6 143 143 - edt,etm0700g0edh6 144 + # Emerging Display Technology Corp. LVDS WSVGA TFT Display with capacitive touch 145 + - edt,etml0700y5dha 144 146 # Emerging Display Technology Corp. 5.7" VGA TFT LCD panel with 145 147 # capacitive touch 146 148 - edt,etmv570g2dhu ··· 164 162 - hannstar,hsd070pww1 165 163 # HannStar Display Corp. HSD100PXN1 10.1" XGA LVDS panel 166 164 - hannstar,hsd100pxn1 165 + # HannStar Display Corp. HSD101PWW2 10.1" WXGA (1280x800) LVDS panel 166 + - hannstar,hsd101pww2 167 167 # Hitachi Ltd. Corporation 9" WVGA (800x480) TFT LCD panel 168 168 - hit,tx23d38vm0caa 169 169 # InfoVision Optoelectronics M133NWF4 R0 13.3" FHD (1920x1080) TFT LCD panel
+6 -1
Documentation/devicetree/bindings/display/panel/sharp,lq101r1sx01.yaml
··· 30 30 31 31 properties: 32 32 compatible: 33 - const: sharp,lq101r1sx01 33 + oneOf: 34 + - items: 35 + - const: sharp,lq101r1sx03 36 + - const: sharp,lq101r1sx01 37 + - items: 38 + - const: sharp,lq101r1sx01 34 39 35 40 reg: true 36 41 power-supply: true
+2
drivers/gpu/drm/arm/display/komeda/komeda_pipeline.c
··· 4 4 * Author: James.Qian.Wang <james.qian.wang@arm.com> 5 5 * 6 6 */ 7 + #include <linux/of.h> 8 + 7 9 #include <drm/drm_print.h> 8 10 9 11 #include "komeda_dev.h"
+1
drivers/gpu/drm/armada/armada_510.c
··· 6 6 */ 7 7 #include <linux/clk.h> 8 8 #include <linux/io.h> 9 + #include <linux/of.h> 9 10 #include <drm/drm_probe_helper.h> 10 11 #include "armada_crtc.h" 11 12 #include "armada_drm.h"
+1
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
··· 8 8 */ 9 9 10 10 #include <linux/clk.h> 11 + #include <linux/media-bus-format.h> 11 12 #include <linux/mfd/atmel-hlcdc.h> 12 13 #include <linux/pinctrl/consumer.h> 13 14 #include <linux/pm.h>
+1
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c
··· 9 9 */ 10 10 11 11 #include <linux/media-bus-format.h> 12 + #include <linux/of.h> 12 13 #include <linux/of_graph.h> 13 14 14 15 #include <drm/drm_bridge.h>
+65 -114
drivers/gpu/drm/bridge/analogix/anx7625.c
··· 1443 1443 return anx7625_reg_read(ctx, ctx->i2c.rx_p0_client, SYSTEM_STSTUS); 1444 1444 } 1445 1445 1446 - static void anx7625_hpd_polling(struct anx7625_data *ctx) 1446 + static int _anx7625_hpd_polling(struct anx7625_data *ctx, 1447 + unsigned long wait_us) 1447 1448 { 1448 1449 int ret, val; 1449 1450 struct device *dev = &ctx->client->dev; 1450 1451 1451 1452 /* Interrupt mode, no need poll HPD status, just return */ 1452 1453 if (ctx->pdata.intp_irq) 1453 - return; 1454 + return 0; 1454 1455 1455 1456 ret = readx_poll_timeout(anx7625_read_hpd_status_p0, 1456 1457 ctx, val, 1457 1458 ((val & HPD_STATUS) || (val < 0)), 1458 - 5000, 1459 - 5000 * 100); 1459 + wait_us / 100, 1460 + wait_us); 1460 1461 if (ret) { 1461 1462 DRM_DEV_ERROR(dev, "no hpd.\n"); 1462 - return; 1463 + return ret; 1463 1464 } 1464 1465 1465 1466 DRM_DEV_DEBUG_DRIVER(dev, "system status: 0x%x. HPD raise up.\n", val); ··· 1473 1472 1474 1473 if (!ctx->pdata.panel_bridge && ctx->bridge_attached) 1475 1474 drm_helper_hpd_irq_event(ctx->bridge.dev); 1475 + 1476 + return 0; 1477 + } 1478 + 1479 + static int anx7625_wait_hpd_asserted(struct drm_dp_aux *aux, 1480 + unsigned long wait_us) 1481 + { 1482 + struct anx7625_data *ctx = container_of(aux, struct anx7625_data, aux); 1483 + struct device *dev = &ctx->client->dev; 1484 + int ret; 1485 + 1486 + pm_runtime_get_sync(dev); 1487 + ret = _anx7625_hpd_polling(ctx, wait_us); 1488 + pm_runtime_mark_last_busy(dev); 1489 + pm_runtime_put_autosuspend(dev); 1490 + 1491 + return ret; 1476 1492 } 1477 1493 1478 1494 static void anx7625_remove_edid(struct anx7625_data *ctx) ··· 1759 1741 } 1760 1742 1761 1743 pm_runtime_get_sync(dev); 1744 + _anx7625_hpd_polling(ctx, 5000 * 100); 1762 1745 edid_num = sp_tx_edid_read(ctx, p_edid->edid_raw_data); 1763 1746 pm_runtime_put_sync(dev); 1764 1747 ··· 2397 2378 ctx->connector = connector; 2398 2379 2399 2380 pm_runtime_get_sync(dev); 2381 + _anx7625_hpd_polling(ctx, 5000 * 100); 2400 2382 2401 2383 anx7625_dp_start(ctx); 2402 2384 } ··· 2456 2436 static int anx7625_register_i2c_dummy_clients(struct anx7625_data *ctx, 2457 2437 struct i2c_client *client) 2458 2438 { 2459 - int err = 0; 2439 + struct device *dev = &ctx->client->dev; 2460 2440 2461 - ctx->i2c.tx_p0_client = i2c_new_dummy_device(client->adapter, 2462 - TX_P0_ADDR >> 1); 2441 + ctx->i2c.tx_p0_client = devm_i2c_new_dummy_device(dev, client->adapter, 2442 + TX_P0_ADDR >> 1); 2463 2443 if (IS_ERR(ctx->i2c.tx_p0_client)) 2464 2444 return PTR_ERR(ctx->i2c.tx_p0_client); 2465 2445 2466 - ctx->i2c.tx_p1_client = i2c_new_dummy_device(client->adapter, 2467 - TX_P1_ADDR >> 1); 2468 - if (IS_ERR(ctx->i2c.tx_p1_client)) { 2469 - err = PTR_ERR(ctx->i2c.tx_p1_client); 2470 - goto free_tx_p0; 2471 - } 2446 + ctx->i2c.tx_p1_client = devm_i2c_new_dummy_device(dev, client->adapter, 2447 + TX_P1_ADDR >> 1); 2448 + if (IS_ERR(ctx->i2c.tx_p1_client)) 2449 + return PTR_ERR(ctx->i2c.tx_p1_client); 2472 2450 2473 - ctx->i2c.tx_p2_client = i2c_new_dummy_device(client->adapter, 2474 - TX_P2_ADDR >> 1); 2475 - if (IS_ERR(ctx->i2c.tx_p2_client)) { 2476 - err = PTR_ERR(ctx->i2c.tx_p2_client); 2477 - goto free_tx_p1; 2478 - } 2451 + ctx->i2c.tx_p2_client = devm_i2c_new_dummy_device(dev, client->adapter, 2452 + TX_P2_ADDR >> 1); 2453 + if (IS_ERR(ctx->i2c.tx_p2_client)) 2454 + return PTR_ERR(ctx->i2c.tx_p2_client); 2479 2455 2480 - ctx->i2c.rx_p0_client = i2c_new_dummy_device(client->adapter, 2481 - RX_P0_ADDR >> 1); 2482 - if (IS_ERR(ctx->i2c.rx_p0_client)) { 2483 - err = PTR_ERR(ctx->i2c.rx_p0_client); 2484 - goto free_tx_p2; 2485 - } 2456 + ctx->i2c.rx_p0_client = devm_i2c_new_dummy_device(dev, client->adapter, 2457 + RX_P0_ADDR >> 1); 2458 + if (IS_ERR(ctx->i2c.rx_p0_client)) 2459 + return PTR_ERR(ctx->i2c.rx_p0_client); 2486 2460 2487 - ctx->i2c.rx_p1_client = i2c_new_dummy_device(client->adapter, 2488 - RX_P1_ADDR >> 1); 2489 - if (IS_ERR(ctx->i2c.rx_p1_client)) { 2490 - err = PTR_ERR(ctx->i2c.rx_p1_client); 2491 - goto free_rx_p0; 2492 - } 2461 + ctx->i2c.rx_p1_client = devm_i2c_new_dummy_device(dev, client->adapter, 2462 + RX_P1_ADDR >> 1); 2463 + if (IS_ERR(ctx->i2c.rx_p1_client)) 2464 + return PTR_ERR(ctx->i2c.rx_p1_client); 2493 2465 2494 - ctx->i2c.rx_p2_client = i2c_new_dummy_device(client->adapter, 2495 - RX_P2_ADDR >> 1); 2496 - if (IS_ERR(ctx->i2c.rx_p2_client)) { 2497 - err = PTR_ERR(ctx->i2c.rx_p2_client); 2498 - goto free_rx_p1; 2499 - } 2466 + ctx->i2c.rx_p2_client = devm_i2c_new_dummy_device(dev, client->adapter, 2467 + RX_P2_ADDR >> 1); 2468 + if (IS_ERR(ctx->i2c.rx_p2_client)) 2469 + return PTR_ERR(ctx->i2c.rx_p2_client); 2500 2470 2501 - ctx->i2c.tcpc_client = i2c_new_dummy_device(client->adapter, 2502 - TCPC_INTERFACE_ADDR >> 1); 2503 - if (IS_ERR(ctx->i2c.tcpc_client)) { 2504 - err = PTR_ERR(ctx->i2c.tcpc_client); 2505 - goto free_rx_p2; 2506 - } 2471 + ctx->i2c.tcpc_client = devm_i2c_new_dummy_device(dev, client->adapter, 2472 + TCPC_INTERFACE_ADDR >> 1); 2473 + if (IS_ERR(ctx->i2c.tcpc_client)) 2474 + return PTR_ERR(ctx->i2c.tcpc_client); 2507 2475 2508 2476 return 0; 2509 - 2510 - free_rx_p2: 2511 - i2c_unregister_device(ctx->i2c.rx_p2_client); 2512 - free_rx_p1: 2513 - i2c_unregister_device(ctx->i2c.rx_p1_client); 2514 - free_rx_p0: 2515 - i2c_unregister_device(ctx->i2c.rx_p0_client); 2516 - free_tx_p2: 2517 - i2c_unregister_device(ctx->i2c.tx_p2_client); 2518 - free_tx_p1: 2519 - i2c_unregister_device(ctx->i2c.tx_p1_client); 2520 - free_tx_p0: 2521 - i2c_unregister_device(ctx->i2c.tx_p0_client); 2522 - 2523 - return err; 2524 - } 2525 - 2526 - static void anx7625_unregister_i2c_dummy_clients(struct anx7625_data *ctx) 2527 - { 2528 - i2c_unregister_device(ctx->i2c.tx_p0_client); 2529 - i2c_unregister_device(ctx->i2c.tx_p1_client); 2530 - i2c_unregister_device(ctx->i2c.tx_p2_client); 2531 - i2c_unregister_device(ctx->i2c.rx_p0_client); 2532 - i2c_unregister_device(ctx->i2c.rx_p1_client); 2533 - i2c_unregister_device(ctx->i2c.rx_p2_client); 2534 - i2c_unregister_device(ctx->i2c.tcpc_client); 2535 2477 } 2536 2478 2537 2479 static int __maybe_unused anx7625_runtime_pm_suspend(struct device *dev) ··· 2517 2535 mutex_lock(&ctx->lock); 2518 2536 2519 2537 anx7625_power_on_init(ctx); 2520 - anx7625_hpd_polling(ctx); 2521 2538 2522 2539 mutex_unlock(&ctx->lock); 2523 2540 2524 2541 return 0; 2525 2542 } 2526 2543 2527 - static int __maybe_unused anx7625_resume(struct device *dev) 2528 - { 2529 - struct anx7625_data *ctx = dev_get_drvdata(dev); 2530 - 2531 - if (!ctx->pdata.intp_irq) 2532 - return 0; 2533 - 2534 - if (!pm_runtime_enabled(dev) || !pm_runtime_suspended(dev)) { 2535 - enable_irq(ctx->pdata.intp_irq); 2536 - anx7625_runtime_pm_resume(dev); 2537 - } 2538 - 2539 - return 0; 2540 - } 2541 - 2542 - static int __maybe_unused anx7625_suspend(struct device *dev) 2543 - { 2544 - struct anx7625_data *ctx = dev_get_drvdata(dev); 2545 - 2546 - if (!ctx->pdata.intp_irq) 2547 - return 0; 2548 - 2549 - if (!pm_runtime_enabled(dev) || !pm_runtime_suspended(dev)) { 2550 - anx7625_runtime_pm_suspend(dev); 2551 - disable_irq(ctx->pdata.intp_irq); 2552 - } 2553 - 2554 - return 0; 2555 - } 2556 - 2557 2544 static const struct dev_pm_ops anx7625_pm_ops = { 2558 - SET_SYSTEM_SLEEP_PM_OPS(anx7625_suspend, anx7625_resume) 2545 + SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 2546 + pm_runtime_force_resume) 2559 2547 SET_RUNTIME_PM_OPS(anx7625_runtime_pm_suspend, 2560 2548 anx7625_runtime_pm_resume, NULL) 2561 2549 }; ··· 2608 2656 platform->aux.name = "anx7625-aux"; 2609 2657 platform->aux.dev = dev; 2610 2658 platform->aux.transfer = anx7625_aux_transfer; 2659 + platform->aux.wait_hpd_asserted = anx7625_wait_hpd_asserted; 2611 2660 drm_dp_aux_init(&platform->aux); 2612 - devm_of_dp_aux_populate_ep_devices(&platform->aux); 2613 - 2614 - ret = anx7625_parse_dt(dev, pdata); 2615 - if (ret) { 2616 - if (ret != -EPROBE_DEFER) 2617 - DRM_DEV_ERROR(dev, "fail to parse DT : %d\n", ret); 2618 - goto free_wq; 2619 - } 2620 2661 2621 2662 if (anx7625_register_i2c_dummy_clients(platform, client) != 0) { 2622 2663 ret = -ENOMEM; ··· 2625 2680 if (ret) 2626 2681 goto free_wq; 2627 2682 2683 + devm_of_dp_aux_populate_ep_devices(&platform->aux); 2684 + 2685 + ret = anx7625_parse_dt(dev, pdata); 2686 + if (ret) { 2687 + if (ret != -EPROBE_DEFER) 2688 + DRM_DEV_ERROR(dev, "fail to parse DT : %d\n", ret); 2689 + goto free_wq; 2690 + } 2691 + 2628 2692 if (!platform->pdata.low_power_mode) { 2629 2693 anx7625_disable_pd_protocol(platform); 2630 2694 pm_runtime_get_sync(dev); 2695 + _anx7625_hpd_polling(platform, 5000 * 100); 2631 2696 } 2632 2697 2633 2698 /* Add work function */ ··· 2678 2723 if (!platform->pdata.low_power_mode) 2679 2724 pm_runtime_put_sync_suspend(&client->dev); 2680 2725 2681 - anx7625_unregister_i2c_dummy_clients(platform); 2682 - 2683 2726 free_wq: 2684 2727 if (platform->workqueue) 2685 2728 destroy_workqueue(platform->workqueue); ··· 2706 2753 2707 2754 if (!platform->pdata.low_power_mode) 2708 2755 pm_runtime_put_sync_suspend(&client->dev); 2709 - 2710 - anx7625_unregister_i2c_dummy_clients(platform); 2711 2756 2712 2757 if (platform->pdata.audio_en) 2713 2758 anx7625_unregister_audio(platform);
+1
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
··· 26 26 #include <linux/io.h> 27 27 #include <linux/iopoll.h> 28 28 #include <linux/irq.h> 29 + #include <linux/media-bus-format.h> 29 30 #include <linux/module.h> 30 31 #include <linux/of.h> 31 32 #include <linux/of_device.h>
+1
drivers/gpu/drm/bridge/chipone-icn6211.c
··· 14 14 #include <linux/delay.h> 15 15 #include <linux/gpio/consumer.h> 16 16 #include <linux/i2c.h> 17 + #include <linux/media-bus-format.h> 17 18 #include <linux/module.h> 18 19 #include <linux/of_device.h> 19 20 #include <linux/regmap.h>
+1
drivers/gpu/drm/bridge/chrontel-ch7033.c
··· 6 6 */ 7 7 8 8 #include <linux/gpio/consumer.h> 9 + #include <linux/i2c.h> 9 10 #include <linux/module.h> 10 11 #include <linux/regmap.h> 11 12
+1
drivers/gpu/drm/bridge/display-connector.c
··· 6 6 #include <linux/gpio/consumer.h> 7 7 #include <linux/i2c.h> 8 8 #include <linux/interrupt.h> 9 + #include <linux/media-bus-format.h> 9 10 #include <linux/module.h> 10 11 #include <linux/mutex.h> 11 12 #include <linux/of.h>
+3 -19
drivers/gpu/drm/bridge/fsl-ldb.c
··· 4 4 */ 5 5 6 6 #include <linux/clk.h> 7 + #include <linux/media-bus-format.h> 7 8 #include <linux/mfd/syscon.h> 8 9 #include <linux/module.h> 9 10 #include <linux/of.h> ··· 75 74 bridge, flags); 76 75 } 77 76 78 - static int fsl_ldb_atomic_check(struct drm_bridge *bridge, 79 - struct drm_bridge_state *bridge_state, 80 - struct drm_crtc_state *crtc_state, 81 - struct drm_connector_state *conn_state) 82 - { 83 - /* Invert DE signal polarity. */ 84 - bridge_state->input_bus_cfg.flags &= ~(DRM_BUS_FLAG_DE_LOW | 85 - DRM_BUS_FLAG_DE_HIGH); 86 - if (bridge_state->output_bus_cfg.flags & DRM_BUS_FLAG_DE_LOW) 87 - bridge_state->input_bus_cfg.flags |= DRM_BUS_FLAG_DE_HIGH; 88 - else if (bridge_state->output_bus_cfg.flags & DRM_BUS_FLAG_DE_HIGH) 89 - bridge_state->input_bus_cfg.flags |= DRM_BUS_FLAG_DE_LOW; 90 - 91 - return 0; 92 - } 93 - 94 77 static void fsl_ldb_atomic_enable(struct drm_bridge *bridge, 95 78 struct drm_bridge_state *old_bridge_state) 96 79 { ··· 138 153 reg = LDB_CTRL_CH0_ENABLE; 139 154 140 155 if (fsl_ldb->lvds_dual_link) 141 - reg |= LDB_CTRL_CH1_ENABLE; 156 + reg |= LDB_CTRL_CH1_ENABLE | LDB_CTRL_SPLIT_MODE; 142 157 143 158 if (lvds_format_24bpp) { 144 159 reg |= LDB_CTRL_CH0_DATA_WIDTH; ··· 218 233 { 219 234 struct fsl_ldb *fsl_ldb = to_fsl_ldb(bridge); 220 235 221 - if (mode->clock > (fsl_ldb->lvds_dual_link ? 80000 : 160000)) 236 + if (mode->clock > (fsl_ldb->lvds_dual_link ? 160000 : 80000)) 222 237 return MODE_CLOCK_HIGH; 223 238 224 239 return MODE_OK; ··· 226 241 227 242 static const struct drm_bridge_funcs funcs = { 228 243 .attach = fsl_ldb_attach, 229 - .atomic_check = fsl_ldb_atomic_check, 230 244 .atomic_enable = fsl_ldb_atomic_enable, 231 245 .atomic_disable = fsl_ldb_atomic_disable, 232 246 .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
+4
drivers/gpu/drm/bridge/imx/Kconfig
··· 1 + if ARCH_MXC || COMPILE_TEST 2 + 1 3 config DRM_IMX8QM_LDB 2 4 tristate "Freescale i.MX8QM LVDS display bridge" 3 5 depends on OF ··· 43 41 help 44 42 Choose this to enable pixel link to display pixel interface(PXL2DPI) 45 43 found in Freescale i.MX8qxp processor. 44 + 45 + endif # ARCH_MXC || COMPILE_TEST
+1
drivers/gpu/drm/bridge/imx/imx-ldb-helper.c
··· 4 4 * Copyright 2019,2020,2022 NXP 5 5 */ 6 6 7 + #include <linux/media-bus-format.h> 7 8 #include <linux/mfd/syscon.h> 8 9 #include <linux/of.h> 9 10 #include <linux/regmap.h>
+1
drivers/gpu/drm/bridge/imx/imx8qm-ldb-drv.c
··· 5 5 */ 6 6 7 7 #include <linux/clk.h> 8 + #include <linux/media-bus-format.h> 8 9 #include <linux/mfd/syscon.h> 9 10 #include <linux/module.h> 10 11 #include <linux/of.h>
+1
drivers/gpu/drm/bridge/imx/imx8qxp-ldb-drv.c
··· 5 5 */ 6 6 7 7 #include <linux/clk.h> 8 + #include <linux/media-bus-format.h> 8 9 #include <linux/mfd/syscon.h> 9 10 #include <linux/module.h> 10 11 #include <linux/of.h>
+2
drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c
··· 7 7 #include <linux/bitfield.h> 8 8 #include <linux/clk.h> 9 9 #include <linux/delay.h> 10 + #include <linux/io.h> 11 + #include <linux/media-bus-format.h> 10 12 #include <linux/module.h> 11 13 #include <linux/of.h> 12 14 #include <linux/of_graph.h>
+1
drivers/gpu/drm/bridge/imx/imx8qxp-pixel-link.c
··· 5 5 */ 6 6 7 7 #include <linux/firmware/imx/svc/misc.h> 8 + #include <linux/media-bus-format.h> 8 9 #include <linux/module.h> 9 10 #include <linux/of.h> 10 11 #include <linux/of_graph.h>
+1
drivers/gpu/drm/bridge/imx/imx8qxp-pxl2dpi.c
··· 5 5 */ 6 6 7 7 #include <linux/firmware/imx/svc/misc.h> 8 + #include <linux/media-bus-format.h> 8 9 #include <linux/mfd/syscon.h> 9 10 #include <linux/module.h> 10 11 #include <linux/of.h>
+1
drivers/gpu/drm/bridge/ite-it66121.c
··· 7 7 * 8 8 */ 9 9 10 + #include <linux/media-bus-format.h> 10 11 #include <linux/module.h> 11 12 #include <linux/device.h> 12 13 #include <linux/interrupt.h>
+1
drivers/gpu/drm/bridge/lontium-lt8912b.c
··· 7 7 #include <linux/delay.h> 8 8 #include <linux/gpio/consumer.h> 9 9 #include <linux/i2c.h> 10 + #include <linux/media-bus-format.h> 10 11 #include <linux/regmap.h> 11 12 12 13 #include <drm/drm_probe_helper.h>
+1
drivers/gpu/drm/bridge/lontium-lt9211.c
··· 14 14 #include <linux/clk.h> 15 15 #include <linux/gpio/consumer.h> 16 16 #include <linux/i2c.h> 17 + #include <linux/media-bus-format.h> 17 18 #include <linux/module.h> 18 19 #include <linux/of_device.h> 19 20 #include <linux/of_graph.h>
+2
drivers/gpu/drm/bridge/lontium-lt9611.c
··· 5 5 */ 6 6 7 7 #include <linux/gpio/consumer.h> 8 + #include <linux/i2c.h> 8 9 #include <linux/interrupt.h> 10 + #include <linux/media-bus-format.h> 9 11 #include <linux/module.h> 10 12 #include <linux/of_graph.h> 11 13 #include <linux/platform_device.h>
+1
drivers/gpu/drm/bridge/lontium-lt9611uxc.c
··· 6 6 7 7 #include <linux/firmware.h> 8 8 #include <linux/gpio/consumer.h> 9 + #include <linux/i2c.h> 9 10 #include <linux/interrupt.h> 10 11 #include <linux/module.h> 11 12 #include <linux/mutex.h>
+1
drivers/gpu/drm/bridge/nwl-dsi.c
··· 12 12 #include <linux/irq.h> 13 13 #include <linux/math64.h> 14 14 #include <linux/mfd/syscon.h> 15 + #include <linux/media-bus-format.h> 15 16 #include <linux/module.h> 16 17 #include <linux/mux/consumer.h> 17 18 #include <linux/of.h>
+1
drivers/gpu/drm/bridge/sii902x.c
··· 15 15 #include <linux/gpio/consumer.h> 16 16 #include <linux/i2c-mux.h> 17 17 #include <linux/i2c.h> 18 + #include <linux/media-bus-format.h> 18 19 #include <linux/module.h> 19 20 #include <linux/regmap.h> 20 21 #include <linux/regulator/consumer.h>
+2 -2
drivers/gpu/drm/bridge/sil-sii8620.c
··· 605 605 u8 *buf = &ctx->burst.tx_buf[ctx->burst.tx_count]; 606 606 int size = len + 2; 607 607 608 - if (ctx->burst.tx_count + size > ARRAY_SIZE(ctx->burst.tx_buf)) { 608 + if (ctx->burst.tx_count + size >= ARRAY_SIZE(ctx->burst.tx_buf)) { 609 609 dev_err(ctx->dev, "TX-BLK buffer exhausted\n"); 610 610 ctx->error = -EINVAL; 611 611 return NULL; ··· 622 622 u8 *buf = &ctx->burst.rx_buf[ctx->burst.rx_count]; 623 623 int size = len + 1; 624 624 625 - if (ctx->burst.tx_count + size > ARRAY_SIZE(ctx->burst.tx_buf)) { 625 + if (ctx->burst.rx_count + size >= ARRAY_SIZE(ctx->burst.rx_buf)) { 626 626 dev_err(ctx->dev, "RX-BLK buffer exhausted\n"); 627 627 ctx->error = -EINVAL; 628 628 return NULL;
+1
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
··· 10 10 #include <linux/delay.h> 11 11 #include <linux/err.h> 12 12 #include <linux/hdmi.h> 13 + #include <linux/i2c.h> 13 14 #include <linux/irq.h> 14 15 #include <linux/module.h> 15 16 #include <linux/mutex.h>
+1
drivers/gpu/drm/bridge/tc358764.c
··· 9 9 10 10 #include <linux/delay.h> 11 11 #include <linux/gpio/consumer.h> 12 + #include <linux/mod_devicetable.h> 12 13 #include <linux/module.h> 13 14 #include <linux/of_graph.h> 14 15 #include <linux/regulator/consumer.h>
+1
drivers/gpu/drm/bridge/tc358767.c
··· 24 24 #include <linux/gpio/consumer.h> 25 25 #include <linux/i2c.h> 26 26 #include <linux/kernel.h> 27 + #include <linux/media-bus-format.h> 27 28 #include <linux/module.h> 28 29 #include <linux/regmap.h> 29 30 #include <linux/slab.h>
+1
drivers/gpu/drm/bridge/tc358775.c
··· 13 13 #include <linux/gpio/consumer.h> 14 14 #include <linux/i2c.h> 15 15 #include <linux/kernel.h> 16 + #include <linux/media-bus-format.h> 16 17 #include <linux/module.h> 17 18 #include <linux/regulator/consumer.h> 18 19 #include <linux/slab.h>
+1
drivers/gpu/drm/bridge/ti-dlpc3433.c
··· 16 16 #include <linux/delay.h> 17 17 #include <linux/gpio/consumer.h> 18 18 #include <linux/i2c.h> 19 + #include <linux/media-bus-format.h> 19 20 #include <linux/module.h> 20 21 #include <linux/regmap.h> 21 22 #include <linux/regulator/consumer.h>
+1
drivers/gpu/drm/bridge/ti-sn65dsi83.c
··· 29 29 #include <linux/clk.h> 30 30 #include <linux/gpio/consumer.h> 31 31 #include <linux/i2c.h> 32 + #include <linux/media-bus-format.h> 32 33 #include <linux/module.h> 33 34 #include <linux/of_device.h> 34 35 #include <linux/of_graph.h>
+15 -8
drivers/gpu/drm/bridge/ti-sn65dsi86.c
··· 752 752 return MODE_OK; 753 753 } 754 754 755 - static void ti_sn_bridge_disable(struct drm_bridge *bridge) 755 + static void ti_sn_bridge_atomic_disable(struct drm_bridge *bridge, 756 + struct drm_bridge_state *old_bridge_state) 756 757 { 757 758 struct ti_sn65dsi86 *pdata = bridge_to_ti_sn65dsi86(bridge); 758 759 ··· 1012 1011 return ret; 1013 1012 } 1014 1013 1015 - static void ti_sn_bridge_enable(struct drm_bridge *bridge) 1014 + static void ti_sn_bridge_atomic_enable(struct drm_bridge *bridge, 1015 + struct drm_bridge_state *old_bridge_state) 1016 1016 { 1017 1017 struct ti_sn65dsi86 *pdata = bridge_to_ti_sn65dsi86(bridge); 1018 1018 const char *last_err_str = "No supported DP rate"; ··· 1082 1080 VSTREAM_ENABLE); 1083 1081 } 1084 1082 1085 - static void ti_sn_bridge_pre_enable(struct drm_bridge *bridge) 1083 + static void ti_sn_bridge_atomic_pre_enable(struct drm_bridge *bridge, 1084 + struct drm_bridge_state *old_bridge_state) 1086 1085 { 1087 1086 struct ti_sn65dsi86 *pdata = bridge_to_ti_sn65dsi86(bridge); 1088 1087 ··· 1096 1093 usleep_range(100, 110); 1097 1094 } 1098 1095 1099 - static void ti_sn_bridge_post_disable(struct drm_bridge *bridge) 1096 + static void ti_sn_bridge_atomic_post_disable(struct drm_bridge *bridge, 1097 + struct drm_bridge_state *old_bridge_state) 1100 1098 { 1101 1099 struct ti_sn65dsi86 *pdata = bridge_to_ti_sn65dsi86(bridge); 1102 1100 ··· 1118 1114 .attach = ti_sn_bridge_attach, 1119 1115 .detach = ti_sn_bridge_detach, 1120 1116 .mode_valid = ti_sn_bridge_mode_valid, 1121 - .pre_enable = ti_sn_bridge_pre_enable, 1122 - .enable = ti_sn_bridge_enable, 1123 - .disable = ti_sn_bridge_disable, 1124 - .post_disable = ti_sn_bridge_post_disable, 1117 + .atomic_pre_enable = ti_sn_bridge_atomic_pre_enable, 1118 + .atomic_enable = ti_sn_bridge_atomic_enable, 1119 + .atomic_disable = ti_sn_bridge_atomic_disable, 1120 + .atomic_post_disable = ti_sn_bridge_atomic_post_disable, 1121 + .atomic_reset = drm_atomic_helper_bridge_reset, 1122 + .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state, 1123 + .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state, 1125 1124 }; 1126 1125 1127 1126 static void ti_sn_bridge_parse_lanes(struct ti_sn65dsi86 *pdata,
+1
drivers/gpu/drm/bridge/ti-tfp410.c
··· 6 6 7 7 #include <linux/gpio/consumer.h> 8 8 #include <linux/i2c.h> 9 + #include <linux/media-bus-format.h> 9 10 #include <linux/module.h> 10 11 #include <linux/of_graph.h> 11 12 #include <linux/platform_device.h>
+1
drivers/gpu/drm/display/drm_dp_helper.c
··· 20 20 * OF THIS SOFTWARE. 21 21 */ 22 22 23 + #include <linux/backlight.h> 23 24 #include <linux/delay.h> 24 25 #include <linux/errno.h> 25 26 #include <linux/i2c.h>
+1
drivers/gpu/drm/drm_bridge.c
··· 22 22 */ 23 23 24 24 #include <linux/err.h> 25 + #include <linux/media-bus-format.h> 25 26 #include <linux/module.h> 26 27 #include <linux/mutex.h> 27 28
+1 -74
drivers/gpu/drm/drm_connector.c
··· 32 32 #include <drm/drm_privacy_screen_consumer.h> 33 33 #include <drm/drm_sysfs.h> 34 34 35 + #include <linux/fb.h> 35 36 #include <linux/uaccess.h> 36 37 37 38 #include "drm_crtc_internal.h" ··· 2077 2076 return ret; 2078 2077 } 2079 2078 EXPORT_SYMBOL(drm_connector_set_tile_property); 2080 - 2081 - /** 2082 - * drm_connector_update_edid_property - update the edid property of a connector 2083 - * @connector: drm connector 2084 - * @edid: new value of the edid property 2085 - * 2086 - * This function creates a new blob modeset object and assigns its id to the 2087 - * connector's edid property. 2088 - * Since we also parse tile information from EDID's displayID block, we also 2089 - * set the connector's tile property here. See drm_connector_set_tile_property() 2090 - * for more details. 2091 - * 2092 - * Returns: 2093 - * Zero on success, negative errno on failure. 2094 - */ 2095 - int drm_connector_update_edid_property(struct drm_connector *connector, 2096 - const struct edid *edid) 2097 - { 2098 - struct drm_device *dev = connector->dev; 2099 - size_t size = 0; 2100 - int ret; 2101 - const struct edid *old_edid; 2102 - 2103 - /* ignore requests to set edid when overridden */ 2104 - if (connector->override_edid) 2105 - return 0; 2106 - 2107 - if (edid) 2108 - size = EDID_LENGTH * (1 + edid->extensions); 2109 - 2110 - /* Set the display info, using edid if available, otherwise 2111 - * resetting the values to defaults. This duplicates the work 2112 - * done in drm_add_edid_modes, but that function is not 2113 - * consistently called before this one in all drivers and the 2114 - * computation is cheap enough that it seems better to 2115 - * duplicate it rather than attempt to ensure some arbitrary 2116 - * ordering of calls. 2117 - */ 2118 - if (edid) 2119 - drm_add_display_info(connector, edid); 2120 - else 2121 - drm_reset_display_info(connector); 2122 - 2123 - drm_update_tile_info(connector, edid); 2124 - 2125 - if (connector->edid_blob_ptr) { 2126 - old_edid = (const struct edid *)connector->edid_blob_ptr->data; 2127 - if (old_edid) { 2128 - if (!drm_edid_are_equal(edid, old_edid)) { 2129 - DRM_DEBUG_KMS("[CONNECTOR:%d:%s] Edid was changed.\n", 2130 - connector->base.id, connector->name); 2131 - 2132 - connector->epoch_counter += 1; 2133 - DRM_DEBUG_KMS("Updating change counter to %llu\n", 2134 - connector->epoch_counter); 2135 - } 2136 - } 2137 - } 2138 - 2139 - drm_object_property_set_value(&connector->base, 2140 - dev->mode_config.non_desktop_property, 2141 - connector->display_info.non_desktop); 2142 - 2143 - ret = drm_property_replace_global_blob(dev, 2144 - &connector->edid_blob_ptr, 2145 - size, 2146 - edid, 2147 - &connector->base, 2148 - dev->mode_config.edid_property); 2149 - if (ret) 2150 - return ret; 2151 - return drm_connector_set_tile_property(connector); 2152 - } 2153 - EXPORT_SYMBOL(drm_connector_update_edid_property); 2154 2079 2155 2080 /** 2156 2081 * drm_connector_set_link_status_property - Set link status property of a connector
+2 -3
drivers/gpu/drm/drm_crtc_internal.h
··· 286 286 287 287 /* drm_edid.c */ 288 288 void drm_mode_fixup_1366x768(struct drm_display_mode *mode); 289 - void drm_reset_display_info(struct drm_connector *connector); 290 - u32 drm_add_display_info(struct drm_connector *connector, const struct edid *edid); 291 - void drm_update_tile_info(struct drm_connector *connector, const struct edid *edid); 289 + int drm_edid_override_set(struct drm_connector *connector, const void *edid, size_t size); 290 + int drm_edid_override_reset(struct drm_connector *connector);
+5 -16
drivers/gpu/drm/drm_debugfs.c
··· 350 350 struct seq_file *m = file->private_data; 351 351 struct drm_connector *connector = m->private; 352 352 char *buf; 353 - struct edid *edid; 354 353 int ret; 355 354 356 355 buf = memdup_user(ubuf, len); 357 356 if (IS_ERR(buf)) 358 357 return PTR_ERR(buf); 359 358 360 - edid = (struct edid *) buf; 361 - 362 - if (len == 5 && !strncmp(buf, "reset", 5)) { 363 - connector->override_edid = false; 364 - ret = drm_connector_update_edid_property(connector, NULL); 365 - } else if (len < EDID_LENGTH || 366 - EDID_LENGTH * (1 + edid->extensions) > len) 367 - ret = -EINVAL; 368 - else { 369 - connector->override_edid = false; 370 - ret = drm_connector_update_edid_property(connector, edid); 371 - if (!ret) 372 - connector->override_edid = true; 373 - } 359 + if (len == 5 && !strncmp(buf, "reset", 5)) 360 + ret = drm_edid_override_reset(connector); 361 + else 362 + ret = drm_edid_override_set(connector, buf, len); 374 363 375 364 kfree(buf); 376 365 377 - return (ret) ? ret : len; 366 + return ret ? ret : len; 378 367 } 379 368 380 369 /*
+332 -46
drivers/gpu/drm/drm_edid.c
··· 1581 1581 (edid->version == version && edid->revision > revision); 1582 1582 } 1583 1583 1584 + static int edid_hfeeodb_extension_block_count(const struct edid *edid); 1585 + 1586 + static int edid_hfeeodb_block_count(const struct edid *edid) 1587 + { 1588 + int eeodb = edid_hfeeodb_extension_block_count(edid); 1589 + 1590 + return eeodb ? eeodb + 1 : 0; 1591 + } 1592 + 1584 1593 static int edid_extension_block_count(const struct edid *edid) 1585 1594 { 1586 1595 return edid->extensions; ··· 1628 1619 1629 1620 /* Starting point */ 1630 1621 num_blocks = edid_block_count(drm_edid->edid); 1622 + 1623 + /* HF-EEODB override */ 1624 + if (drm_edid->size >= edid_size_by_blocks(2)) { 1625 + int eeodb; 1626 + 1627 + /* 1628 + * Note: HF-EEODB may specify a smaller extension count than the 1629 + * regular one. Unlike in buffer allocation, here we can use it. 1630 + */ 1631 + eeodb = edid_hfeeodb_block_count(drm_edid->edid); 1632 + if (eeodb) 1633 + num_blocks = eeodb; 1634 + } 1631 1635 1632 1636 /* Limit by allocated size */ 1633 1637 num_blocks = min(num_blocks, (int)drm_edid->size / EDID_LENGTH); ··· 2042 2020 } 2043 2021 EXPORT_SYMBOL(drm_edid_is_valid); 2044 2022 2045 - static struct edid *edid_filter_invalid_blocks(const struct edid *edid, 2046 - int invalid_blocks, 2023 + static struct edid *edid_filter_invalid_blocks(struct edid *edid, 2047 2024 size_t *alloc_size) 2048 2025 { 2049 - struct edid *new, *dest_block; 2050 - int valid_extensions = edid->extensions - invalid_blocks; 2051 - int i; 2026 + struct edid *new; 2027 + int i, valid_blocks = 0; 2052 2028 2053 - *alloc_size = edid_size_by_blocks(valid_extensions + 1); 2054 - 2055 - new = kmalloc(*alloc_size, GFP_KERNEL); 2056 - if (!new) 2057 - goto out; 2058 - 2059 - dest_block = new; 2029 + /* 2030 + * Note: If the EDID uses HF-EEODB, but has invalid blocks, we'll revert 2031 + * back to regular extension count here. We don't want to start 2032 + * modifying the HF-EEODB extension too. 2033 + */ 2060 2034 for (i = 0; i < edid_block_count(edid); i++) { 2061 - const void *block = edid_block_data(edid, i); 2035 + const void *src_block = edid_block_data(edid, i); 2062 2036 2063 - if (edid_block_valid(block, i == 0)) 2064 - memcpy(dest_block++, block, EDID_LENGTH); 2037 + if (edid_block_valid(src_block, i == 0)) { 2038 + void *dst_block = (void *)edid_block_data(edid, valid_blocks); 2039 + 2040 + memmove(dst_block, src_block, EDID_LENGTH); 2041 + valid_blocks++; 2042 + } 2065 2043 } 2066 2044 2067 - new->extensions = valid_extensions; 2068 - new->checksum = edid_block_compute_checksum(new); 2045 + /* We already trusted the base block to be valid here... */ 2046 + if (WARN_ON(!valid_blocks)) { 2047 + kfree(edid); 2048 + return NULL; 2049 + } 2069 2050 2070 - out: 2071 - kfree(edid); 2051 + edid->extensions = valid_blocks - 1; 2052 + edid->checksum = edid_block_compute_checksum(edid); 2053 + 2054 + *alloc_size = edid_size_by_blocks(valid_blocks); 2055 + 2056 + new = krealloc(edid, *alloc_size, GFP_KERNEL); 2057 + if (!new) 2058 + kfree(edid); 2072 2059 2073 2060 return new; 2074 2061 } ··· 2192 2161 return IS_ERR(override) ? NULL : override; 2193 2162 } 2194 2163 2164 + /* For debugfs edid_override implementation */ 2165 + int drm_edid_override_set(struct drm_connector *connector, const void *edid, 2166 + size_t size) 2167 + { 2168 + int ret; 2169 + 2170 + if (size < EDID_LENGTH || edid_size(edid) > size) 2171 + return -EINVAL; 2172 + 2173 + connector->override_edid = false; 2174 + 2175 + ret = drm_connector_update_edid_property(connector, edid); 2176 + if (!ret) 2177 + connector->override_edid = true; 2178 + 2179 + return ret; 2180 + } 2181 + 2182 + /* For debugfs edid_override implementation */ 2183 + int drm_edid_override_reset(struct drm_connector *connector) 2184 + { 2185 + connector->override_edid = false; 2186 + 2187 + return drm_connector_update_edid_property(connector, NULL); 2188 + } 2189 + 2195 2190 /** 2196 2191 * drm_add_override_edid_modes - add modes from override/firmware EDID 2197 2192 * @connector: connector we're probing ··· 2288 2231 size_t *size) 2289 2232 { 2290 2233 enum edid_block_status status; 2291 - int i, invalid_blocks = 0; 2234 + int i, num_blocks, invalid_blocks = 0; 2292 2235 struct edid *edid, *new; 2293 2236 size_t alloc_size = EDID_LENGTH; 2294 2237 ··· 2330 2273 goto fail; 2331 2274 edid = new; 2332 2275 2333 - for (i = 1; i < edid_block_count(edid); i++) { 2276 + num_blocks = edid_block_count(edid); 2277 + for (i = 1; i < num_blocks; i++) { 2334 2278 void *block = (void *)edid_block_data(edid, i); 2335 2279 2336 2280 status = edid_block_read(block, i, read_block, context); ··· 2342 2284 if (status == EDID_BLOCK_READ_FAIL) 2343 2285 goto fail; 2344 2286 invalid_blocks++; 2287 + } else if (i == 1) { 2288 + /* 2289 + * If the first EDID extension is a CTA extension, and 2290 + * the first Data Block is HF-EEODB, override the 2291 + * extension block count. 2292 + * 2293 + * Note: HF-EEODB could specify a smaller extension 2294 + * count too, but we can't risk allocating a smaller 2295 + * amount. 2296 + */ 2297 + int eeodb = edid_hfeeodb_block_count(edid); 2298 + 2299 + if (eeodb > num_blocks) { 2300 + num_blocks = eeodb; 2301 + alloc_size = edid_size_by_blocks(num_blocks); 2302 + new = krealloc(edid, alloc_size, GFP_KERNEL); 2303 + if (!new) 2304 + goto fail; 2305 + edid = new; 2306 + } 2345 2307 } 2346 2308 } 2347 2309 2348 2310 if (invalid_blocks) { 2349 - connector_bad_edid(connector, edid, edid_block_count(edid)); 2311 + connector_bad_edid(connector, edid, num_blocks); 2350 2312 2351 - edid = edid_filter_invalid_blocks(edid, invalid_blocks, 2352 - &alloc_size); 2313 + edid = edid_filter_invalid_blocks(edid, &alloc_size); 2353 2314 } 2354 2315 2355 2316 ok: ··· 2409 2332 return _drm_do_get_edid(connector, read_block, context, NULL); 2410 2333 } 2411 2334 EXPORT_SYMBOL_GPL(drm_do_get_edid); 2335 + 2336 + /** 2337 + * drm_edid_raw - Get a pointer to the raw EDID data. 2338 + * @drm_edid: drm_edid container 2339 + * 2340 + * Get a pointer to the raw EDID data. 2341 + * 2342 + * This is for transition only. Avoid using this like the plague. 2343 + * 2344 + * Return: Pointer to raw EDID data. 2345 + */ 2346 + const struct edid *drm_edid_raw(const struct drm_edid *drm_edid) 2347 + { 2348 + if (!drm_edid || !drm_edid->size) 2349 + return NULL; 2350 + 2351 + /* 2352 + * Do not return pointers where relying on EDID extension count would 2353 + * lead to buffer overflow. 2354 + */ 2355 + if (WARN_ON(edid_size(drm_edid->edid) > drm_edid->size)) 2356 + return NULL; 2357 + 2358 + return drm_edid->edid; 2359 + } 2360 + EXPORT_SYMBOL(drm_edid_raw); 2412 2361 2413 2362 /* Allocate struct drm_edid container *without* duplicating the edid data */ 2414 2363 static const struct drm_edid *_drm_edid_alloc(const void *edid, size_t size) ··· 3899 3796 #define CTA_EXT_DB_HDR_STATIC_METADATA 6 3900 3797 #define CTA_EXT_DB_420_VIDEO_DATA 14 3901 3798 #define CTA_EXT_DB_420_VIDEO_CAP_MAP 15 3799 + #define CTA_EXT_DB_HF_EEODB 0x78 3902 3800 #define CTA_EXT_DB_HF_SCDB 0x79 3903 3801 3904 3802 #define EDID_BASIC_AUDIO (1 << 6) ··· 4959 4855 cea_db_payload_len(db) >= 7; 4960 4856 } 4961 4857 4858 + static bool cea_db_is_hdmi_forum_eeodb(const void *db) 4859 + { 4860 + return cea_db_is_extended_tag(db, CTA_EXT_DB_HF_EEODB) && 4861 + cea_db_payload_len(db) >= 2; 4862 + } 4863 + 4962 4864 static bool cea_db_is_microsoft_vsdb(const struct cea_db *db) 4963 4865 { 4964 4866 return cea_db_is_vendor(db, MICROSOFT_IEEE_OUI) && ··· 4997 4887 { 4998 4888 return cea_db_is_extended_tag(db, CTA_EXT_DB_HDR_STATIC_METADATA) && 4999 4889 cea_db_payload_len(db) >= 3; 4890 + } 4891 + 4892 + /* 4893 + * Get the HF-EEODB override extension block count from EDID. 4894 + * 4895 + * The passed in EDID may be partially read, as long as it has at least two 4896 + * blocks (base block and one extension block) if EDID extension count is > 0. 4897 + * 4898 + * Note that this is *not* how you should parse CTA Data Blocks in general; this 4899 + * is only to handle partially read EDIDs. Normally, use the CTA Data Block 4900 + * iterators instead. 4901 + * 4902 + * References: 4903 + * - HDMI 2.1 section 10.3.6 HDMI Forum EDID Extension Override Data Block 4904 + */ 4905 + static int edid_hfeeodb_extension_block_count(const struct edid *edid) 4906 + { 4907 + const u8 *cta; 4908 + 4909 + /* No extensions according to base block, no HF-EEODB. */ 4910 + if (!edid_extension_block_count(edid)) 4911 + return 0; 4912 + 4913 + /* HF-EEODB is always in the first EDID extension block only */ 4914 + cta = edid_extension_block_data(edid, 0); 4915 + if (edid_block_tag(cta) != CEA_EXT || cea_revision(cta) < 3) 4916 + return 0; 4917 + 4918 + /* Need to have the data block collection, and at least 3 bytes. */ 4919 + if (cea_db_collection_size(cta) < 3) 4920 + return 0; 4921 + 4922 + /* 4923 + * Sinks that include the HF-EEODB in their E-EDID shall include one and 4924 + * only one instance of the HF-EEODB in the E-EDID, occupying bytes 4 4925 + * through 6 of Block 1 of the E-EDID. 4926 + */ 4927 + if (!cea_db_is_hdmi_forum_eeodb(&cta[4])) 4928 + return 0; 4929 + 4930 + return cta[4 + 2]; 5000 4931 } 5001 4932 5002 4933 static void drm_parse_y420cmdb_bitmap(struct drm_connector *connector, ··· 6079 5928 /* A connector has no EDID information, so we've got no EDID to compute quirks from. Reset 6080 5929 * all of the values which would have been set from EDID 6081 5930 */ 6082 - void 6083 - drm_reset_display_info(struct drm_connector *connector) 5931 + static void drm_reset_display_info(struct drm_connector *connector) 6084 5932 { 6085 5933 struct drm_display_info *info = &connector->display_info; 6086 5934 ··· 6193 6043 return quirks; 6194 6044 } 6195 6045 6196 - u32 drm_add_display_info(struct drm_connector *connector, const struct edid *edid) 6197 - { 6198 - struct drm_edid drm_edid; 6199 - 6200 - return update_display_info(connector, 6201 - drm_edid_legacy_init(&drm_edid, edid)); 6202 - } 6203 - 6204 6046 static struct drm_display_mode *drm_mode_displayid_detailed(struct drm_device *dev, 6205 6047 struct displayid_detailed_timings_1 *timings, 6206 6048 bool type_7) ··· 6285 6143 return num_modes; 6286 6144 } 6287 6145 6288 - static int drm_edid_connector_update(struct drm_connector *connector, 6289 - const struct drm_edid *drm_edid) 6146 + static int _drm_edid_connector_update(struct drm_connector *connector, 6147 + const struct drm_edid *drm_edid) 6290 6148 { 6291 6149 int num_modes = 0; 6292 6150 u32 quirks; ··· 6349 6207 return num_modes; 6350 6208 } 6351 6209 6210 + static void _drm_update_tile_info(struct drm_connector *connector, 6211 + const struct drm_edid *drm_edid); 6212 + 6213 + static int _drm_edid_connector_property_update(struct drm_connector *connector, 6214 + const struct drm_edid *drm_edid) 6215 + { 6216 + struct drm_device *dev = connector->dev; 6217 + int ret; 6218 + 6219 + if (connector->edid_blob_ptr) { 6220 + const struct edid *old_edid = connector->edid_blob_ptr->data; 6221 + 6222 + if (old_edid) { 6223 + if (!drm_edid_are_equal(drm_edid ? drm_edid->edid : NULL, old_edid)) { 6224 + connector->epoch_counter++; 6225 + drm_dbg_kms(dev, "[CONNECTOR:%d:%s] EDID changed, epoch counter %llu\n", 6226 + connector->base.id, connector->name, 6227 + connector->epoch_counter); 6228 + } 6229 + } 6230 + } 6231 + 6232 + ret = drm_property_replace_global_blob(dev, 6233 + &connector->edid_blob_ptr, 6234 + drm_edid ? drm_edid->size : 0, 6235 + drm_edid ? drm_edid->edid : NULL, 6236 + &connector->base, 6237 + dev->mode_config.edid_property); 6238 + if (ret) { 6239 + drm_dbg_kms(dev, "[CONNECTOR:%d:%s] EDID property update failed (%d)\n", 6240 + connector->base.id, connector->name, ret); 6241 + goto out; 6242 + } 6243 + 6244 + ret = drm_object_property_set_value(&connector->base, 6245 + dev->mode_config.non_desktop_property, 6246 + connector->display_info.non_desktop); 6247 + if (ret) { 6248 + drm_dbg_kms(dev, "[CONNECTOR:%d:%s] Non-desktop property update failed (%d)\n", 6249 + connector->base.id, connector->name, ret); 6250 + goto out; 6251 + } 6252 + 6253 + ret = drm_connector_set_tile_property(connector); 6254 + if (ret) { 6255 + drm_dbg_kms(dev, "[CONNECTOR:%d:%s] Tile property update failed (%d)\n", 6256 + connector->base.id, connector->name, ret); 6257 + goto out; 6258 + } 6259 + 6260 + out: 6261 + return ret; 6262 + } 6263 + 6264 + /** 6265 + * drm_edid_connector_update - Update connector information from EDID 6266 + * @connector: Connector 6267 + * @drm_edid: EDID 6268 + * 6269 + * Update the connector mode list, display info, ELD, HDR metadata, relevant 6270 + * properties, etc. from the passed in EDID. 6271 + * 6272 + * If EDID is NULL, reset the information. 6273 + * 6274 + * Return: The number of modes added or 0 if we couldn't find any. 6275 + */ 6276 + int drm_edid_connector_update(struct drm_connector *connector, 6277 + const struct drm_edid *drm_edid) 6278 + { 6279 + int count; 6280 + 6281 + /* 6282 + * FIXME: Reconcile the differences in override_edid handling between 6283 + * this and drm_connector_update_edid_property(). 6284 + * 6285 + * If override_edid is set, and the EDID passed in here originates from 6286 + * drm_edid_read() and friends, it will be the override EDID, and there 6287 + * are no issues. drm_connector_update_edid_property() ignoring requests 6288 + * to set the EDID dates back to a time when override EDID was not 6289 + * handled at the low level EDID read. 6290 + * 6291 + * The only way the EDID passed in here can be different from the 6292 + * override EDID is when a driver passes in an EDID that does *not* 6293 + * originate from drm_edid_read() and friends, or passes in a stale 6294 + * cached version. This, in turn, is a question of when an override EDID 6295 + * set via debugfs should take effect. 6296 + */ 6297 + 6298 + count = _drm_edid_connector_update(connector, drm_edid); 6299 + 6300 + _drm_update_tile_info(connector, drm_edid); 6301 + 6302 + /* Note: Ignore errors for now. */ 6303 + _drm_edid_connector_property_update(connector, drm_edid); 6304 + 6305 + return count; 6306 + } 6307 + EXPORT_SYMBOL(drm_edid_connector_update); 6308 + 6309 + static int _drm_connector_update_edid_property(struct drm_connector *connector, 6310 + const struct drm_edid *drm_edid) 6311 + { 6312 + /* ignore requests to set edid when overridden */ 6313 + if (connector->override_edid) 6314 + return 0; 6315 + 6316 + /* 6317 + * Set the display info, using edid if available, otherwise resetting 6318 + * the values to defaults. This duplicates the work done in 6319 + * drm_add_edid_modes, but that function is not consistently called 6320 + * before this one in all drivers and the computation is cheap enough 6321 + * that it seems better to duplicate it rather than attempt to ensure 6322 + * some arbitrary ordering of calls. 6323 + */ 6324 + if (drm_edid) 6325 + update_display_info(connector, drm_edid); 6326 + else 6327 + drm_reset_display_info(connector); 6328 + 6329 + _drm_update_tile_info(connector, drm_edid); 6330 + 6331 + return _drm_edid_connector_property_update(connector, drm_edid); 6332 + } 6333 + 6334 + /** 6335 + * drm_connector_update_edid_property - update the edid property of a connector 6336 + * @connector: drm connector 6337 + * @edid: new value of the edid property 6338 + * 6339 + * This function creates a new blob modeset object and assigns its id to the 6340 + * connector's edid property. 6341 + * Since we also parse tile information from EDID's displayID block, we also 6342 + * set the connector's tile property here. See drm_connector_set_tile_property() 6343 + * for more details. 6344 + * 6345 + * This function is deprecated. Use drm_edid_connector_update() instead. 6346 + * 6347 + * Returns: 6348 + * Zero on success, negative errno on failure. 6349 + */ 6350 + int drm_connector_update_edid_property(struct drm_connector *connector, 6351 + const struct edid *edid) 6352 + { 6353 + struct drm_edid drm_edid; 6354 + 6355 + return _drm_connector_update_edid_property(connector, 6356 + drm_edid_legacy_init(&drm_edid, edid)); 6357 + } 6358 + EXPORT_SYMBOL(drm_connector_update_edid_property); 6359 + 6352 6360 /** 6353 6361 * drm_add_edid_modes - add modes from EDID data, if available 6354 6362 * @connector: connector we're probing ··· 6507 6215 * Add the specified modes to the connector's mode list. Also fills out the 6508 6216 * &drm_display_info structure and ELD in @connector with any information which 6509 6217 * can be derived from the edid. 6218 + * 6219 + * This function is deprecated. Use drm_edid_connector_update() instead. 6510 6220 * 6511 6221 * Return: The number of modes added or 0 if we couldn't find any. 6512 6222 */ ··· 6522 6228 edid = NULL; 6523 6229 } 6524 6230 6525 - return drm_edid_connector_update(connector, 6526 - drm_edid_legacy_init(&drm_edid, edid)); 6231 + return _drm_edid_connector_update(connector, 6232 + drm_edid_legacy_init(&drm_edid, edid)); 6527 6233 } 6528 6234 EXPORT_SYMBOL(drm_add_edid_modes); 6529 6235 ··· 6937 6643 drm_mode_put_tile_group(connector->dev, connector->tile_group); 6938 6644 connector->tile_group = NULL; 6939 6645 } 6940 - } 6941 - 6942 - void drm_update_tile_info(struct drm_connector *connector, 6943 - const struct edid *edid) 6944 - { 6945 - struct drm_edid drm_edid; 6946 - 6947 - _drm_update_tile_info(connector, drm_edid_legacy_init(&drm_edid, edid)); 6948 6646 }
+1
drivers/gpu/drm/drm_mipi_dbi.c
··· 5 5 * Copyright 2016 Noralf Trønnes 6 6 */ 7 7 8 + #include <linux/backlight.h> 8 9 #include <linux/debugfs.h> 9 10 #include <linux/delay.h> 10 11 #include <linux/gpio/consumer.h>
+1
drivers/gpu/drm/drm_modes.c
··· 34 34 #include <linux/list.h> 35 35 #include <linux/list_sort.h> 36 36 #include <linux/export.h> 37 + #include <linux/fb.h> 37 38 38 39 #include <video/of_display_timing.h> 39 40 #include <video/of_videomode.h>
+2
drivers/gpu/drm/drm_of.c
··· 2 2 #include <linux/component.h> 3 3 #include <linux/export.h> 4 4 #include <linux/list.h> 5 + #include <linux/media-bus-format.h> 6 + #include <linux/of.h> 5 7 #include <linux/of_graph.h> 6 8 7 9 #include <drm/drm_bridge.h>
+34
drivers/gpu/drm/drm_probe_helper.c
··· 1049 1049 return count; 1050 1050 } 1051 1051 EXPORT_SYMBOL(drm_connector_helper_get_modes_from_ddc); 1052 + 1053 + /** 1054 + * drm_connector_helper_get_modes - Read EDID and update connector. 1055 + * @connector: The connector 1056 + * 1057 + * Read the EDID using drm_edid_read() (which requires that connector->ddc is 1058 + * set), and update the connector using the EDID. 1059 + * 1060 + * This can be used as the "default" connector helper .get_modes() hook if the 1061 + * driver does not need any special processing. This is sets the example what 1062 + * custom .get_modes() hooks should do regarding EDID read and connector update. 1063 + * 1064 + * Returns: Number of modes. 1065 + */ 1066 + int drm_connector_helper_get_modes(struct drm_connector *connector) 1067 + { 1068 + const struct drm_edid *drm_edid; 1069 + int count; 1070 + 1071 + drm_edid = drm_edid_read(connector); 1072 + 1073 + /* 1074 + * Unconditionally update the connector. If the EDID was read 1075 + * successfully, fill in the connector information derived from the 1076 + * EDID. Otherwise, if the EDID is NULL, clear the connector 1077 + * information. 1078 + */ 1079 + count = drm_edid_connector_update(connector, drm_edid); 1080 + 1081 + drm_edid_free(drm_edid); 1082 + 1083 + return count; 1084 + } 1085 + EXPORT_SYMBOL(drm_connector_helper_get_modes);
+1
drivers/gpu/drm/exynos/exynos_dp.c
··· 10 10 #include <linux/component.h> 11 11 #include <linux/err.h> 12 12 #include <linux/module.h> 13 + #include <linux/of.h> 13 14 #include <linux/of_graph.h> 14 15 #include <linux/platform_device.h> 15 16 #include <linux/pm_runtime.h>
+1
drivers/gpu/drm/exynos/exynos_drm_dpi.c
··· 7 7 * Contacts: Andrzej Hajda <a.hajda@samsung.com> 8 8 */ 9 9 10 + #include <linux/of.h> 10 11 #include <linux/of_graph.h> 11 12 #include <linux/regulator/consumer.h> 12 13
+1
drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c
··· 14 14 #include <linux/clk.h> 15 15 #include <linux/component.h> 16 16 #include <linux/delay.h> 17 + #include <linux/mod_devicetable.h> 17 18 #include <linux/module.h> 18 19 #include <linux/platform_device.h> 19 20
+1
drivers/gpu/drm/i2c/tda998x_drv.c
··· 7 7 #include <linux/component.h> 8 8 #include <linux/gpio/consumer.h> 9 9 #include <linux/hdmi.h> 10 + #include <linux/i2c.h> 10 11 #include <linux/module.h> 11 12 #include <linux/platform_data/tda9950.h> 12 13 #include <linux/irq.h>
+1
drivers/gpu/drm/i915/display/intel_backlight.c
··· 3 3 * Copyright © 2021 Intel Corporation 4 4 */ 5 5 6 + #include <linux/backlight.h> 6 7 #include <linux/kernel.h> 7 8 #include <linux/pwm.h> 8 9 #include <linux/string_helpers.h>
+1
drivers/gpu/drm/imx/dcss/dcss-drv.c
··· 5 5 6 6 #include <linux/module.h> 7 7 #include <linux/kernel.h> 8 + #include <linux/of.h> 8 9 #include <linux/platform_device.h> 9 10 #include <drm/drm_module.h> 10 11 #include <drm/drm_of.h>
+1
drivers/gpu/drm/imx/imx-ldb.c
··· 7 7 8 8 #include <linux/clk.h> 9 9 #include <linux/component.h> 10 + #include <linux/media-bus-format.h> 10 11 #include <linux/mfd/syscon.h> 11 12 #include <linux/mfd/syscon/imx6q-iomuxc-gpr.h> 12 13 #include <linux/module.h>
+1
drivers/gpu/drm/imx/parallel-display.c
··· 6 6 */ 7 7 8 8 #include <linux/component.h> 9 + #include <linux/media-bus-format.h> 9 10 #include <linux/module.h> 10 11 #include <linux/platform_device.h> 11 12 #include <linux/videodev2.h>
+9 -2
drivers/gpu/drm/ingenic/ingenic-drm-drv.c
··· 11 11 #include <linux/clk.h> 12 12 #include <linux/dma-mapping.h> 13 13 #include <linux/io.h> 14 + #include <linux/media-bus-format.h> 14 15 #include <linux/module.h> 15 16 #include <linux/mutex.h> 16 17 #include <linux/of_device.h> ··· 71 70 bool map_noncoherent; 72 71 bool use_extended_hwdesc; 73 72 bool plane_f0_not_working; 73 + u32 max_burst; 74 74 unsigned int max_width, max_height; 75 75 const u32 *formats_f0, *formats_f1; 76 76 unsigned int num_formats_f0, num_formats_f1; ··· 321 319 regmap_write(priv->map, JZ_REG_LCD_REV, mode->htotal << 16); 322 320 } 323 321 324 - regmap_set_bits(priv->map, JZ_REG_LCD_CTRL, 325 - JZ_LCD_CTRL_OFUP | JZ_LCD_CTRL_BURST_16); 322 + regmap_update_bits(priv->map, JZ_REG_LCD_CTRL, 323 + JZ_LCD_CTRL_OFUP | JZ_LCD_CTRL_BURST_MASK, 324 + JZ_LCD_CTRL_OFUP | priv->soc_info->max_burst); 326 325 327 326 /* 328 327 * IPU restart - specify how much time the LCDC will wait before ··· 1522 1519 .map_noncoherent = false, 1523 1520 .max_width = 800, 1524 1521 .max_height = 600, 1522 + .max_burst = JZ_LCD_CTRL_BURST_16, 1525 1523 .formats_f1 = jz4740_formats, 1526 1524 .num_formats_f1 = ARRAY_SIZE(jz4740_formats), 1527 1525 /* JZ4740 has only one plane */ ··· 1534 1530 .map_noncoherent = false, 1535 1531 .max_width = 800, 1536 1532 .max_height = 600, 1533 + .max_burst = JZ_LCD_CTRL_BURST_16, 1537 1534 .formats_f1 = jz4725b_formats_f1, 1538 1535 .num_formats_f1 = ARRAY_SIZE(jz4725b_formats_f1), 1539 1536 .formats_f0 = jz4725b_formats_f0, ··· 1547 1542 .map_noncoherent = true, 1548 1543 .max_width = 1280, 1549 1544 .max_height = 720, 1545 + .max_burst = JZ_LCD_CTRL_BURST_64, 1550 1546 .formats_f1 = jz4770_formats_f1, 1551 1547 .num_formats_f1 = ARRAY_SIZE(jz4770_formats_f1), 1552 1548 .formats_f0 = jz4770_formats_f0, ··· 1562 1556 .plane_f0_not_working = true, /* REVISIT */ 1563 1557 .max_width = 4096, 1564 1558 .max_height = 2048, 1559 + .max_burst = JZ_LCD_CTRL_BURST_64, 1565 1560 .formats_f1 = jz4770_formats_f1, 1566 1561 .num_formats_f1 = ARRAY_SIZE(jz4770_formats_f1), 1567 1562 .formats_f0 = jz4770_formats_f0,
+3
drivers/gpu/drm/ingenic/ingenic-drm.h
··· 106 106 #define JZ_LCD_CTRL_BURST_4 (0x0 << 28) 107 107 #define JZ_LCD_CTRL_BURST_8 (0x1 << 28) 108 108 #define JZ_LCD_CTRL_BURST_16 (0x2 << 28) 109 + #define JZ_LCD_CTRL_BURST_32 (0x3 << 28) 110 + #define JZ_LCD_CTRL_BURST_64 (0x4 << 28) 111 + #define JZ_LCD_CTRL_BURST_MASK (0x7 << 28) 109 112 #define JZ_LCD_CTRL_RGB555 BIT(27) 110 113 #define JZ_LCD_CTRL_OFUP BIT(26) 111 114 #define JZ_LCD_CTRL_FRC_GRAYSCALE_16 (0x0 << 24)
+1
drivers/gpu/drm/kmb/kmb_dsi.c
··· 5 5 6 6 #include <linux/clk.h> 7 7 #include <linux/delay.h> 8 + #include <linux/of.h> 8 9 #include <linux/of_graph.h> 9 10 #include <linux/mfd/syscon.h> 10 11 #include <linux/platform_device.h>
+1
drivers/gpu/drm/mcde/mcde_clk_div.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 #include <linux/clk-provider.h> 3 + #include <linux/io.h> 3 4 #include <linux/regulator/consumer.h> 4 5 5 6 #include "mcde_drm.h"
+1
drivers/gpu/drm/mediatek/mtk_dpi.c
··· 8 8 #include <linux/component.h> 9 9 #include <linux/interrupt.h> 10 10 #include <linux/kernel.h> 11 + #include <linux/media-bus-format.h> 11 12 #include <linux/of.h> 12 13 #include <linux/of_device.h> 13 14 #include <linux/of_gpio.h>
+1
drivers/gpu/drm/mxsfb/lcdif_kms.c
··· 8 8 #include <linux/clk.h> 9 9 #include <linux/io.h> 10 10 #include <linux/iopoll.h> 11 + #include <linux/media-bus-format.h> 11 12 #include <linux/pm_runtime.h> 12 13 #include <linux/spinlock.h> 13 14
+1
drivers/gpu/drm/mxsfb/mxsfb_kms.c
··· 11 11 #include <linux/clk.h> 12 12 #include <linux/io.h> 13 13 #include <linux/iopoll.h> 14 + #include <linux/media-bus-format.h> 14 15 #include <linux/pm_runtime.h> 15 16 #include <linux/spinlock.h> 16 17
+1
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
··· 17 17 #include <linux/list.h> 18 18 #include <linux/mm.h> 19 19 #include <linux/module.h> 20 + #include <linux/of.h> 20 21 #include <linux/platform_device.h> /* platform_device() */ 21 22 #include <linux/sched.h> 22 23 #include <linux/seq_file.h>
+1
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
··· 45 45 #include <linux/err.h> 46 46 #include <linux/fb.h> 47 47 #include <linux/i2c.h> 48 + #include <linux/media-bus-format.h> 48 49 #include <linux/module.h> 49 50 #include <linux/of.h> 50 51 #include <linux/of_device.h>
+1
drivers/gpu/drm/panel/panel-raydium-rm67191.c
··· 8 8 #include <linux/backlight.h> 9 9 #include <linux/delay.h> 10 10 #include <linux/gpio/consumer.h> 11 + #include <linux/media-bus-format.h> 11 12 #include <linux/module.h> 12 13 #include <linux/of.h> 13 14 #include <linux/regulator/consumer.h>
+1
drivers/gpu/drm/panel/panel-seiko-43wvf1g.c
··· 7 7 */ 8 8 9 9 #include <linux/delay.h> 10 + #include <linux/media-bus-format.h> 10 11 #include <linux/module.h> 11 12 #include <linux/of.h> 12 13 #include <linux/platform_device.h>
+59
drivers/gpu/drm/panel/panel-simple.c
··· 23 23 24 24 #include <linux/delay.h> 25 25 #include <linux/gpio/consumer.h> 26 + #include <linux/i2c.h> 27 + #include <linux/media-bus-format.h> 26 28 #include <linux/module.h> 27 29 #include <linux/of_platform.h> 28 30 #include <linux/platform_device.h> ··· 1755 1753 .connector_type = DRM_MODE_CONNECTOR_DPI, 1756 1754 }; 1757 1755 1756 + static const struct display_timing edt_etml0700y5dha_timing = { 1757 + .pixelclock = { 40800000, 51200000, 67200000 }, 1758 + .hactive = { 1024, 1024, 1024 }, 1759 + .hfront_porch = { 30, 106, 125 }, 1760 + .hback_porch = { 30, 106, 125 }, 1761 + .hsync_len = { 30, 108, 126 }, 1762 + .vactive = { 600, 600, 600 }, 1763 + .vfront_porch = { 3, 12, 67}, 1764 + .vback_porch = { 3, 12, 67 }, 1765 + .vsync_len = { 4, 11, 66 }, 1766 + .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW | 1767 + DISPLAY_FLAGS_DE_HIGH, 1768 + }; 1769 + 1770 + static const struct panel_desc edt_etml0700y5dha = { 1771 + .timings = &edt_etml0700y5dha_timing, 1772 + .num_timings = 1, 1773 + .bpc = 8, 1774 + .size = { 1775 + .width = 155, 1776 + .height = 86, 1777 + }, 1778 + .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, 1779 + .connector_type = DRM_MODE_CONNECTOR_LVDS, 1780 + }; 1781 + 1758 1782 static const struct drm_display_mode edt_etmv570g2dhu_mode = { 1759 1783 .clock = 25175, 1760 1784 .hdisplay = 640, ··· 2046 2018 .height = 152, 2047 2019 }, 2048 2020 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, 2021 + .connector_type = DRM_MODE_CONNECTOR_LVDS, 2022 + }; 2023 + 2024 + static const struct display_timing hannstar_hsd101pww2_timing = { 2025 + .pixelclock = { 64300000, 71100000, 82000000 }, 2026 + .hactive = { 1280, 1280, 1280 }, 2027 + .hfront_porch = { 1, 1, 10 }, 2028 + .hback_porch = { 1, 1, 10 }, 2029 + .hsync_len = { 58, 158, 661 }, 2030 + .vactive = { 800, 800, 800 }, 2031 + .vfront_porch = { 1, 1, 10 }, 2032 + .vback_porch = { 1, 1, 10 }, 2033 + .vsync_len = { 1, 21, 203 }, 2034 + .flags = DISPLAY_FLAGS_DE_HIGH, 2035 + }; 2036 + 2037 + static const struct panel_desc hannstar_hsd101pww2 = { 2038 + .timings = &hannstar_hsd101pww2_timing, 2039 + .num_timings = 1, 2040 + .bpc = 8, 2041 + .size = { 2042 + .width = 217, 2043 + .height = 136, 2044 + }, 2045 + .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, 2049 2046 .connector_type = DRM_MODE_CONNECTOR_LVDS, 2050 2047 }; 2051 2048 ··· 3996 3943 .compatible = "edt,etm0700g0edh6", 3997 3944 .data = &edt_etm0700g0bdh6, 3998 3945 }, { 3946 + .compatible = "edt,etml0700y5dha", 3947 + .data = &edt_etml0700y5dha, 3948 + }, { 3999 3949 .compatible = "edt,etmv570g2dhu", 4000 3950 .data = &edt_etmv570g2dhu, 4001 3951 }, { ··· 4028 3972 }, { 4029 3973 .compatible = "hannstar,hsd100pxn1", 4030 3974 .data = &hannstar_hsd100pxn1, 3975 + }, { 3976 + .compatible = "hannstar,hsd101pww2", 3977 + .data = &hannstar_hsd101pww2, 4031 3978 }, { 4032 3979 .compatible = "hit,tx23d38vm0caa", 4033 3980 .data = &hitachi_tx23d38vm0caa
+1
drivers/gpu/drm/pl111/pl111_display.c
··· 12 12 #include <linux/clk.h> 13 13 #include <linux/delay.h> 14 14 #include <linux/dma-buf.h> 15 + #include <linux/media-bus-format.h> 15 16 #include <linux/of_graph.h> 16 17 17 18 #include <drm/drm_fb_cma_helper.h>
+1
drivers/gpu/drm/rcar-du/rcar_du_encoder.c
··· 8 8 */ 9 9 10 10 #include <linux/export.h> 11 + #include <linux/of.h> 11 12 #include <linux/slab.h> 12 13 13 14 #include <drm/drm_bridge.h>
+1
drivers/gpu/drm/rcar-du/rcar_lvds.c
··· 10 10 #include <linux/clk.h> 11 11 #include <linux/delay.h> 12 12 #include <linux/io.h> 13 + #include <linux/media-bus-format.h> 13 14 #include <linux/module.h> 14 15 #include <linux/of.h> 15 16 #include <linux/of_device.h>
+9 -1
drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
··· 408 408 if (IS_ERR(dp->adp)) 409 409 return PTR_ERR(dp->adp); 410 410 411 - return component_add(dev, &rockchip_dp_component_ops); 411 + ret = component_add(dev, &rockchip_dp_component_ops); 412 + if (ret) 413 + goto err_dp_remove; 414 + 415 + return 0; 416 + 417 + err_dp_remove: 418 + analogix_dp_remove(dp->adp); 419 + return ret; 412 420 } 413 421 414 422 static int rockchip_dp_remove(struct platform_device *pdev)
+3
drivers/gpu/drm/rockchip/rockchip_drm_vop.c
··· 1572 1572 { 1573 1573 struct rockchip_crtc_state *rockchip_state; 1574 1574 1575 + if (WARN_ON(!crtc->state)) 1576 + return NULL; 1577 + 1575 1578 rockchip_state = kzalloc(sizeof(*rockchip_state), GFP_KERNEL); 1576 1579 if (!rockchip_state) 1577 1580 return NULL;
+1
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
··· 9 9 #include <linux/delay.h> 10 10 #include <linux/iopoll.h> 11 11 #include <linux/kernel.h> 12 + #include <linux/media-bus-format.h> 12 13 #include <linux/mfd/syscon.h> 13 14 #include <linux/module.h> 14 15 #include <linux/of.h>
+1
drivers/gpu/drm/rockchip/rockchip_rgb.c
··· 6 6 */ 7 7 8 8 #include <linux/component.h> 9 + #include <linux/media-bus-format.h> 9 10 #include <linux/of_graph.h> 10 11 11 12 #include <drm/display/drm_dp_helper.h>
+1
drivers/gpu/drm/sti/sti_compositor.c
··· 9 9 #include <linux/component.h> 10 10 #include <linux/io.h> 11 11 #include <linux/module.h> 12 + #include <linux/of.h> 12 13 #include <linux/platform_device.h> 13 14 #include <linux/reset.h> 14 15
+1
drivers/gpu/drm/sti/sti_gdp.c
··· 7 7 */ 8 8 9 9 #include <linux/dma-mapping.h> 10 + #include <linux/of.h> 10 11 #include <linux/seq_file.h> 11 12 12 13 #include <drm/drm_atomic.h>
+1
drivers/gpu/drm/sti/sti_hda.c
··· 7 7 #include <linux/clk.h> 8 8 #include <linux/component.h> 9 9 #include <linux/io.h> 10 + #include <linux/mod_devicetable.h> 10 11 #include <linux/module.h> 11 12 #include <linux/platform_device.h> 12 13 #include <linux/seq_file.h>
+1
drivers/gpu/drm/sti/sti_hdmi.c
··· 8 8 #include <linux/component.h> 9 9 #include <linux/debugfs.h> 10 10 #include <linux/hdmi.h> 11 + #include <linux/i2c.h> 11 12 #include <linux/module.h> 12 13 #include <linux/io.h> 13 14 #include <linux/platform_device.h>
+1
drivers/gpu/drm/sti/sti_hqvdp.c
··· 10 10 #include <linux/firmware.h> 11 11 #include <linux/io.h> 12 12 #include <linux/module.h> 13 + #include <linux/of.h> 13 14 #include <linux/reset.h> 14 15 #include <linux/seq_file.h> 15 16
+1
drivers/gpu/drm/stm/ltdc.c
··· 12 12 #include <linux/component.h> 13 13 #include <linux/delay.h> 14 14 #include <linux/interrupt.h> 15 + #include <linux/media-bus-format.h> 15 16 #include <linux/module.h> 16 17 #include <linux/of_address.h> 17 18 #include <linux/of_graph.h>
+1
drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c
··· 7 7 8 8 #include <linux/clk.h> 9 9 #include <linux/component.h> 10 + #include <linux/i2c.h> 10 11 #include <linux/iopoll.h> 11 12 #include <linux/module.h> 12 13 #include <linux/of_device.h>
+1
drivers/gpu/drm/sun4i/sun4i_tcon.c
··· 8 8 9 9 #include <linux/component.h> 10 10 #include <linux/ioport.h> 11 + #include <linux/media-bus-format.h> 11 12 #include <linux/module.h> 12 13 #include <linux/of_address.h> 13 14 #include <linux/of_device.h>
+1
drivers/gpu/drm/sun4i/sun4i_tcon.h
··· 14 14 15 15 #include <linux/kernel.h> 16 16 #include <linux/list.h> 17 + #include <linux/mod_devicetable.h> 17 18 #include <linux/reset.h> 18 19 19 20 #define SUN4I_TCON_GCTL_REG 0x0
+1
drivers/gpu/drm/tidss/tidss_dispc.c
··· 11 11 #include <linux/interrupt.h> 12 12 #include <linux/io.h> 13 13 #include <linux/kernel.h> 14 + #include <linux/media-bus-format.h> 14 15 #include <linux/module.h> 15 16 #include <linux/mfd/syscon.h> 16 17 #include <linux/of.h>
+1
drivers/gpu/drm/tilcdc/tilcdc_panel.c
··· 4 4 * Author: Rob Clark <robdclark@gmail.com> 5 5 */ 6 6 7 + #include <linux/backlight.h> 7 8 #include <linux/gpio/consumer.h> 8 9 #include <linux/pinctrl/consumer.h> 9 10 #include <linux/platform_device.h>
+1
drivers/gpu/drm/vc4/vc4_dpi.c
··· 20 20 #include <drm/drm_simple_kms_helper.h> 21 21 #include <linux/clk.h> 22 22 #include <linux/component.h> 23 + #include <linux/media-bus-format.h> 23 24 #include <linux/of_graph.h> 24 25 #include <linux/of_platform.h> 25 26 #include "vc4_drv.h"
+1 -1
drivers/gpu/drm/vc4/vc4_drv.c
··· 209 209 } 210 210 } 211 211 212 - const struct of_device_id vc4_dma_range_matches[] = { 212 + static const struct of_device_id vc4_dma_range_matches[] = { 213 213 { .compatible = "brcm,bcm2711-hvs" }, 214 214 { .compatible = "brcm,bcm2835-hvs" }, 215 215 { .compatible = "brcm,bcm2835-v3d" },
+1
drivers/gpu/drm/vc4/vc4_drv.h
··· 6 6 #define _VC4_DRV_H_ 7 7 8 8 #include <linux/delay.h> 9 + #include <linux/of.h> 9 10 #include <linux/refcount.h> 10 11 #include <linux/uaccess.h> 11 12
+1
drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
··· 26 26 * 27 27 **************************************************************************/ 28 28 29 + #include <linux/fb.h> 29 30 #include <linux/pci.h> 30 31 31 32 #include <drm/drm_fourcc.h>
+1 -1
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
··· 252 252 vmw_write(dev_priv, SVGA_REG_CURSOR4_Y, y); 253 253 vmw_write(dev_priv, SVGA_REG_CURSOR4_SCREEN_ID, SVGA3D_INVALID_ID); 254 254 vmw_write(dev_priv, SVGA_REG_CURSOR4_ON, svga_cursor_on); 255 - vmw_write(dev_priv, SVGA_REG_CURSOR4_SUBMIT, TRUE); 255 + vmw_write(dev_priv, SVGA_REG_CURSOR4_SUBMIT, 1); 256 256 } else if (vmw_is_cursor_bypass3_enabled(dev_priv)) { 257 257 vmw_fifo_mem_write(dev_priv, SVGA_FIFO_CURSOR_ON, svga_cursor_on); 258 258 vmw_fifo_mem_write(dev_priv, SVGA_FIFO_CURSOR_X, x);
+1
drivers/gpu/drm/xlnx/zynqmp_dp.c
··· 25 25 #include <linux/clk.h> 26 26 #include <linux/delay.h> 27 27 #include <linux/device.h> 28 + #include <linux/io.h> 28 29 #include <linux/module.h> 29 30 #include <linux/platform_device.h> 30 31 #include <linux/pm_runtime.h>
+5 -1
include/drm/drm_connector.h
··· 1527 1527 struct drm_cmdline_mode cmdline_mode; 1528 1528 /** @force: a DRM_FORCE_<foo> state for forced mode sets */ 1529 1529 enum drm_connector_force force; 1530 - /** @override_edid: has the EDID been overwritten through debugfs for testing? */ 1530 + /** 1531 + * @override_edid: has the EDID been overwritten through debugfs for 1532 + * testing? Do not modify outside of drm_edid_override_set() and 1533 + * drm_edid_override_reset(). 1534 + */ 1531 1535 bool override_edid; 1532 1536 /** @epoch_counter: used to detect any other changes in connector, besides status */ 1533 1537 u64 epoch_counter;
-11
include/drm/drm_crtc.h
··· 25 25 #ifndef __DRM_CRTC_H__ 26 26 #define __DRM_CRTC_H__ 27 27 28 - #include <linux/i2c.h> 29 28 #include <linux/spinlock.h> 30 29 #include <linux/types.h> 31 - #include <linux/fb.h> 32 - #include <linux/hdmi.h> 33 - #include <linux/media-bus-format.h> 34 - #include <uapi/drm/drm_mode.h> 35 - #include <uapi/drm/drm_fourcc.h> 36 30 #include <drm/drm_modeset_lock.h> 37 - #include <drm/drm_rect.h> 38 31 #include <drm/drm_mode_object.h> 39 32 #include <drm/drm_modes.h> 40 33 #include <drm/drm_device.h> 41 - #include <drm/drm_property.h> 42 34 #include <drm/drm_plane.h> 43 - #include <drm/drm_color_mgmt.h> 44 35 #include <drm/drm_debugfs_crc.h> 45 36 #include <drm/drm_mode_config.h> 46 37 ··· 40 49 struct drm_framebuffer; 41 50 struct drm_mode_set; 42 51 struct drm_file; 43 - struct drm_clip_rect; 44 52 struct drm_printer; 45 53 struct drm_self_refresh_data; 46 54 struct device_node; 47 - struct dma_fence; 48 55 struct edid; 49 56 50 57 static inline int64_t U642I64(uint64_t val)
+3
include/drm/drm_edid.h
··· 597 597 const struct drm_edid *drm_edid_alloc(const void *edid, size_t size); 598 598 const struct drm_edid *drm_edid_dup(const struct drm_edid *drm_edid); 599 599 void drm_edid_free(const struct drm_edid *drm_edid); 600 + const struct edid *drm_edid_raw(const struct drm_edid *drm_edid); 600 601 const struct drm_edid *drm_edid_read(struct drm_connector *connector); 601 602 const struct drm_edid *drm_edid_read_ddc(struct drm_connector *connector, 602 603 struct i2c_adapter *adapter); 603 604 const struct drm_edid *drm_edid_read_custom(struct drm_connector *connector, 604 605 int (*read_block)(void *context, u8 *buf, unsigned int block, size_t len), 605 606 void *context); 607 + int drm_edid_connector_update(struct drm_connector *connector, 608 + const struct drm_edid *edid); 606 609 const u8 *drm_find_edid_extension(const struct drm_edid *drm_edid, 607 610 int ext_id, int *ext_index); 608 611
+2
include/drm/drm_encoder_slave.h
··· 27 27 #ifndef __DRM_ENCODER_SLAVE_H__ 28 28 #define __DRM_ENCODER_SLAVE_H__ 29 29 30 + #include <linux/i2c.h> 31 + 30 32 #include <drm/drm_crtc.h> 31 33 #include <drm/drm_encoder.h> 32 34
+1
include/drm/drm_fb_helper.h
··· 35 35 #include <drm/drm_client.h> 36 36 #include <drm/drm_crtc.h> 37 37 #include <drm/drm_device.h> 38 + #include <linux/fb.h> 38 39 #include <linux/kgdb.h> 39 40 40 41 enum mode_set_atomic {
+1
include/drm/drm_probe_helper.h
··· 27 27 bool drm_kms_helper_is_poll_worker(void); 28 28 29 29 int drm_connector_helper_get_modes_from_ddc(struct drm_connector *connector); 30 + int drm_connector_helper_get_modes(struct drm_connector *connector); 30 31 31 32 #endif