linux/include/drm
Ankit Nautiyal c3ff0cdb35 drm: Expose modes with aspect ratio, only if requested
We parse the EDID and add all the modes in the connector's modelist.
This adds CEA modes with aspect ratio information too, regardless of
whether user space requested this information or not.

This patch:
-prunes the modes with aspect-ratio information, from the
 drm_mode_get_connector modelist supplied to the user, if the
 user-space has not set the aspect ratio DRM client cap. However if
 such a mode is unique in the list, it is kept in the list, with
 aspect-ratio flags reset.
-prepares a list of exposed modes, which is used to find unique modes
 if aspect-ratio is not allowed.
-adds a new list_head 'exposed_head' in drm_mode_display, to traverse
 the list of exposed modes.

Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Shashank Sharma <shashank.sharma@intel.com>
Cc: Jose Abreu <jose.abreu@synopsys.com>

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>

V3: As suggested by Ville, modified the mechanism of pruning of modes
    with aspect-ratio, if the aspect-ratio is not supported. Instead
    of straight away pruning such a mode, the mode is retained with
    aspect ratio bits set to zero, provided it is unique.
V4: rebase
V5: Addressed review comments from Ville:
    -used a pointer to store last valid mode.
    -avoided, modifying of picture_aspect_ratio in kernel mode,
     instead only flags bits of user mode are reset (if aspect-ratio
     is not supported).
V6: As suggested by Ville, corrected the mode pruning logic and
    elaborated the mode pruning logic and the assumptions taken.
V7: rebase
V8: rebase
V9: rebase
V10: rebase
V11: Fixed the issue caused in kms_3d test, and enhanced the pruning
     logic to correctly identify and prune modes with aspect-ratio,
     if aspect-ratio cap is not set.
V12: As suggested by Ville, added another list_head in
     drm_mode_display to traverse the list of exposed modes and
     avoided duplication of modes.
V13: Minor modifications, as suggested by Ville.
v14: As suggested by Daniel Vetter and Ville Syrjala, corrected the
     pruning logic to avoid any dependency in the order of mode with
     aspect-ratio.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1525777785-9740-9-git-send-email-ankit.k.nautiyal@intel.com
