.. | .. |
---|
28 | 28 | #include <linux/ctype.h> |
---|
29 | 29 | #include <linux/hdmi.h> |
---|
30 | 30 | #include <drm/drm_mode_object.h> |
---|
| 31 | +#include <drm/drm_util.h> |
---|
31 | 32 | |
---|
32 | 33 | #include <uapi/drm/drm_mode.h> |
---|
33 | 34 | |
---|
.. | .. |
---|
39 | 40 | struct drm_property; |
---|
40 | 41 | struct drm_property_blob; |
---|
41 | 42 | struct drm_printer; |
---|
42 | | -struct drm_panel; |
---|
43 | 43 | struct edid; |
---|
| 44 | +struct i2c_adapter; |
---|
44 | 45 | |
---|
45 | 46 | enum drm_connector_force { |
---|
46 | 47 | DRM_FORCE_UNSPECIFIED, |
---|
.. | .. |
---|
174 | 175 | struct drm_scrambling scrambling; |
---|
175 | 176 | }; |
---|
176 | 177 | |
---|
| 178 | +#ifdef CONFIG_NO_GKI |
---|
177 | 179 | /** |
---|
178 | 180 | * struct drm_hdmi_dsc_cap - DSC capabilities of HDMI sink |
---|
179 | 181 | * |
---|
.. | .. |
---|
214 | 216 | /** @total_chunk_kbytes: max size of chunks in KBs supported per line*/ |
---|
215 | 217 | u8 total_chunk_kbytes; |
---|
216 | 218 | }; |
---|
| 219 | +#endif |
---|
217 | 220 | |
---|
218 | 221 | /** |
---|
219 | 222 | * struct drm_hdmi_info - runtime information about the connected HDMI sink |
---|
.. | .. |
---|
227 | 230 | |
---|
228 | 231 | /** |
---|
229 | 232 | * @y420_vdb_modes: bitmap of modes which can support ycbcr420 |
---|
230 | | - * output only (not normal RGB/YCBCR444/422 outputs). There are total |
---|
231 | | - * 107 VICs defined by CEA-861-F spec, so the size is 128 bits to map |
---|
232 | | - * upto 128 VICs; |
---|
| 233 | + * output only (not normal RGB/YCBCR444/422 outputs). The max VIC |
---|
| 234 | + * defined by the CEA-861-G spec is 219, so the size is 256 bits to map |
---|
| 235 | + * up to 256 VICs. |
---|
233 | 236 | */ |
---|
234 | | - unsigned long y420_vdb_modes[BITS_TO_LONGS(128)]; |
---|
| 237 | + unsigned long y420_vdb_modes[BITS_TO_LONGS(256)]; |
---|
235 | 238 | |
---|
236 | 239 | /** |
---|
237 | 240 | * @y420_cmdb_modes: bitmap of modes which can support ycbcr420 |
---|
238 | | - * output also, along with normal HDMI outputs. There are total 107 |
---|
239 | | - * VICs defined by CEA-861-F spec, so the size is 128 bits to map upto |
---|
240 | | - * 128 VICs; |
---|
| 241 | + * output also, along with normal HDMI outputs. The max VIC defined by |
---|
| 242 | + * the CEA-861-G spec is 219, so the size is 256 bits to map up to 256 |
---|
| 243 | + * VICs. |
---|
241 | 244 | */ |
---|
242 | | - unsigned long y420_cmdb_modes[BITS_TO_LONGS(128)]; |
---|
| 245 | + unsigned long y420_cmdb_modes[BITS_TO_LONGS(256)]; |
---|
243 | 246 | |
---|
244 | 247 | /** @y420_cmdb_map: bitmap of SVD index, to extraxt vcb modes */ |
---|
245 | 248 | u64 y420_cmdb_map; |
---|
.. | .. |
---|
247 | 250 | /** @y420_dc_modes: bitmap of deep color support index */ |
---|
248 | 251 | u8 y420_dc_modes; |
---|
249 | 252 | |
---|
250 | | - /* @colorimetry: bitmap of supported colorimetry modes */ |
---|
251 | | - u16 colorimetry; |
---|
252 | | - |
---|
| 253 | +#ifdef CONFIG_NO_GKI |
---|
253 | 254 | /** @max_frl_rate_per_lane: support fixed rate link */ |
---|
254 | 255 | u8 max_frl_rate_per_lane; |
---|
255 | 256 | |
---|
.. | .. |
---|
258 | 259 | |
---|
259 | 260 | /** @dsc_cap: DSC capabilities of the sink */ |
---|
260 | 261 | struct drm_hdmi_dsc_cap dsc_cap; |
---|
| 262 | +#endif |
---|
261 | 263 | }; |
---|
262 | 264 | |
---|
263 | 265 | /** |
---|
.. | .. |
---|
305 | 307 | DRM_MODE_PANEL_ORIENTATION_RIGHT_UP, |
---|
306 | 308 | }; |
---|
307 | 309 | |
---|
| 310 | +/** |
---|
| 311 | + * struct drm_monitor_range_info - Panel's Monitor range in EDID for |
---|
| 312 | + * &drm_display_info |
---|
| 313 | + * |
---|
| 314 | + * This struct is used to store a frequency range supported by panel |
---|
| 315 | + * as parsed from EDID's detailed monitor range descriptor block. |
---|
| 316 | + * |
---|
| 317 | + * @min_vfreq: This is the min supported refresh rate in Hz from |
---|
| 318 | + * EDID's detailed monitor range. |
---|
| 319 | + * @max_vfreq: This is the max supported refresh rate in Hz from |
---|
| 320 | + * EDID's detailed monitor range |
---|
| 321 | + */ |
---|
| 322 | +struct drm_monitor_range_info { |
---|
| 323 | + u8 min_vfreq; |
---|
| 324 | + u8 max_vfreq; |
---|
| 325 | +}; |
---|
| 326 | + |
---|
308 | 327 | /* |
---|
309 | 328 | * This is a consolidated colorimetry list supported by HDMI and |
---|
310 | 329 | * DP protocol standard. The respective connectors will register |
---|
.. | .. |
---|
332 | 351 | /* Additional Colorimetry extension added as part of CTA 861.G */ |
---|
333 | 352 | #define DRM_MODE_COLORIMETRY_DCI_P3_RGB_D65 11 |
---|
334 | 353 | #define DRM_MODE_COLORIMETRY_DCI_P3_RGB_THEATER 12 |
---|
335 | | -/* DP MSA Colorimetry Options */ |
---|
336 | | -#define DRM_MODE_DP_COLORIMETRY_BT601_YCC 13 |
---|
337 | | -#define DRM_MODE_DP_COLORIMETRY_BT709_YCC 14 |
---|
338 | | -#define DRM_MODE_DP_COLORIMETRY_SRGB 15 |
---|
339 | | -#define DRM_MODE_DP_COLORIMETRY_RGB_WIDE_GAMUT 16 |
---|
340 | | -#define DRM_MODE_DP_COLORIMETRY_SCRGB 17 |
---|
| 354 | +/* Additional Colorimetry Options added for DP 1.4a VSC Colorimetry Format */ |
---|
| 355 | +#define DRM_MODE_COLORIMETRY_RGB_WIDE_FIXED 13 |
---|
| 356 | +#define DRM_MODE_COLORIMETRY_RGB_WIDE_FLOAT 14 |
---|
| 357 | +#define DRM_MODE_COLORIMETRY_BT601_YCC 15 |
---|
| 358 | + |
---|
| 359 | +/** |
---|
| 360 | + * enum drm_bus_flags - bus_flags info for &drm_display_info |
---|
| 361 | + * |
---|
| 362 | + * This enum defines signal polarities and clock edge information for signals on |
---|
| 363 | + * a bus as bitmask flags. |
---|
| 364 | + * |
---|
| 365 | + * The clock edge information is conveyed by two sets of symbols, |
---|
| 366 | + * DRM_BUS_FLAGS_*_DRIVE_\* and DRM_BUS_FLAGS_*_SAMPLE_\*. When this enum is |
---|
| 367 | + * used to describe a bus from the point of view of the transmitter, the |
---|
| 368 | + * \*_DRIVE_\* flags should be used. When used from the point of view of the |
---|
| 369 | + * receiver, the \*_SAMPLE_\* flags should be used. The \*_DRIVE_\* and |
---|
| 370 | + * \*_SAMPLE_\* flags alias each other, with the \*_SAMPLE_POSEDGE and |
---|
| 371 | + * \*_SAMPLE_NEGEDGE flags being equal to \*_DRIVE_NEGEDGE and \*_DRIVE_POSEDGE |
---|
| 372 | + * respectively. This simplifies code as signals are usually sampled on the |
---|
| 373 | + * opposite edge of the driving edge. Transmitters and receivers may however |
---|
| 374 | + * need to take other signal timings into account to convert between driving |
---|
| 375 | + * and sample edges. |
---|
| 376 | + */ |
---|
| 377 | +enum drm_bus_flags { |
---|
| 378 | + /** |
---|
| 379 | + * @DRM_BUS_FLAG_DE_LOW: |
---|
| 380 | + * |
---|
| 381 | + * The Data Enable signal is active low |
---|
| 382 | + */ |
---|
| 383 | + DRM_BUS_FLAG_DE_LOW = BIT(0), |
---|
| 384 | + |
---|
| 385 | + /** |
---|
| 386 | + * @DRM_BUS_FLAG_DE_HIGH: |
---|
| 387 | + * |
---|
| 388 | + * The Data Enable signal is active high |
---|
| 389 | + */ |
---|
| 390 | + DRM_BUS_FLAG_DE_HIGH = BIT(1), |
---|
| 391 | + |
---|
| 392 | + /** |
---|
| 393 | + * @DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE: |
---|
| 394 | + * |
---|
| 395 | + * Data is driven on the rising edge of the pixel clock |
---|
| 396 | + */ |
---|
| 397 | + DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE = BIT(2), |
---|
| 398 | + |
---|
| 399 | + /** |
---|
| 400 | + * @DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE: |
---|
| 401 | + * |
---|
| 402 | + * Data is driven on the falling edge of the pixel clock |
---|
| 403 | + */ |
---|
| 404 | + DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE = BIT(3), |
---|
| 405 | + |
---|
| 406 | + /** |
---|
| 407 | + * @DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE: |
---|
| 408 | + * |
---|
| 409 | + * Data is sampled on the rising edge of the pixel clock |
---|
| 410 | + */ |
---|
| 411 | + DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE = DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE, |
---|
| 412 | + |
---|
| 413 | + /** |
---|
| 414 | + * @DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE: |
---|
| 415 | + * |
---|
| 416 | + * Data is sampled on the falling edge of the pixel clock |
---|
| 417 | + */ |
---|
| 418 | + DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, |
---|
| 419 | + |
---|
| 420 | + /** |
---|
| 421 | + * @DRM_BUS_FLAG_DATA_MSB_TO_LSB: |
---|
| 422 | + * |
---|
| 423 | + * Data is transmitted MSB to LSB on the bus |
---|
| 424 | + */ |
---|
| 425 | + DRM_BUS_FLAG_DATA_MSB_TO_LSB = BIT(4), |
---|
| 426 | + |
---|
| 427 | + /** |
---|
| 428 | + * @DRM_BUS_FLAG_DATA_LSB_TO_MSB: |
---|
| 429 | + * |
---|
| 430 | + * Data is transmitted LSB to MSB on the bus |
---|
| 431 | + */ |
---|
| 432 | + DRM_BUS_FLAG_DATA_LSB_TO_MSB = BIT(5), |
---|
| 433 | + |
---|
| 434 | + /** |
---|
| 435 | + * @DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE: |
---|
| 436 | + * |
---|
| 437 | + * Sync signals are driven on the rising edge of the pixel clock |
---|
| 438 | + */ |
---|
| 439 | + DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE = BIT(6), |
---|
| 440 | + |
---|
| 441 | + /** |
---|
| 442 | + * @DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE: |
---|
| 443 | + * |
---|
| 444 | + * Sync signals are driven on the falling edge of the pixel clock |
---|
| 445 | + */ |
---|
| 446 | + DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE = BIT(7), |
---|
| 447 | + |
---|
| 448 | + /** |
---|
| 449 | + * @DRM_BUS_FLAG_SYNC_SAMPLE_POSEDGE: |
---|
| 450 | + * |
---|
| 451 | + * Sync signals are sampled on the rising edge of the pixel clock |
---|
| 452 | + */ |
---|
| 453 | + DRM_BUS_FLAG_SYNC_SAMPLE_POSEDGE = DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE, |
---|
| 454 | + |
---|
| 455 | + /** |
---|
| 456 | + * @DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE: |
---|
| 457 | + * |
---|
| 458 | + * Sync signals are sampled on the falling edge of the pixel clock |
---|
| 459 | + */ |
---|
| 460 | + DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE = DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE, |
---|
| 461 | + |
---|
| 462 | + /** |
---|
| 463 | + * @DRM_BUS_FLAG_SHARP_SIGNALS: |
---|
| 464 | + * |
---|
| 465 | + * Set if the Sharp-specific signals (SPL, CLS, PS, REV) must be used |
---|
| 466 | + */ |
---|
| 467 | + DRM_BUS_FLAG_SHARP_SIGNALS = BIT(8), |
---|
| 468 | +}; |
---|
341 | 469 | |
---|
342 | 470 | /** |
---|
343 | 471 | * struct drm_display_info - runtime data about the connected sink |
---|
.. | .. |
---|
352 | 480 | */ |
---|
353 | 481 | struct drm_display_info { |
---|
354 | 482 | /** |
---|
355 | | - * @name: Name of the display. |
---|
356 | | - */ |
---|
357 | | - char name[DRM_DISPLAY_INFO_LEN]; |
---|
358 | | - |
---|
359 | | - /** |
---|
360 | 483 | * @width_mm: Physical width in mm. |
---|
361 | 484 | */ |
---|
362 | | - unsigned int width_mm; |
---|
| 485 | + unsigned int width_mm; |
---|
| 486 | + |
---|
363 | 487 | /** |
---|
364 | 488 | * @height_mm: Physical height in mm. |
---|
365 | 489 | */ |
---|
366 | 490 | unsigned int height_mm; |
---|
367 | 491 | |
---|
368 | | - /** |
---|
369 | | - * @pixel_clock: Maximum pixel clock supported by the sink, in units of |
---|
370 | | - * 100Hz. This mismatches the clock in &drm_display_mode (which is in |
---|
371 | | - * kHZ), because that's what the EDID uses as base unit. |
---|
372 | | - */ |
---|
373 | | - unsigned int pixel_clock; |
---|
374 | 492 | /** |
---|
375 | 493 | * @bpc: Maximum bits per color channel. Used by HDMI and DP outputs. |
---|
376 | 494 | */ |
---|
.. | .. |
---|
414 | 532 | */ |
---|
415 | 533 | unsigned int num_bus_formats; |
---|
416 | 534 | |
---|
417 | | -#define DRM_BUS_FLAG_DE_LOW (1<<0) |
---|
418 | | -#define DRM_BUS_FLAG_DE_HIGH (1<<1) |
---|
419 | | - |
---|
420 | | -/* |
---|
421 | | - * Don't use those two flags directly, use the DRM_BUS_FLAG_PIXDATA_DRIVE_* |
---|
422 | | - * and DRM_BUS_FLAG_PIXDATA_SAMPLE_* variants to qualify the flags explicitly. |
---|
423 | | - * The DRM_BUS_FLAG_PIXDATA_SAMPLE_* flags are defined as the opposite of the |
---|
424 | | - * DRM_BUS_FLAG_PIXDATA_DRIVE_* flags to make code simpler, as signals are |
---|
425 | | - * usually to be sampled on the opposite edge of the driving edge. |
---|
426 | | - */ |
---|
427 | | -#define DRM_BUS_FLAG_PIXDATA_POSEDGE (1<<2) |
---|
428 | | -#define DRM_BUS_FLAG_PIXDATA_NEGEDGE (1<<3) |
---|
429 | | - |
---|
430 | | -/* Drive data on rising edge */ |
---|
431 | | -#define DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE DRM_BUS_FLAG_PIXDATA_POSEDGE |
---|
432 | | -/* Drive data on falling edge */ |
---|
433 | | -#define DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE DRM_BUS_FLAG_PIXDATA_NEGEDGE |
---|
434 | | -/* Sample data on rising edge */ |
---|
435 | | -#define DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE DRM_BUS_FLAG_PIXDATA_NEGEDGE |
---|
436 | | -/* Sample data on falling edge */ |
---|
437 | | -#define DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE DRM_BUS_FLAG_PIXDATA_POSEDGE |
---|
438 | | - |
---|
439 | | -/* data is transmitted MSB to LSB on the bus */ |
---|
440 | | -#define DRM_BUS_FLAG_DATA_MSB_TO_LSB (1<<4) |
---|
441 | | -/* data is transmitted LSB to MSB on the bus */ |
---|
442 | | -#define DRM_BUS_FLAG_DATA_LSB_TO_MSB (1<<5) |
---|
443 | | - |
---|
444 | | -/* |
---|
445 | | - * Similarly to the DRM_BUS_FLAG_PIXDATA_* flags, don't use these two flags |
---|
446 | | - * directly, use one of the DRM_BUS_FLAG_SYNC_(DRIVE|SAMPLE)_* instead. |
---|
447 | | - */ |
---|
448 | | -#define DRM_BUS_FLAG_SYNC_POSEDGE (1<<6) |
---|
449 | | -#define DRM_BUS_FLAG_SYNC_NEGEDGE (1<<7) |
---|
450 | | - |
---|
451 | | -/* Drive sync on rising edge */ |
---|
452 | | -#define DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE DRM_BUS_FLAG_SYNC_POSEDGE |
---|
453 | | -/* Drive sync on falling edge */ |
---|
454 | | -#define DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE DRM_BUS_FLAG_SYNC_NEGEDGE |
---|
455 | | -/* Sample sync on rising edge */ |
---|
456 | | -#define DRM_BUS_FLAG_SYNC_SAMPLE_POSEDGE DRM_BUS_FLAG_SYNC_NEGEDGE |
---|
457 | | -/* Sample sync on falling edge */ |
---|
458 | | -#define DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE DRM_BUS_FLAG_SYNC_POSEDGE |
---|
459 | | - |
---|
460 | 535 | /** |
---|
461 | 536 | * @bus_flags: Additional information (like pixel signal polarity) for |
---|
462 | | - * the pixel data on the bus, using DRM_BUS_FLAGS\_ defines. |
---|
| 537 | + * the pixel data on the bus, using &enum drm_bus_flags values |
---|
| 538 | + * DRM_BUS_FLAGS\_. |
---|
463 | 539 | */ |
---|
464 | 540 | u32 bus_flags; |
---|
465 | 541 | |
---|
.. | .. |
---|
475 | 551 | bool dvi_dual; |
---|
476 | 552 | |
---|
477 | 553 | /** |
---|
| 554 | + * @is_hdmi: True if the sink is an HDMI device. |
---|
| 555 | + * |
---|
| 556 | + * This field shall be used instead of calling |
---|
| 557 | + * drm_detect_hdmi_monitor() when possible. |
---|
| 558 | + */ |
---|
| 559 | + bool is_hdmi; |
---|
| 560 | + |
---|
| 561 | + /** |
---|
478 | 562 | * @has_hdmi_infoframe: Does the sink support the HDMI infoframe? |
---|
479 | 563 | */ |
---|
480 | 564 | bool has_hdmi_infoframe; |
---|
| 565 | + |
---|
| 566 | + /** |
---|
| 567 | + * @rgb_quant_range_selectable: Does the sink support selecting |
---|
| 568 | + * the RGB quantization range? |
---|
| 569 | + */ |
---|
| 570 | + bool rgb_quant_range_selectable; |
---|
481 | 571 | |
---|
482 | 572 | /** |
---|
483 | 573 | * @edid_hdmi_dc_modes: Mask of supported hdmi deep color modes. Even |
---|
.. | .. |
---|
499 | 589 | * @non_desktop: Non desktop display (HMD). |
---|
500 | 590 | */ |
---|
501 | 591 | bool non_desktop; |
---|
| 592 | + |
---|
| 593 | + /** |
---|
| 594 | + * @monitor_range: Frequency range supported by monitor range descriptor |
---|
| 595 | + */ |
---|
| 596 | + struct drm_monitor_range_info monitor_range; |
---|
502 | 597 | }; |
---|
503 | 598 | |
---|
504 | 599 | int drm_display_info_set_bus_formats(struct drm_display_info *info, |
---|
.. | .. |
---|
506 | 601 | unsigned int num_formats); |
---|
507 | 602 | |
---|
508 | 603 | /** |
---|
| 604 | + * struct drm_connector_tv_margins - TV connector related margins |
---|
| 605 | + * |
---|
| 606 | + * Describes the margins in pixels to put around the image on TV |
---|
| 607 | + * connectors to deal with overscan. |
---|
| 608 | + */ |
---|
| 609 | +struct drm_connector_tv_margins { |
---|
| 610 | + /** |
---|
| 611 | + * @bottom: Bottom margin in pixels. |
---|
| 612 | + */ |
---|
| 613 | + unsigned int bottom; |
---|
| 614 | + |
---|
| 615 | + /** |
---|
| 616 | + * @left: Left margin in pixels. |
---|
| 617 | + */ |
---|
| 618 | + unsigned int left; |
---|
| 619 | + |
---|
| 620 | + /** |
---|
| 621 | + * @right: Right margin in pixels. |
---|
| 622 | + */ |
---|
| 623 | + unsigned int right; |
---|
| 624 | + |
---|
| 625 | + /** |
---|
| 626 | + * @top: Top margin in pixels. |
---|
| 627 | + */ |
---|
| 628 | + unsigned int top; |
---|
| 629 | +}; |
---|
| 630 | + |
---|
| 631 | +/** |
---|
509 | 632 | * struct drm_tv_connector_state - TV connector related states |
---|
510 | 633 | * @subconnector: selected subconnector |
---|
511 | | - * @margins: margins |
---|
512 | | - * @margins.left: left margin |
---|
513 | | - * @margins.right: right margin |
---|
514 | | - * @margins.top: top margin |
---|
515 | | - * @margins.bottom: bottom margin |
---|
| 634 | + * @margins: TV margins |
---|
516 | 635 | * @mode: TV mode |
---|
517 | 636 | * @brightness: brightness in percent |
---|
518 | 637 | * @contrast: contrast in percent |
---|
.. | .. |
---|
523 | 642 | */ |
---|
524 | 643 | struct drm_tv_connector_state { |
---|
525 | 644 | enum drm_mode_subconnector subconnector; |
---|
526 | | - struct { |
---|
527 | | - unsigned int left; |
---|
528 | | - unsigned int right; |
---|
529 | | - unsigned int top; |
---|
530 | | - unsigned int bottom; |
---|
531 | | - } margins; |
---|
| 645 | + struct drm_connector_tv_margins margins; |
---|
532 | 646 | unsigned int mode; |
---|
533 | 647 | unsigned int brightness; |
---|
534 | 648 | unsigned int contrast; |
---|
.. | .. |
---|
559 | 673 | * Used by the atomic helpers to select the encoder, through the |
---|
560 | 674 | * &drm_connector_helper_funcs.atomic_best_encoder or |
---|
561 | 675 | * &drm_connector_helper_funcs.best_encoder callbacks. |
---|
| 676 | + * |
---|
| 677 | + * This is also used in the atomic helpers to map encoders to their |
---|
| 678 | + * current and previous connectors, see |
---|
| 679 | + * drm_atomic_get_old_connector_for_encoder() and |
---|
| 680 | + * drm_atomic_get_new_connector_for_encoder(). |
---|
| 681 | + * |
---|
| 682 | + * NOTE: Atomic drivers must fill this out (either themselves or through |
---|
| 683 | + * helpers), for otherwise the GETCONNECTOR and GETENCODER IOCTLs will |
---|
| 684 | + * not return correct data to userspace. |
---|
562 | 685 | */ |
---|
563 | 686 | struct drm_encoder *best_encoder; |
---|
564 | 687 | |
---|
.. | .. |
---|
582 | 705 | struct drm_tv_connector_state tv; |
---|
583 | 706 | |
---|
584 | 707 | /** |
---|
| 708 | + * @self_refresh_aware: |
---|
| 709 | + * |
---|
| 710 | + * This tracks whether a connector is aware of the self refresh state. |
---|
| 711 | + * It should be set to true for those connector implementations which |
---|
| 712 | + * understand the self refresh state. This is needed since the crtc |
---|
| 713 | + * registers the self refresh helpers and it doesn't know if the |
---|
| 714 | + * connectors downstream have implemented self refresh entry/exit. |
---|
| 715 | + * |
---|
| 716 | + * Drivers should set this to true in atomic_check if they know how to |
---|
| 717 | + * handle self_refresh requests. |
---|
| 718 | + */ |
---|
| 719 | + bool self_refresh_aware; |
---|
| 720 | + |
---|
| 721 | + /** |
---|
585 | 722 | * @picture_aspect_ratio: Connector property to control the |
---|
586 | 723 | * HDMI infoframe aspect ratio setting. |
---|
587 | 724 | * |
---|
.. | .. |
---|
597 | 734 | * match the values. |
---|
598 | 735 | */ |
---|
599 | 736 | unsigned int content_type; |
---|
| 737 | + |
---|
| 738 | + /** |
---|
| 739 | + * @hdcp_content_type: Connector property to pass the type of |
---|
| 740 | + * protected content. This is most commonly used for HDCP. |
---|
| 741 | + */ |
---|
| 742 | + unsigned int hdcp_content_type; |
---|
600 | 743 | |
---|
601 | 744 | /** |
---|
602 | 745 | * @scaling_mode: Connector property to control the |
---|
.. | .. |
---|
631 | 774 | struct drm_writeback_job *writeback_job; |
---|
632 | 775 | |
---|
633 | 776 | /** |
---|
| 777 | + * @max_requested_bpc: Connector property to limit the maximum bit |
---|
| 778 | + * depth of the pixels. |
---|
| 779 | + */ |
---|
| 780 | + u8 max_requested_bpc; |
---|
| 781 | + |
---|
| 782 | + /** |
---|
| 783 | + * @max_bpc: Connector max_bpc based on the requested max_bpc property |
---|
| 784 | + * and the connector bpc limitations obtained from edid. |
---|
| 785 | + */ |
---|
| 786 | + u8 max_bpc; |
---|
| 787 | + |
---|
| 788 | + /** |
---|
634 | 789 | * @hdr_output_metadata: |
---|
635 | 790 | * DRM blob property for HDR output metadata |
---|
636 | 791 | */ |
---|
637 | 792 | struct drm_property_blob *hdr_output_metadata; |
---|
638 | | - |
---|
639 | | - struct drm_property_blob *hdr_panel_blob_ptr; |
---|
640 | 793 | }; |
---|
641 | 794 | |
---|
642 | 795 | /** |
---|
.. | .. |
---|
932 | 1085 | const struct drm_connector_state *state); |
---|
933 | 1086 | }; |
---|
934 | 1087 | |
---|
935 | | -/* mode specified on the command line */ |
---|
| 1088 | +/** |
---|
| 1089 | + * struct drm_cmdline_mode - DRM Mode passed through the kernel command-line |
---|
| 1090 | + * |
---|
| 1091 | + * Each connector can have an initial mode with additional options |
---|
| 1092 | + * passed through the kernel command line. This structure allows to |
---|
| 1093 | + * express those parameters and will be filled by the command-line |
---|
| 1094 | + * parser. |
---|
| 1095 | + */ |
---|
936 | 1096 | struct drm_cmdline_mode { |
---|
| 1097 | + /** |
---|
| 1098 | + * @name: |
---|
| 1099 | + * |
---|
| 1100 | + * Name of the mode. |
---|
| 1101 | + */ |
---|
| 1102 | + char name[DRM_DISPLAY_MODE_LEN]; |
---|
| 1103 | + |
---|
| 1104 | + /** |
---|
| 1105 | + * @specified: |
---|
| 1106 | + * |
---|
| 1107 | + * Has a mode been read from the command-line? |
---|
| 1108 | + */ |
---|
937 | 1109 | bool specified; |
---|
| 1110 | + |
---|
| 1111 | + /** |
---|
| 1112 | + * @refresh_specified: |
---|
| 1113 | + * |
---|
| 1114 | + * Did the mode have a preferred refresh rate? |
---|
| 1115 | + */ |
---|
938 | 1116 | bool refresh_specified; |
---|
| 1117 | + |
---|
| 1118 | + /** |
---|
| 1119 | + * @bpp_specified: |
---|
| 1120 | + * |
---|
| 1121 | + * Did the mode have a preferred BPP? |
---|
| 1122 | + */ |
---|
939 | 1123 | bool bpp_specified; |
---|
940 | | - int xres, yres; |
---|
| 1124 | + |
---|
| 1125 | + /** |
---|
| 1126 | + * @xres: |
---|
| 1127 | + * |
---|
| 1128 | + * Active resolution on the X axis, in pixels. |
---|
| 1129 | + */ |
---|
| 1130 | + int xres; |
---|
| 1131 | + |
---|
| 1132 | + /** |
---|
| 1133 | + * @yres: |
---|
| 1134 | + * |
---|
| 1135 | + * Active resolution on the Y axis, in pixels. |
---|
| 1136 | + */ |
---|
| 1137 | + int yres; |
---|
| 1138 | + |
---|
| 1139 | + /** |
---|
| 1140 | + * @bpp: |
---|
| 1141 | + * |
---|
| 1142 | + * Bits per pixels for the mode. |
---|
| 1143 | + */ |
---|
941 | 1144 | int bpp; |
---|
| 1145 | + |
---|
| 1146 | + /** |
---|
| 1147 | + * @refresh: |
---|
| 1148 | + * |
---|
| 1149 | + * Refresh rate, in Hertz. |
---|
| 1150 | + */ |
---|
942 | 1151 | int refresh; |
---|
| 1152 | + |
---|
| 1153 | + /** |
---|
| 1154 | + * @rb: |
---|
| 1155 | + * |
---|
| 1156 | + * Do we need to use reduced blanking? |
---|
| 1157 | + */ |
---|
943 | 1158 | bool rb; |
---|
| 1159 | + |
---|
| 1160 | + /** |
---|
| 1161 | + * @interlace: |
---|
| 1162 | + * |
---|
| 1163 | + * The mode is interlaced. |
---|
| 1164 | + */ |
---|
944 | 1165 | bool interlace; |
---|
| 1166 | + |
---|
| 1167 | + /** |
---|
| 1168 | + * @cvt: |
---|
| 1169 | + * |
---|
| 1170 | + * The timings will be calculated using the VESA Coordinated |
---|
| 1171 | + * Video Timings instead of looking up the mode from a table. |
---|
| 1172 | + */ |
---|
945 | 1173 | bool cvt; |
---|
| 1174 | + |
---|
| 1175 | + /** |
---|
| 1176 | + * @margins: |
---|
| 1177 | + * |
---|
| 1178 | + * Add margins to the mode calculation (1.8% of xres rounded |
---|
| 1179 | + * down to 8 pixels and 1.8% of yres). |
---|
| 1180 | + */ |
---|
946 | 1181 | bool margins; |
---|
| 1182 | + |
---|
| 1183 | + /** |
---|
| 1184 | + * @force: |
---|
| 1185 | + * |
---|
| 1186 | + * Ignore the hotplug state of the connector, and force its |
---|
| 1187 | + * state to one of the DRM_FORCE_* values. |
---|
| 1188 | + */ |
---|
947 | 1189 | enum drm_connector_force force; |
---|
| 1190 | + |
---|
| 1191 | + /** |
---|
| 1192 | + * @rotation_reflection: |
---|
| 1193 | + * |
---|
| 1194 | + * Initial rotation and reflection of the mode setup from the |
---|
| 1195 | + * command line. See DRM_MODE_ROTATE_* and |
---|
| 1196 | + * DRM_MODE_REFLECT_*. The only rotations supported are |
---|
| 1197 | + * DRM_MODE_ROTATE_0 and DRM_MODE_ROTATE_180. |
---|
| 1198 | + */ |
---|
| 1199 | + unsigned int rotation_reflection; |
---|
| 1200 | + |
---|
| 1201 | + /** |
---|
| 1202 | + * @panel_orientation: |
---|
| 1203 | + * |
---|
| 1204 | + * drm-connector "panel orientation" property override value, |
---|
| 1205 | + * DRM_MODE_PANEL_ORIENTATION_UNKNOWN if not set. |
---|
| 1206 | + */ |
---|
| 1207 | + enum drm_panel_orientation panel_orientation; |
---|
| 1208 | + |
---|
| 1209 | + /** |
---|
| 1210 | + * @tv_margins: TV margins to apply to the mode. |
---|
| 1211 | + */ |
---|
| 1212 | + struct drm_connector_tv_margins tv_margins; |
---|
948 | 1213 | }; |
---|
949 | 1214 | |
---|
950 | 1215 | /** |
---|
.. | .. |
---|
1023 | 1288 | /** |
---|
1024 | 1289 | * @ycbcr_420_allowed : This bool indicates if this connector is |
---|
1025 | 1290 | * capable of handling YCBCR 420 output. While parsing the EDID |
---|
1026 | | - * blocks, its very helpful to know, if the source is capable of |
---|
| 1291 | + * blocks it's very helpful to know if the source is capable of |
---|
1027 | 1292 | * handling YCBCR 420 outputs. |
---|
1028 | 1293 | */ |
---|
1029 | 1294 | bool ycbcr_420_allowed; |
---|
.. | .. |
---|
1089 | 1354 | struct drm_property *scaling_mode_property; |
---|
1090 | 1355 | |
---|
1091 | 1356 | /** |
---|
1092 | | - * @content_protection_property: DRM ENUM property for content |
---|
1093 | | - * protection. See drm_connector_attach_content_protection_property(). |
---|
| 1357 | + * @vrr_capable_property: Optional property to help userspace |
---|
| 1358 | + * query hardware support for variable refresh rate on a connector. |
---|
| 1359 | + * connector. Drivers can add the property to a connector by |
---|
| 1360 | + * calling drm_connector_attach_vrr_capable_property(). |
---|
| 1361 | + * |
---|
| 1362 | + * This should be updated only by calling |
---|
| 1363 | + * drm_connector_set_vrr_capable_property(). |
---|
1094 | 1364 | */ |
---|
1095 | | - struct drm_property *content_protection_property; |
---|
| 1365 | + struct drm_property *vrr_capable_property; |
---|
1096 | 1366 | |
---|
1097 | 1367 | /** |
---|
1098 | 1368 | * @colorspace_property: Connector property to set the suitable |
---|
.. | .. |
---|
1107 | 1377 | * be updated by calling drm_connector_set_path_property(). |
---|
1108 | 1378 | */ |
---|
1109 | 1379 | struct drm_property_blob *path_blob_ptr; |
---|
| 1380 | + |
---|
| 1381 | + /** |
---|
| 1382 | + * @max_bpc_property: Default connector property for the max bpc to be |
---|
| 1383 | + * driven out of the connector. |
---|
| 1384 | + */ |
---|
| 1385 | + struct drm_property *max_bpc_property; |
---|
1110 | 1386 | |
---|
1111 | 1387 | #define DRM_CONNECTOR_POLL_HPD (1 << 0) |
---|
1112 | 1388 | #define DRM_CONNECTOR_POLL_CONNECT (1 << 1) |
---|
.. | .. |
---|
1152 | 1428 | enum drm_connector_force force; |
---|
1153 | 1429 | /** @override_edid: has the EDID been overwritten through debugfs for testing? */ |
---|
1154 | 1430 | bool override_edid; |
---|
| 1431 | + /** @epoch_counter: used to detect any other changes in connector, besides status */ |
---|
| 1432 | + u64 epoch_counter; |
---|
1155 | 1433 | |
---|
1156 | | -#define DRM_CONNECTOR_MAX_ENCODER 3 |
---|
1157 | 1434 | /** |
---|
1158 | | - * @encoder_ids: Valid encoders for this connector. Please only use |
---|
1159 | | - * drm_connector_for_each_possible_encoder() to enumerate these. |
---|
| 1435 | + * @possible_encoders: Bit mask of encoders that can drive this |
---|
| 1436 | + * connector, drm_encoder_index() determines the index into the bitfield |
---|
| 1437 | + * and the bits are set with drm_connector_attach_encoder(). |
---|
1160 | 1438 | */ |
---|
1161 | | - uint32_t encoder_ids[DRM_CONNECTOR_MAX_ENCODER]; |
---|
| 1439 | + u32 possible_encoders; |
---|
1162 | 1440 | |
---|
1163 | 1441 | /** |
---|
1164 | 1442 | * @encoder: Currently bound encoder driving this connector, if any. |
---|
.. | .. |
---|
1167 | 1445 | * need the CRTC driving this output, &drm_connector_state.crtc. |
---|
1168 | 1446 | */ |
---|
1169 | 1447 | struct drm_encoder *encoder; |
---|
1170 | | - /** |
---|
1171 | | - * @loader_protect: |
---|
1172 | | - * connector loader logo protect state. |
---|
1173 | | - */ |
---|
1174 | | - bool loader_protect; |
---|
1175 | 1448 | |
---|
1176 | 1449 | #define MAX_ELD_BYTES 128 |
---|
1177 | 1450 | /** @eld: EDID-like data, if present */ |
---|
.. | .. |
---|
1188 | 1461 | * [0]: progressive, [1]: interlaced |
---|
1189 | 1462 | */ |
---|
1190 | 1463 | int audio_latency[2]; |
---|
| 1464 | + |
---|
| 1465 | + /** |
---|
| 1466 | + * @ddc: associated ddc adapter. |
---|
| 1467 | + * A connector usually has its associated ddc adapter. If a driver uses |
---|
| 1468 | + * this field, then an appropriate symbolic link is created in connector |
---|
| 1469 | + * sysfs directory to make it easy for the user to tell which i2c |
---|
| 1470 | + * adapter is for a particular display. |
---|
| 1471 | + * |
---|
| 1472 | + * The field should be set by calling drm_connector_init_with_ddc(). |
---|
| 1473 | + */ |
---|
| 1474 | + struct i2c_adapter *ddc; |
---|
| 1475 | + |
---|
1191 | 1476 | /** |
---|
1192 | 1477 | * @null_edid_counter: track sinks that give us all zeros for the EDID. |
---|
1193 | 1478 | * Needed to workaround some HW bugs where we get all 0s |
---|
.. | .. |
---|
1197 | 1482 | /** @bad_edid_counter: track sinks that give us an EDID with invalid checksum */ |
---|
1198 | 1483 | unsigned bad_edid_counter; |
---|
1199 | 1484 | |
---|
1200 | | - /* |
---|
1201 | | - * @pt_scan_info: PT scan info obtained from the VCDB of EDID |
---|
1202 | | - * @it_scan_info: IT scan info obtained from the VCDB of EDID |
---|
1203 | | - * @ce_scan_info: CE scan info obtained from the VCDB of EDID |
---|
1204 | | - * @color_enc_fmt: Colorimetry encoding formats of sink |
---|
1205 | | - * @hdr_eotf: Electro optical transfer function obtained from HDR block |
---|
1206 | | - * @hdr_metadata_type_one: Metadata type one obtained from HDR block |
---|
1207 | | - * @hdr_max_luminance: desired max luminance obtained from HDR block |
---|
1208 | | - * @hdr_avg_luminance: desired avg luminance obtained from HDR block |
---|
1209 | | - * @hdr_min_luminance: desired min luminance obtained from HDR block |
---|
1210 | | - * @hdr_supported: does the sink support HDR content |
---|
1211 | | - * @max_tmds_char: indicates the maximum TMDS Character Rate supported |
---|
1212 | | - * @scdc_present: when set the sink supports SCDC functionality |
---|
1213 | | - * @rr_capable: when set the sink is capable of initiating an |
---|
1214 | | - * SCDC read request |
---|
1215 | | - * @supports_scramble: when set the sink supports less than |
---|
1216 | | - * 340Mcsc scrambling |
---|
1217 | | - * @flags_3d: 3D view(s) supported by the sink, see drm_edid.h |
---|
1218 | | - * DRM_EDID_3D_*) |
---|
1219 | | - */ |
---|
1220 | | - u8 pt_scan_info; |
---|
1221 | | - u8 it_scan_info; |
---|
1222 | | - u8 ce_scan_info; |
---|
1223 | | - u32 color_enc_fmt; |
---|
1224 | | - u32 hdr_eotf; |
---|
1225 | | - bool hdr_metadata_type_one; |
---|
1226 | | - u32 hdr_max_luminance; |
---|
1227 | | - u32 hdr_avg_luminance; |
---|
1228 | | - u32 hdr_min_luminance; |
---|
1229 | | - bool hdr_supported; |
---|
1230 | | - u8 hdr_plus_app_ver; |
---|
1231 | | - |
---|
1232 | | - /* EDID bits HDMI 2.0 |
---|
1233 | | - * @max_tmds_char: indicates the maximum TMDS Character Rate supported |
---|
1234 | | - * @scdc_present: when set the sink supports SCDC functionality |
---|
1235 | | - * @rr_capable: when set the sink is capable of initiating an |
---|
1236 | | - * SCDC read request |
---|
1237 | | - * @supports_scramble: when set the sink supports less than |
---|
1238 | | - * 340Mcsc scrambling |
---|
1239 | | - * @flags_3d: 3D view(s) supported by the sink, see drm_edid.h |
---|
1240 | | - * (DRM_EDID_3D_*) |
---|
1241 | | - */ |
---|
1242 | | - int max_tmds_char; /* in Mcsc */ |
---|
1243 | | - bool scdc_present; |
---|
1244 | | - bool rr_capable; |
---|
1245 | | - bool supports_scramble; |
---|
1246 | | - int flags_3d; |
---|
1247 | | - |
---|
1248 | 1485 | /** |
---|
1249 | 1486 | * @edid_corrupt: Indicates whether the last read EDID was corrupt. Used |
---|
1250 | 1487 | * in Displayport compliance testing - Displayport Link CTS Core 1.2 |
---|
1251 | 1488 | * rev1.1 4.2.2.6 |
---|
1252 | 1489 | */ |
---|
1253 | 1490 | bool edid_corrupt; |
---|
| 1491 | + /** |
---|
| 1492 | + * @real_edid_checksum: real edid checksum for corrupted edid block. |
---|
| 1493 | + * Required in Displayport 1.4 compliance testing |
---|
| 1494 | + * rev1.1 4.2.2.6 |
---|
| 1495 | + */ |
---|
| 1496 | + u8 real_edid_checksum; |
---|
1254 | 1497 | |
---|
1255 | 1498 | /** @debugfs_entry: debugfs directory for this connector */ |
---|
1256 | 1499 | struct dentry *debugfs_entry; |
---|
.. | .. |
---|
1314 | 1557 | */ |
---|
1315 | 1558 | struct llist_node free_node; |
---|
1316 | 1559 | |
---|
| 1560 | + /** @hdr_sink_metadata: HDR Metadata Information read from sink */ |
---|
1317 | 1561 | struct hdr_sink_metadata hdr_sink_metadata; |
---|
1318 | | - |
---|
1319 | | - /** |
---|
1320 | | - * @panel: |
---|
1321 | | - * |
---|
1322 | | - * Can find the panel which connected to drm_connector. |
---|
1323 | | - */ |
---|
1324 | | - struct drm_panel *panel; |
---|
1325 | | - |
---|
1326 | | - /** |
---|
1327 | | - * @checksum: |
---|
1328 | | - * |
---|
1329 | | - * The calculated checksum value of first 127 bytes of associated EDID. |
---|
1330 | | - */ |
---|
1331 | | - u8 checksum; |
---|
1332 | 1562 | }; |
---|
1333 | 1563 | |
---|
1334 | 1564 | #define obj_to_connector(x) container_of(x, struct drm_connector, base) |
---|
.. | .. |
---|
1337 | 1567 | struct drm_connector *connector, |
---|
1338 | 1568 | const struct drm_connector_funcs *funcs, |
---|
1339 | 1569 | int connector_type); |
---|
| 1570 | +int drm_connector_init_with_ddc(struct drm_device *dev, |
---|
| 1571 | + struct drm_connector *connector, |
---|
| 1572 | + const struct drm_connector_funcs *funcs, |
---|
| 1573 | + int connector_type, |
---|
| 1574 | + struct i2c_adapter *ddc); |
---|
1340 | 1575 | void drm_connector_attach_edid_property(struct drm_connector *connector); |
---|
1341 | 1576 | int drm_connector_register(struct drm_connector *connector); |
---|
1342 | 1577 | void drm_connector_unregister(struct drm_connector *connector); |
---|
.. | .. |
---|
1397 | 1632 | } |
---|
1398 | 1633 | |
---|
1399 | 1634 | /** |
---|
1400 | | - * drm_connector_reference - acquire a connector reference |
---|
1401 | | - * @connector: DRM connector |
---|
1402 | | - * |
---|
1403 | | - * This is a compatibility alias for drm_connector_get() and should not be |
---|
1404 | | - * used by new code. |
---|
1405 | | - */ |
---|
1406 | | -static inline void drm_connector_reference(struct drm_connector *connector) |
---|
1407 | | -{ |
---|
1408 | | - drm_connector_get(connector); |
---|
1409 | | -} |
---|
1410 | | - |
---|
1411 | | -/** |
---|
1412 | | - * drm_connector_unreference - release a connector reference |
---|
1413 | | - * @connector: DRM connector |
---|
1414 | | - * |
---|
1415 | | - * This is a compatibility alias for drm_connector_put() and should not be |
---|
1416 | | - * used by new code. |
---|
1417 | | - */ |
---|
1418 | | -static inline void drm_connector_unreference(struct drm_connector *connector) |
---|
1419 | | -{ |
---|
1420 | | - drm_connector_put(connector); |
---|
1421 | | -} |
---|
1422 | | - |
---|
1423 | | -/** |
---|
1424 | 1635 | * drm_connector_is_unregistered - has the connector been unregistered from |
---|
1425 | 1636 | * userspace? |
---|
1426 | 1637 | * @connector: DRM connector |
---|
.. | .. |
---|
1438 | 1649 | DRM_CONNECTOR_UNREGISTERED; |
---|
1439 | 1650 | } |
---|
1440 | 1651 | |
---|
| 1652 | +void drm_connector_oob_hotplug_event(struct fwnode_handle *connector_fwnode); |
---|
| 1653 | +const char *drm_get_connector_type_name(unsigned int connector_type); |
---|
1441 | 1654 | const char *drm_get_connector_status_name(enum drm_connector_status status); |
---|
1442 | 1655 | const char *drm_get_subpixel_order_name(enum subpixel_order order); |
---|
1443 | 1656 | const char *drm_get_dpms_name(int val); |
---|
.. | .. |
---|
1445 | 1658 | const char *drm_get_dvi_i_select_name(int val); |
---|
1446 | 1659 | const char *drm_get_tv_subconnector_name(int val); |
---|
1447 | 1660 | const char *drm_get_tv_select_name(int val); |
---|
| 1661 | +const char *drm_get_dp_subconnector_name(int val); |
---|
1448 | 1662 | const char *drm_get_content_protection_name(int val); |
---|
1449 | | -const char *drm_get_connector_name(int val); |
---|
| 1663 | +const char *drm_get_hdcp_content_type_name(int val); |
---|
1450 | 1664 | |
---|
1451 | 1665 | int drm_mode_create_dvi_i_properties(struct drm_device *dev); |
---|
| 1666 | +void drm_connector_attach_dp_subconnector_property(struct drm_connector *connector); |
---|
| 1667 | + |
---|
| 1668 | +int drm_mode_create_tv_margin_properties(struct drm_device *dev); |
---|
1452 | 1669 | int drm_mode_create_tv_properties(struct drm_device *dev, |
---|
1453 | 1670 | unsigned int num_modes, |
---|
1454 | 1671 | const char * const modes[]); |
---|
| 1672 | +void drm_connector_attach_tv_margin_properties(struct drm_connector *conn); |
---|
1455 | 1673 | int drm_mode_create_scaling_mode_property(struct drm_device *dev); |
---|
1456 | 1674 | int drm_connector_attach_content_type_property(struct drm_connector *dev); |
---|
1457 | 1675 | int drm_connector_attach_scaling_mode_property(struct drm_connector *connector, |
---|
1458 | 1676 | u32 scaling_mode_mask); |
---|
1459 | | -int drm_connector_attach_content_protection_property( |
---|
| 1677 | +int drm_connector_attach_vrr_capable_property( |
---|
1460 | 1678 | struct drm_connector *connector); |
---|
1461 | 1679 | int drm_mode_create_aspect_ratio_property(struct drm_device *dev); |
---|
1462 | | -int drm_mode_create_colorspace_property(struct drm_connector *connector); |
---|
| 1680 | +int drm_mode_create_hdmi_colorspace_property(struct drm_connector *connector); |
---|
| 1681 | +int drm_mode_create_dp_colorspace_property(struct drm_connector *connector); |
---|
1463 | 1682 | int drm_mode_create_content_type_property(struct drm_device *dev); |
---|
1464 | 1683 | void drm_hdmi_avi_infoframe_content_type(struct hdmi_avi_infoframe *frame, |
---|
1465 | 1684 | const struct drm_connector_state *conn_state); |
---|
.. | .. |
---|
1473 | 1692 | const struct edid *edid); |
---|
1474 | 1693 | void drm_connector_set_link_status_property(struct drm_connector *connector, |
---|
1475 | 1694 | uint64_t link_status); |
---|
1476 | | -int drm_connector_init_panel_orientation_property( |
---|
1477 | | - struct drm_connector *connector, int width, int height); |
---|
| 1695 | +void drm_connector_set_vrr_capable_property( |
---|
| 1696 | + struct drm_connector *connector, bool capable); |
---|
| 1697 | +int drm_connector_set_panel_orientation( |
---|
| 1698 | + struct drm_connector *connector, |
---|
| 1699 | + enum drm_panel_orientation panel_orientation); |
---|
| 1700 | +int drm_connector_set_panel_orientation_with_quirk( |
---|
| 1701 | + struct drm_connector *connector, |
---|
| 1702 | + enum drm_panel_orientation panel_orientation, |
---|
| 1703 | + int width, int height); |
---|
| 1704 | +int drm_connector_attach_max_bpc_property(struct drm_connector *connector, |
---|
| 1705 | + int min, int max); |
---|
1478 | 1706 | |
---|
1479 | 1707 | /** |
---|
1480 | 1708 | * struct drm_tile_group - Tile group metadata |
---|
.. | .. |
---|
1494 | 1722 | }; |
---|
1495 | 1723 | |
---|
1496 | 1724 | struct drm_tile_group *drm_mode_create_tile_group(struct drm_device *dev, |
---|
1497 | | - char topology[8]); |
---|
| 1725 | + const char topology[8]); |
---|
1498 | 1726 | struct drm_tile_group *drm_mode_get_tile_group(struct drm_device *dev, |
---|
1499 | | - char topology[8]); |
---|
| 1727 | + const char topology[8]); |
---|
1500 | 1728 | void drm_mode_put_tile_group(struct drm_device *dev, |
---|
1501 | 1729 | struct drm_tile_group *tg); |
---|
1502 | 1730 | |
---|
.. | .. |
---|
1540 | 1768 | * drm_connector_for_each_possible_encoder - iterate connector's possible encoders |
---|
1541 | 1769 | * @connector: &struct drm_connector pointer |
---|
1542 | 1770 | * @encoder: &struct drm_encoder pointer used as cursor |
---|
1543 | | - * @__i: int iteration cursor, for macro-internal use |
---|
1544 | 1771 | */ |
---|
1545 | | -#define drm_connector_for_each_possible_encoder(connector, encoder, __i) \ |
---|
1546 | | - for ((__i) = 0; (__i) < ARRAY_SIZE((connector)->encoder_ids) && \ |
---|
1547 | | - (connector)->encoder_ids[(__i)] != 0; (__i)++) \ |
---|
1548 | | - for_each_if((encoder) = \ |
---|
1549 | | - drm_encoder_find((connector)->dev, NULL, \ |
---|
1550 | | - (connector)->encoder_ids[(__i)])) \ |
---|
| 1772 | +#define drm_connector_for_each_possible_encoder(connector, encoder) \ |
---|
| 1773 | + drm_for_each_encoder_mask(encoder, (connector)->dev, \ |
---|
| 1774 | + (connector)->possible_encoders) |
---|
1551 | 1775 | |
---|
1552 | 1776 | #endif |
---|