aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/msm/dp/dp_parser.h
AgeCommit message (Collapse)AuthorFilesLines
2024-02-11drm/msm/dp: drop dp_parserDmitry Baryshkov1-39/+0
Finally drop separate "parsing" submodule. There is no need in it anymore. All submodules handle DT properties directly rather than passing them via the separate structure pointer. Signed-off-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Konrad Dybcio <[email protected]> Tested-by: Kuogee Hsieh <[email protected]> Reviewed-by: Kuogee Hsieh <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/576116/ Link: https://lore.kernel.org/r/[email protected]
2024-02-11drm/msm/dp: move next_bridge handling to dp_displayDmitry Baryshkov1-14/+0
Remove two levels of indirection and fetch next bridge directly in dp_display_probe_tail(). Signed-off-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Konrad Dybcio <[email protected]> Tested-by: Kuogee Hsieh <[email protected]> Reviewed-by: Kuogee Hsieh <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/576126/ Link: https://lore.kernel.org/r/[email protected]
2024-02-11drm/msm/dp: move link property handling to dp_panelDmitry Baryshkov1-4/+0
Instead of passing link properties through the separate struct, parse them directly in the dp_panel. Signed-off-by: Dmitry Baryshkov <[email protected]> Tested-by: Kuogee Hsieh <[email protected]> Reviewed-by: Kuogee Hsieh <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/576117/ Link: https://lore.kernel.org/r/[email protected]
2024-02-11drm/msm/dp: move all IO handling to dp_catalogDmitry Baryshkov1-24/+2
Rather than parsing the I/O addresses from dp_parser and then passing them via a struct pointer to dp_catalog, handle I/O region parsing in dp_catalog and drop it from dp_parser. Signed-off-by: Dmitry Baryshkov <[email protected]> Tested-by: Kuogee Hsieh <[email protected]> Reviewed-by: Kuogee Hsieh <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/576108/ Link: https://lore.kernel.org/r/[email protected]
2024-02-11drm/msm/dp: move phy_configure_opts to dp_ctrlDmitry Baryshkov1-3/+0
There is little point in sharing phy configuration structure between several modules. Move it to dp_ctrl, which becomes the only submodule re-configuring the PHY. Signed-off-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Konrad Dybcio <[email protected]> Tested-by: Kuogee Hsieh <[email protected]> Reviewed-by: Kuogee Hsieh <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/576124/ Link: https://lore.kernel.org/r/[email protected]
2024-02-11drm/msm/dp: stop parsing clock names from DTDmitry Baryshkov1-22/+0
All supported platforms use the same clocks configuration. Instead of parsing names from DT in a pretty complex manner, use the static configuration. If at some point newer (or older) platforms have different clock configuration, this clock config can be moved to the device data. Signed-off-by: Dmitry Baryshkov <[email protected]> Tested-by: Kuogee Hsieh <[email protected]> Reviewed-by: Kuogee Hsieh <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/576115/ Link: https://lore.kernel.org/r/[email protected]
2024-02-11drm/msm/dp: simplify stream clocks handlingDmitry Baryshkov1-2/+0
There is only a single DP_STREAM_PM clock, stream_pixel. Instead of using a separate dss_module_power instance for this single clock, handle this clock directly. This allows us to drop several wrapping functions. Signed-off-by: Dmitry Baryshkov <[email protected]> Tested-by: Kuogee Hsieh <[email protected]> Reviewed-by: Kuogee Hsieh <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/576102/ Link: https://lore.kernel.org/r/[email protected]
2024-02-11drm/msm/dp: parse DT from dp_parser_getDmitry Baryshkov1-3/+0
It makes little sense to split the submodule get and actual DT parsing. Call dp_parser_parse() directly from dp_parser_get(), so that the parser data is fully initialised once it is returned to the caller. Reviewed-by: Konrad Dybcio <[email protected]> Signed-off-by: Dmitry Baryshkov <[email protected]> Tested-by: Kuogee Hsieh <[email protected]> Reviewed-by: Kuogee Hsieh <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/576101/ Link: https://lore.kernel.org/r/[email protected]
2024-02-11drm/msm/dp: drop unused parser definitionsDmitry Baryshkov1-46/+0
Drop several unused and obsolete definitions from the dp_parser module. Signed-off-by: Dmitry Baryshkov <[email protected]> Tested-by: Kuogee Hsieh <[email protected]> Reviewed-by: Kuogee Hsieh <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/576110/ Link: https://lore.kernel.org/r/[email protected]
2023-01-09drm/msm/dp: Add capability to parser and retrieve max DP link supported rate ↵Kuogee Hsieh1-0/+2
from link-frequencies property of dp_out endpoint Changes in v6: -- second patch after split parser patch into two patches Changes in v7: -- without checking cnt against DP_MAX_NUM_DP_LANES to retrieve link rate Changes in v9: -- separate parser link-frequencies out of data-lanes Changes in v10: -- add dp_parser_link_frequencies() Changes in v11: -- return 0 if(!endpoint) Changes in v12: -- replace khz with kbytes at dp_parser.h Changes in v14: -- replace "parser" with "parse" at commit subject -- use do_div() for 64 bits division Signed-off-by: Kuogee Hsieh <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/516100/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
2022-09-30drm/msm/dp: fix bridge lifetimeJohan Hovold1-2/+3
Device-managed resources allocated post component bind must be tied to the lifetime of the aggregate DRM device or they will not necessarily be released when binding of the aggregate device is deferred. This can lead resource leaks or failure to bind the aggregate device when binding is later retried and a second attempt to allocate the resources is made. For the DP bridges, previously allocated bridges will leak on probe deferral. Fix this by amending the DP parser interface and tying the lifetime of the bridge device to the DRM device rather than DP platform device. Fixes: c3bf8e21b38a ("drm/msm/dp: Add eDP support via aux_bus") Cc: [email protected] # 5.19 Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Tested-by: Kuogee Hsieh <[email protected]> Reviewed-by: Kuogee Hsieh <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/502667/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Abhinav Kumar <[email protected]>
2022-08-04Merge tag 'char-misc-6.0-rc1' of ↵Linus Torvalds1-8/+0
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char / misc driver updates from Greg KH: "Here is the large set of char and misc and other driver subsystem changes for 6.0-rc1. Highlights include: - large set of IIO driver updates, additions, and cleanups - new habanalabs device support added (loads of register maps much like GPUs have) - soundwire driver updates - phy driver updates - slimbus driver updates - tiny virt driver fixes and updates - misc driver fixes and updates - interconnect driver updates - hwtracing driver updates - fpga driver updates - extcon driver updates - firmware driver updates - counter driver update - mhi driver fixes and updates - binder driver fixes and updates - speakup driver fixes All of these have been in linux-next for a while without any reported problems" * tag 'char-misc-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (634 commits) drivers: lkdtm: fix clang -Wformat warning char: remove VR41XX related char driver misc: Mark MICROCODE_MINOR unused spmi: trace: fix stack-out-of-bound access in SPMI tracing functions dt-bindings: iio: adc: Add compatible for MT8188 iio: light: isl29028: Fix the warning in isl29028_remove() iio: accel: sca3300: Extend the trigger buffer from 16 to 32 bytes iio: fix iio_format_avail_range() printing for none IIO_VAL_INT iio: adc: max1027: unlock on error path in max1027_read_single_value() iio: proximity: sx9324: add empty line in front of bullet list iio: magnetometer: hmc5843: Remove duplicate 'the' iio: magn: yas530: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros iio: magnetometer: ak8974: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros iio: light: veml6030: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros iio: light: vcnl4035: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros iio: light: vcnl4000: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros iio: light: tsl2591: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() iio: light: tsl2583: Use DEFINE_RUNTIME_DEV_PM_OPS and pm_ptr() iio: light: isl29028: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() iio: light: gp2ap002: Switch to DEFINE_RUNTIME_DEV_PM_OPS and pm_ptr() ...
2022-07-07drm/msm/dp: delete vdda regulator related functions from eDP/DP controllerKuogee Hsieh1-8/+0
Vdda regulators are related to both eDP and DP phy so that it should be managed at eDP and DP phy driver instead of controller. This patch removes vdda regulators related functions out of eDP/DP controller. Signed-off-by: Kuogee Hsieh <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-07-04drm/msm/dp: rewrite dss_module_power to use bulk clock functionsDmitry Baryshkov1-1/+5
In order to simplify DP code, drop hand-coded loops over clock arrays, replacing them with clk_bulk_* functions. Signed-off-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/474717/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
2022-05-02drm/msm/dp: Add eDP support via aux_busSankeerth Billakanti1-1/+13
This patch adds support for generic eDP sink through aux_bus. The eDP/DP controller driver should support aux transactions originating from the panel-edp driver and hence should be initialized and ready. The panel bridge supporting the panel should be ready before the bridge connector is initialized. The generic panel probe needs the controller resources to be enabled to support the aux transactions originating from the panel probe. Signed-off-by: Sankeerth Billakanti <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/483307/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
2022-02-19Merge branches 'msm-next-lumag-core', 'msm-next-lumag-dpu', ↵Dmitry Baryshkov1-2/+2
'msm-next-lumag-dp', 'msm-next-lumag-dsi', 'msm-next-lumag-hdmi' and 'msm-next-lumag-mdp5' into msm-next-lumag
2022-02-19drm/msm/dp: support attaching bridges to the DP encoderDmitry Baryshkov1-1/+1
Currently DP driver will allocate panel bridge for eDP panels. This supports only the following topology: - eDP encoder ⇒ eDP panel (wrapped using panel-bridge) Simplify this code to just check if there is any next bridge in the chain (be it a panel bridge or regular bridge). Rename panel_bridge field to next_bridge accordingly. This allows one to use e.g. one of the following display topologies: - eDP encoder ⇒ ptn3460 ⇒ fixed LVDS panel - eDP encoder ⇒ ptn3460 ⇒ LVDS connector with EDID lines for panel autodetect - eDP encoder ⇒ ptn3460 ⇒ THC63LVD1024 ⇒ DPI panel. - eDP encoder ⇒ LT8912 ⇒ DSI panel Signed-off-by: Dmitry Baryshkov <[email protected]> Tested-by: Kuogee Hsieh <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
2022-02-18drm/msm/dpu: simplify clocks handlingDmitry Baryshkov1-1/+1
DPU driver contains code to parse clock items from device tree into special data struct and then enable/disable/set rate for the clocks using that data struct. However the DPU driver itself uses only parsing and enabling/disabling part (the rate setting is used by DP driver). Move this implementation to the DP driver (which actually uses rate setting) and replace hand-coded enable/disable/get loops in the DPU with the respective clk_bulk operations. Put operation is removed completely because, it is handled using devres instead. DP implementation is unchanged for now. Tested-by: Jessica Zhang <[email protected]> # RB3 (sdm845) and RB5 (qrb5165) Reviewed-by: Jessica Zhang <[email protected]> Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
2021-10-18drm/msm/dp: Allow attaching a drm_panelBjorn Andersson1-1/+2
eDP panels might need some power sequencing and backlight management, so make it possible to associate a drm_panel with an eDP instance and prepare and enable the panel accordingly. Now that we know which hardware instance is DP and which is eDP, parser->parse() is passed the connector_type and the parser is limited to only search for a panel in the eDP case. Signed-off-by: Bjorn Andersson <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Clark <[email protected]>
2021-10-15drm/msm/dp: Store each subblock in the io regionBjorn Andersson1-1/+8
Not all platforms has DP_P0 at offset 0x1000 from the beginning of the DP block. So split the dss_io_data memory region into a set of sub-regions, to make it possible in the next patch to specify each of the sub-regions individually. Reviewed-by: Stephen Boyd <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2021-10-15drm/msm/dp: Refactor ioremap wrapperBjorn Andersson1-1/+1
In order to deal with multiple memory ranges in the following commit change the ioremap wrapper to not poke directly into the dss_io_data struct. While at it, devm_ioremap_resource() already prints useful error messages on failure, so omit the unnecessary prints from the caller. Signed-off-by: Bjorn Andersson <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2020-09-15drm/msm/dp: Use qmp phy for DP PLL and PHYStephen Boyd1-8/+4
Make the necessary changes to the DP driver to use the qmp phy from the common phy framework instead of rolling our own in the drm subsystem. This also removes the PLL code and adds proper includes so things build. Cc: Jeykumar Sankaran <[email protected]> Cc: Chandan Uddaraju <[email protected]> Cc: Vara Reddy <[email protected]> Cc: Tanmay Shah <[email protected]> Cc: Bjorn Andersson <[email protected]> Cc: Manu Gautam <[email protected]> Cc: Sandeep Maheswaram <[email protected]> Cc: Douglas Anderson <[email protected]> Cc: Sean Paul <[email protected]> Cc: Jonathan Marek <[email protected]> Cc: Dmitry Baryshkov <[email protected]> Cc: Rob Clark <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2020-09-15drm/msm/dp: Add DP compliance tests on Snapdragon ChipsetsKuogee Hsieh1-0/+2
add event thread to execute events serially from event queue. Also timeout mode is supported which allow an event be deferred to be executed at later time. Both link and phy compliant tests had been done successfully. Changes in v2: -- Fix potential deadlock by removing redundant connect_mutex -- Check and enable link clock during modeset -- Drop unused code and fix function prototypes. -- set sink power to normal operation state (D0) before DPCD read Changes in v3: -- push idle pattern at main link before timing generator off -- add timeout handles for both connect and disconnect Changes in v4: -- add ST_SUSPEND_PENDING to handles suspend/modeset test operations -- clear dp phy aux interrupt status when ERR_DPPHY_AUX error -- send segment addr during edid read -- clear bpp depth before MISC register write Changes in v5: -- add ST_SUSPENDED to fix crash at resume Changes in v6: -- at msm_dp_display_enable() do not return until resume_done to avoid kms commit timeout Signed-off-by: Kuogee Hsieh <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2020-09-15drm/msm/dp: add support for DP PLL driverChandan Uddaraju1-4/+3
Add the needed DP PLL specific files to support display port interface on msm targets. The DP driver calls the DP PLL driver registration. The DP driver sets the link and pixel clock sources. Changes in v2: -- Update copyright markings on all relevant files. -- Use DRM_DEBUG_DP for debug msgs. Changes in v4: -- Update the DP link clock provider names Changes in V5: -- Addressed comments from Stephen Boyd, Rob clark. Changes in V6: -- Remove PLL as separate driver and include PLL as DP module -- Remove redundant clock parsing from PLL module and make DP as clock provider -- Map USB3 DPCOM and PHY IO using hardcoded register address and move mapping form parser to PLL module -- Access DP PHY modules from same base address using offsets instead of deriving base address of individual module from device tree. -- Remove dp_pll_10nm_util.c and include its functionality in dp_pll_10nm.c -- Introduce new data structures private to PLL module Changes in v7: -- Remove DRM_MSM_DP_PLL config from Makefile and Kconfig -- Remove set_parent from determin_rate API -- Remove phy_pll_vco_div_clk from parent list -- Remove flag CLK_DIVIDER_ONE_BASED -- Remove redundant cell-index property parsing Changes in v8: -- Unregister hardware clocks during driver cleanup Changes in v9: -- Remove redundant Kconfig option DRM_MSM_DP_10NM_PLL Changes in v10: -- Limit 10nm PLL function scope Signed-off-by: Chandan Uddaraju <[email protected]> Signed-off-by: Vara Reddy <[email protected]> Signed-off-by: Tanmay Shah <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2020-09-15drm/msm/dp: add displayPort driver supportChandan Uddaraju1-0/+139
Add the needed displayPort files to enable DP driver on msm target. "dp_display" module is the main module that calls into other sub-modules. "dp_drm" file represents the interface between DRM framework and DP driver. Changes in v12: -- Add support of pm ops in display port driver -- Clear bpp depth bits before writing to MISC register -- Fix edid read Previous Change log: https://lkml.kernel.org/lkml/[email protected]/ Signed-off-by: Chandan Uddaraju <[email protected]> Signed-off-by: Vara Reddy <[email protected]> Signed-off-by: Tanmay Shah <[email protected]> Co-developed-by: Abhinav Kumar <[email protected]> Signed-off-by: Abhinav Kumar <[email protected]> Co-developed-by: Kuogee Hsieh <[email protected]> Signed-off-by: Kuogee Hsieh <[email protected]> Co-developed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Co-developed-by: Stephen Boyd <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Signed-off-by: Rob Clark <[email protected]>