2018-05-11 09:06:39 +02:00
..
bridge drm/bridge: analogix_dp: Split the platform-specific poweron in two parts 2018-04-24 08:34:49 +02:00
i2c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tinydrm drm: Move simple_display_pipe prepare_fb helper into gem fb helpers 2018-04-24 13:57:22 +02:00
ttm drm/ttm: Export the ttm_k[un]map_atomic_prot API. 2018-03-22 11:10:06 +01:00
amd_asic_type.h drm/amdgpu: add vega12 to asic_type enum 2018-03-21 14:23:39 -05:00
ati_pcigart.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drm_agpsupport.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drm_atomic_helper.h drm: Don't pass clip to drm_atomic_helper_check_plane_state() 2018-03-05 20:48:25 +02:00
drm_atomic.h drm-misc-next for 4.17: 2018-03-14 10:59:16 +10:00
drm_auth.h drm: Add drm_object lease infrastructure [v5] 2017-10-25 16:31:29 +10:00
drm_blend.h drm/blend: Add a generic alpha property 2018-04-16 21:17:29 +02:00
drm_bridge.h drm/bridge: Rename argument from crtc to bridge 2018-02-07 09:06:37 +01:00
drm_cache.h drm: add func to get max iomem address v2 2018-02-13 11:57:59 -05:00
drm_color_mgmt.h drm: Introduce drm_color_lut_size() 2018-03-16 15:44:01 +02:00
drm_connector.h drm: add documentation for tv connector state margins 2018-02-20 16:04:43 +02:00
drm_crtc_helper.h drm: Allow determining if current task is output poll worker 2018-02-16 22:30:06 +01:00
drm_crtc.h drm/mode_object: fix documentation for object lookups. 2017-11-10 13:50:47 +10:00
drm_debugfs_crc.h
drm_debugfs.h drm/debugfs: Add kerneldoc 2017-03-24 09:36:06 +01:00
drm_device.h drm: remove all control node code 2018-05-03 21:26:32 +02:00
drm_displayid.h
drm_dp_dual_mode_helper.h
drm_dp_helper.h drm/dp: Correctly mask DP_TRAINING_AUX_RD_INTERVAL values for DP 1.4 2018-05-08 12:18:43 -07:00
drm_dp_mst_helper.h drm/dp/mst: Sideband message transaction to power up/down nodes 2017-09-11 16:03:57 +03:00
drm_drv.h Merge airlied/drm-next into drm-misc-next 2018-03-30 12:35:45 -04:00
drm_edid.h drm: Don't EXPORT drm_add/reset_display_info 2018-04-24 21:34:53 +02:00
drm_encoder_slave.h drm: Don't include <drm/drm_encoder.h> in <drm/drm_crtc.h> 2016-12-18 16:29:29 +05:30
drm_encoder.h Merge airlied/drm-next into drm-misc-next 2017-11-21 14:17:56 +01:00
drm_fb_cma_helper.h drm/cma-helper: Add drm_fb_cma_fbdev_init/fini() 2017-12-08 14:27:47 +01:00
drm_fb_helper.h drm/fb-helper: Add drm_fb_helper_defio_init() 2017-12-20 14:52:22 +01:00
drm_file.h drm: Add DRM client cap for aspect-ratio 2018-05-11 09:05:03 +02:00
drm_fixed.h
drm_flip_work.h drm/kms-helpers: Use recommened kerneldoc for struct member refs 2017-01-25 16:18:57 +01:00
drm_fourcc.h drm/fourcc: Add a alpha field to drm_format_info 2018-01-29 12:07:47 +01:00
drm_framebuffer.h drm/framebuffer: Print task that allocated the fb in debug info. 2017-12-20 15:30:17 +01:00
drm_gem_cma_helper.h Merge tag 'drm-misc-next-2017-11-30' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2017-12-04 05:42:49 +10:00
drm_gem_framebuffer_helper.h drm: Move simple_display_pipe prepare_fb helper into gem fb helpers 2018-04-24 13:57:22 +02:00
drm_gem.h drm: move read_domains and write_domain into i915 2018-02-16 14:12:48 +00:00
drm_global.h drm: drop extern from function decls 2017-03-24 09:36:06 +01:00
drm_hashtab.h drm: drop extern from function decls 2017-03-24 09:36:06 +01:00
drm_hdcp.h drm/i915: Check for downstream topology errors 2018-01-18 17:56:02 -05:00
drm_ioctl.h drm: remove all control node code 2018-05-03 21:26:32 +02:00
drm_irq.h drm: Extract drm_vblank.[hc] 2017-06-01 08:02:14 +02:00
drm_lease.h drm: Add four ioctls for managing drm mode object leases [v7] 2017-10-25 16:31:30 +10:00
drm_legacy.h drm: prefer inline over __inline__ 2018-03-28 09:34:12 +03:00
drm_mipi_dsi.h
drm_mm.h drm/drm_mm.h: Fix the name of the referenced function in comment 2017-11-02 11:10:47 -02:00
drm_mode_config.h drm: Add drm_mode_config->normalize_zpos boolean 2018-03-28 09:45:43 +03:00
drm_mode_object.h drm: remove drm_mode_object_{un/reference} aliases 2018-03-19 09:09:46 -04:00
drm_modes.h drm: Expose modes with aspect ratio, only if requested 2018-05-11 09:06:39 +02:00
drm_modeset_helper_vtables.h drm/atomic: better doc for implicit vs explicit fencing 2018-04-24 14:01:15 +02:00
drm_modeset_helper.h drm/modeset-helper: Add simple modeset suspend/resume helpers 2017-11-30 18:18:08 +01:00
drm_modeset_lock.h drm/atomic: Prepare drm_modeset_lock infrastructure for interruptible waiting, v2. 2017-09-13 09:50:52 +02:00
drm_of.h main drm pull request for v4.15 2017-11-15 20:42:10 -08:00
drm_os_linux.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drm_panel.h drm: make drm_panel.h self-contained 2017-05-16 17:17:02 +02:00
drm_pci.h drm/pci: Deprecate drm_pci_init/exit completely 2017-06-20 10:41:03 +02:00
drm_pciids.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drm_plane_helper.h drm: Don't pass clip to drm_atomic_helper_check_plane_state() 2018-03-05 20:48:25 +02:00
drm_plane.h drm/atomic: better doc for implicit vs explicit fencing 2018-04-24 14:01:15 +02:00
drm_prime.h drm: export gem dmabuf_ops for drivers to reuse 2018-01-09 12:07:07 -05:00
drm_print.h drm: Reduce object size of DRM_DEV_<LEVEL> uses 2018-03-19 15:15:42 +01:00
drm_property.h drm: Don't pass the index to drm_property_add_enum() 2018-04-27 16:46:50 +03:00
drm_rect.h drm/rect: Handle rounding errors in drm_rect_clip_scaled, v3. 2018-05-04 11:09:54 +02:00
drm_scdc_helper.h drm: Fix warning when building docs for scdc_helper 2017-07-31 14:24:14 +02:00
drm_simple_kms_helper.h drm: Move simple_display_pipe prepare_fb helper into gem fb helpers 2018-04-24 13:57:22 +02:00
drm_syncobj.h drm/syncobj: some kerneldoc polish 2017-12-15 11:26:52 +01:00
drm_sysfs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drm_utils.h drm: Add panel orientation quirks, v6. 2017-12-04 23:03:21 +01:00
drm_vblank.h Merge tag 'drm-intel-next-2018-02-21' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2018-03-01 14:07:22 +10:00
drm_vma_manager.h drm/vma-manager: drm_vma_node_start() constify argument 2017-11-11 11:19:37 +01:00
drmP.h drm: make drm_core_check_feature() bool that it is 2018-03-28 09:35:20 +03:00
gma_drm.h
gpu_scheduler_trace.h drm: move amd_gpu_scheduler into common location 2017-12-07 11:51:56 -05:00
gpu_scheduler.h drm/sched: move fence slab handling to module init/exit 2017-12-07 11:52:14 -05:00
i915_component.h drm/i915/cnl: Add Port F definition. 2018-01-19 17:51:35 -02:00
i915_drm.h x86/early-quirks: export the stolen region as a resource 2017-12-12 12:30:18 +02:00
i915_pciids.h drm/i915/icl: Add the ICL PCI IDs 2018-02-22 11:33:20 +02:00
intel_lpe_audio.h ALSA: x86: Register multiple PCM devices for the LPE audio card 2017-05-03 16:24:00 +03:00
intel-gtt.h drm/i915: prefer resource_size_t for everything stolen 2017-12-12 12:30:22 +02:00
spsc_queue.h drm: move amd_gpu_scheduler into common location 2017-12-07 11:51:56 -05:00