Kalyan Thota
fca5ad26b7
drm/msm/disp/dpu1: add dspp support for sc7280
...
Add destination side post processing hw block support in sc7280.
This hwblock enablement is necessary to support color features
like CT Matix (Ex: Night Light feature)
Signed-off-by: Kalyan Thota <quic_kalyant@quicinc.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/490382/
Link: https://lore.kernel.org/r/1655802387-15275-1-git-send-email-quic_kalyant@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:18:44 +03:00
Vladimir Lypak
eeda2bc4fc
drm/msm/mdp5: Add perf data for MDP v1.16
...
Add the perf data for the mdp found in msm8953.
Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com >
Signed-off-by: Luca Weiss <luca@z3ntu.xyz >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/489153/
Link: https://lore.kernel.org/r/20220610225304.267508-1-luca@z3ntu.xyz
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:31 +03:00
Dmitry Baryshkov
97b10e15df
drm/msm/mdp4: get rid of struct mdp4_platform_config
...
Struct mdp4_platform_config is a relict from the DT-conversion time.
Move the max_clk field to the mdp4_kms_init(), the place where it is
used and drop the struct mdp4_platform_config and the mdp4_get_config()
function.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Patchwork: https://patchwork.freedesktop.org/patch/485050/
Link: https://lore.kernel.org/r/20220505135008.1351533-3-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:31 +03:00
Dmitry Baryshkov
a143890fef
drm/msm/mdp4: move iommu_domain_alloc() call close to its usage
...
Move iommu_domain_alloc() in front of adress space/IOMMU initialization.
This allows us to drop it from struct mdp4_cfg_platform which
remained from the pre-DT days.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Patchwork: https://patchwork.freedesktop.org/patch/485049/
Link: https://lore.kernel.org/r/20220505135008.1351533-2-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:31 +03:00
Dmitry Baryshkov
a7977d5cd9
drm/msm/hdmi: support attaching the "next" bridge
...
There might be a chain of bridges attached to the HDMI node
(including but not limited to the display-connector bridge). Add support
for attaching them right to the HDMI bridge chain.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Patchwork: https://patchwork.freedesktop.org/patch/489709/
Link: https://lore.kernel.org/r/20220616085057.432353-1-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:30 +03:00
Dmitry Baryshkov
089008b698
drm/msm/hdmi: drop empty bridge callbacks
...
Drop empty callbacks msm_hdmi_bridge_enable() and
msm_hdmi_bridge_disable().
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Patchwork: https://patchwork.freedesktop.org/patch/489707/
Link: https://lore.kernel.org/r/20220616085054.432317-1-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:30 +03:00
Dmitry Baryshkov
0f390c8ca0
drm/msm/hdmi-phy: populate 8x60 HDMI PHY requirements
...
Declare that 8x60 HDMI PHY uses the core-vdda regulator and slave_iface
clock (this is the same config as is used by the 8960).
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/488863/
Link: https://lore.kernel.org/r/20220609122350.3157529-13-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:30 +03:00
Dmitry Baryshkov
ac1c2787bb
drm/msm/hdmi: reuse MSM8960's config for MSM8660
...
MSM8660 requires the same set of clocks and regulators as MSM8960. Reuse
MSM8960's config for the MSM8660 (8x60).
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/488864/
Link: https://lore.kernel.org/r/20220609122350.3157529-12-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:30 +03:00
Dmitry Baryshkov
9edaba8751
drm/msm/hdmi: merge platform config for 8974/8084/8994/8996
...
Since there is no more difference between the HDMI platform data
between MSM8974/APQ8084/MSM8994/MSM8996, merge these configs into a
single entry.
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/488868/
Link: https://lore.kernel.org/r/20220609122350.3157529-11-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:30 +03:00
Dmitry Baryshkov
b45aff9688
drm/msm/hdmi: drop hpd_regs usage on 8x74/8084
...
The MSM HDMI driver has support for hpd_regs on 8x74/8084: supply
regulators that are to be enabled for HPD to work. Currently these
regulators contain the hpd_gdsc, which was replaced by the power-domains
support and hpd-5v/hpd-5v-en, which are not used by the chip itself.
They power up the ESD bridge.
However it is a separate device which should be represented separately
in the device tree.
None of upstreamed devices support these properties. Thus drop support
for them from the HDMI driver.
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/488860/
Link: https://lore.kernel.org/r/20220609122350.3157529-10-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:30 +03:00
Dmitry Baryshkov
53d9118f7d
drm/msm/hdmi: drop empty 'none' regulator lists
...
Several platform configs use empty 'none' regulator arrays. They are not
necessary, as the code will use corresponding _cnt field and skip the
array completely. Drop them now.
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/488861/
Link: https://lore.kernel.org/r/20220609122350.3157529-9-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:30 +03:00
Dmitry Baryshkov
1f88301794
drm/msm/hdmi: enable core-vcc/core-vdda-supply for 8996 platform
...
DB820c makes use of core-vcc-supply and core-vdda-supply, however the
driver code doesn't support these regulators. Enable them for HDMI on
8996 platform.
Fixes: 0afbe59edd ("drm/msm/hdmi: Add basic HDMI support for msm8996")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Patchwork: https://patchwork.freedesktop.org/patch/488857/
Link: https://lore.kernel.org/r/20220609122350.3157529-8-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:30 +03:00
Dmitry Baryshkov
68e674b13b
drm/msm/hdmi: drop unused GPIO support
...
The HDMI driver has code to configure extra GPIOs, which predates
pinctrl support. Nowadays all platforms should use pinctrl instead.
Neither of upstreamed Qualcomm platforms uses these properties, so it's
safe to drop them.
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Patchwork: https://patchwork.freedesktop.org/patch/488858/
Link: https://lore.kernel.org/r/20220609122350.3157529-7-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:30 +03:00
Dmitry Baryshkov
7fbf025305
drm/msm/hdmi: drop the hdmi-mux support
...
With the last (and only) in-kernel user of hdmi-mux regulator, drop it
from the HDMI driver.
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/488855/
Link: https://lore.kernel.org/r/20220609122350.3157529-6-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:30 +03:00
Dmitry Baryshkov
94a9e05228
drm/msm/dp: use ARRAY_SIZE for calculating num_descs
...
If for some reason the msm_dp_config::descs array starts from non-zero
index or contains the hole, setting the msm_dp_config::num_descs might
be not that obvious and error-prone. Use ARRAY_SIZE to set this field
rather than encoding the value manually.
Reported-by: Kuogee Hsieh <quic_khsieh@quicinc.com >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Reviewed-by: Kuogee Hsieh <quic_khsieh@quicinc.com >
Patchwork: https://patchwork.freedesktop.org/patch/491399/
Link: https://lore.kernel.org/r/20220627165413.657142-1-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:29 +03:00
Vladimir Lypak
4f0718bfa4
drm/msm/dsi: Use single function for reset
...
There is currently two function for performing reset: dsi_sw_reset and
dsi_sw_reset_restore. Only difference between those is that latter one
assumes that DSI controller is enabled. In contrary former one assumes
that controller is disabled and executed during power-on. However this
assumtion is not true mobile devices which have boot splash set up by
boot-loader.
This patch removes dsi_sw_reset_restore and makes dsi_sw_reset disable
DSI controller during reset sequence if it's enabled.
Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com >
Signed-off-by: Luca Weiss <luca@z3ntu.xyz >
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/489152/
Link: https://lore.kernel.org/r/20220610220259.220622-1-luca@z3ntu.xyz
[DB: fixed the typo in the commit message]
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:29 +03:00
Dmitry Baryshkov
a18a44e926
drm/msm/hdmi: fill the pwr_regs bulk regulators
...
Conversion to use bulk regulator API omitted filling the pwr_regs with
proper regulator IDs. This was left unnoticed, since none of my testing
platforms has used the pwr_regs. Fix this by propagating regulator ids
properly.
Fixes: 31b3b1f5e3 ("drm/msm/hdmi: use bulk regulator API")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Patchwork: https://patchwork.freedesktop.org/patch/488847/
Link: https://lore.kernel.org/r/20220609113148.3149194-1-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:29 +03:00
Stephen Boyd
efc7617086
drm/msm/dp: Remove encoder pointer from struct msm_dp
...
We don't need to stash the encoder here. Instead we can simply pass it
around as an argument.
Cc: Kuogee Hsieh <quic_khsieh@quicinc.com >
Signed-off-by: Stephen Boyd <swboyd@chromium.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Patchwork: https://patchwork.freedesktop.org/patch/491187/
Link: https://lore.kernel.org/r/20220625002811.3225344-1-swboyd@chromium.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:29 +03:00
Dmitry Baryshkov
3bcecf2b6d
drm/msm/dp: make dp_bridge_mode_valid() more precise
...
Make dp_connector_mode_valid() return precise MODE_CLOCK_HIGH rather
than generic MODE_BAD in case the mode clock is higher than
DP_MAX_PIXEL_CLK_KHZ (675 MHz).
Reviewed-by: Kuogee Hsieh<quic_khsieh@quicinc.com >
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/489554/
Link: https://lore.kernel.org/r/20220615115920.6768-1-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:29 +03:00
Dmitry Baryshkov
2709935b4a
drm/msm/dpu: simplify and unify dpu_encoder_get_intf and dpu_encoder_get_wb
...
Remove extra nestting level from the dpu_encoder_get_intf(), replacing it
with the explicit return in case the INTF_WB was passed to the function.
While we are at it, also change dpu_encoder_get_wb() to also use
explicit return rather than the goto.
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Patchwork: https://patchwork.freedesktop.org/patch/491189/
Link: https://lore.kernel.org/r/20220625003028.383259-1-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:28 +03:00
Jessica Zhang
b166504786
drm/msm/dpu: Add interface support for CRC debugfs
...
Add support for writing CRC values for the interface block to
the debugfs by calling the necessary MISR setup/collect methods.
Changes since V1:
- Set values_cnt to only include phys with backing hw_intf
- Loop over all drm_encs connected to crtc
Changes since V2:
- Remove vblank.h inclusion
- Change `pos + i` to `pos + entries`
- Initialize values_cnt to 0 for encoder
- Change DPU_CRTC_CRC_SOURCE_INTF to DPU_CRTC_CRC_SOURCE_ENCODER (and
"intf" to "enc")
- Change dpu_encoder_get_num_phys to dpu_encoder_get_num_hw_intfs
- Add checks for setup_misr and collect_misr in
dpu_encoder_get_num_hw_intfs
Changes since V3:
- Remove extra whitespace
- Change "enc" to "encoder"
- Move crcs array to dpu_crtc_get_encoder_crc
- Rename dpu_encoder_get_num_hw_intfs to dpu_encoder_get_crc_values_cnt
Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/490736/
Link: https://lore.kernel.org/r/20220622171835.7558-5-quic_jesszhan@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:28 +03:00
Dmitry Baryshkov
50b1131e06
drm/msm/dp: rewrite dss_module_power to use bulk clock functions
...
In order to simplify DP code, drop hand-coded loops over clock arrays,
replacing them with clk_bulk_* functions.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Patchwork: https://patchwork.freedesktop.org/patch/474717/
Link: https://lore.kernel.org/r/20220217055529.499829-6-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:28 +03:00
Jessica Zhang
91143873a0
drm/msm/dpu: Add MISR register support for interface
...
Add support for setting MISR registers within the interface
Changes since V1:
- Replaced dpu_hw_intf collect_misr and setup_misr implementations with
calls to dpu_hw_utils helper methods
Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/490730/
Link: https://lore.kernel.org/r/20220622171835.7558-4-quic_jesszhan@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:28 +03:00
Dmitry Baryshkov
fc18ea9818
drm/msm/dp: inline dp_power_clk_set_rate()
...
Inline the dp_power_clk_set_rate() function, replacing it with the call
to msm_dss_enable_clk().
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Patchwork: https://patchwork.freedesktop.org/patch/474719/
Link: https://lore.kernel.org/r/20220217055529.499829-5-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:28 +03:00
Jessica Zhang
7b37523fb1
drm/msm/dpu: Move MISR methods to dpu_hw_util
...
Move layer mixer specific MISR methods to generalized helper methods.
This will make it easier to add CRC support for other blocks in the
future.
Changes since V2:
- Reordered parameters so that offsets are after hw_blk_reg_map
- Fixed mismatched whitespace in bitmask definitions
Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/490732/
Link: https://lore.kernel.org/r/20220622171835.7558-3-quic_jesszhan@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:28 +03:00
Dmitry Baryshkov
26345e0117
drm/msm/dp: set stream_pixel rate directly
...
The only clock for which we set the rate is the "stream_pixel". Rather
than storing the rate and then setting it by looping over all the
clocks, set the clock rate directly.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Patchwork: https://patchwork.freedesktop.org/patch/474714/
Link: https://lore.kernel.org/r/20220217055529.499829-4-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:28 +03:00
Dmitry Baryshkov
d9e0f7a663
drm/msm/dp: "inline" dp_ctrl_set_clock_rate("ctrl_link")
...
"ctrl_link" is the clock from DP_CTRL_PM module. The result of setting
the rate for it would be a call to dev_pm_opp_set_rate(). Instead of
saving the rate inside struct dss_module_power, call the
devm_pm_opp_set_rate() directly.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Patchwork: https://patchwork.freedesktop.org/patch/474712/
Link: https://lore.kernel.org/r/20220217055529.499829-3-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:28 +03:00
Jessica Zhang
58fc5d186d
drm/msm/dpu: Move LM CRC code into separate method
...
Move layer mixer-specific section of dpu_crtc_get_crc() into a separate
helper method. This way, we can make it easier to get CRCs from other HW
blocks by adding other get_crc helper methods.
Changes since V1:
- Move common bitmasks to dpu_hw_util.h
- Move common CRC methods to dpu_hw_util.c
- Update copyrights
- Change crcs array to a dynamically allocated array and added it as a
member of crtc_state
Changes since V2:
- Put changes for hw_util into a separate commit
- Revert crcs array to a static array
- Add else case for set_crc_source to return EINVAL if no valid source
is selected
- Add DPU_CRTC_MAX_CRC_ENTRIES macro
Changes since V3:
- Move crcs array into dpu_crtc_get_lm_crc
- Remove comment about crcs array in dpu_crtc_state struct
- Revert `lm` rename
- Remove DPU_CRTC_MAX_CRC_ENTRIES macro
- Return EINVAL in dpu_crtc_get_crc if no valid CRC source is set
Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/490735/
Link: https://lore.kernel.org/r/20220622171835.7558-2-quic_jesszhan@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:27 +03:00
Abhinav Kumar
4edea8d305
drm/msm/dpu: remove hard-coded linewidth limit for writeback
...
Remove the hard-coded limit for writeback and lets start using
the one from catalog instead.
changes in v3:
- correct the Fixes tag
Fixes: d7d0e73f7d ("drm/msm/dpu: introduce the dpu_encoder_phys_* for writeback")
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/489888/
Link: https://lore.kernel.org/r/1655406084-17407-3-git-send-email-quic_abhinavk@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:27 +03:00
Abhinav Kumar
a370cc392e
drm/msm/dpu: fix maxlinewidth for writeback block
...
Writeback block for sm8250 was using the default maxlinewidth
of 2048. But this is not right as it supports upto 4096.
This should have no effect on most resolutions as we are
still limiting upto maxlinewidth of SSPP for adding the modes.
Fix the maxlinewidth for writeback block on sm8250.
changes in v3:
- correct the Fixes tag
Fixes: 53324b99bd ("drm/msm/dpu: add writeback blocks to the sm8250 DPU catalog")
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/489887/
Link: https://lore.kernel.org/r/1655406084-17407-2-git-send-email-quic_abhinavk@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:27 +03:00
Abhinav Kumar
b4a624acab
drm/msm/dpu: move intf and wb assignment to dpu_encoder_setup_display()
...
intf and wb resources are not dependent on the rm global
state so need not be allocated during dpu_encoder_virt_atomic_mode_set().
Move the allocation of intf and wb resources to dpu_encoder_setup_display()
so that we can utilize the hw caps even during atomic_check() phase.
Since dpu_encoder_setup_display() already has protection against
setting invalid intf_idx and wb_idx, these checks can now
be dropped as well.
changes in v2:
- add phys->hw_intf and phys->hw_wb checks back
changes in v3:
- correct the Fixes tag
Fixes: e02a559a72 ("drm/msm/dpu: make changes to dpu_encoder to support virtual encoder")
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/489885/
Link: https://lore.kernel.org/r/1655406084-17407-1-git-send-email-quic_abhinavk@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:27 +03:00
Dmitry Baryshkov
b6529e3376
drm/msm/dpu: drop enum msm_display_caps
...
After the commit c46f0d6903 ("drm/msm: remove unused hotplug and edid
macros from msm_drv.h") the msm_display_caps enum contains two bits
describing whether the encoder should work in video or command mode.
Drop the enum and replace capabilities field in struct msm_display_info
with boolean is_cmd_mode field.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Patchwork: https://patchwork.freedesktop.org/patch/485454/
Link: https://lore.kernel.org/r/20220507115942.1705872-2-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:27 +03:00
Dmitry Baryshkov
b1ed585a16
drm/msm/dpu: dont_use IS_ERR_OR_NULL for encoder phys backends
...
The functions dpu_encoder_phys_foo_init() can not return NULL. Replace
corresponding IS_ERR_OR_NULL() checks with just IS_ERR().
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Patchwork: https://patchwork.freedesktop.org/patch/485452/
Link: https://lore.kernel.org/r/20220507115942.1705872-1-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:27 +03:00
Dmitry Baryshkov
de7d480f5e
drm/msm/dpu: make dpu hardware catalog static const
...
Replace superfluous cfg_init functions, which just assign a static
config to the struct dpu_mdss_cfg, with static instances of struct
dpu_mdss_cfg.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Patchwork: https://patchwork.freedesktop.org/patch/488166/
Link: https://lore.kernel.org/r/20220602202447.1755115-8-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:27 +03:00
Dmitry Baryshkov
3208496720
drm/msm/dpu: constify struct dpu_mdss_cfg
...
Mark struct dpu_mdss_cfg instance as a const pointer. This is mostly a
preparation for the next patch.
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/488164/
Link: https://lore.kernel.org/r/20220602202447.1755115-7-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:27 +03:00
Dmitry Baryshkov
481d5dbb93
drm/msm/dpu: change catalog->dma_cfg to be a const pointer
...
Change dpu_mdss_cfg::dma_cfg to be a const pointer rather than embedding
the dpu_reg_dma_cfg struct into the struct dpu_mdss_cfg.
Reported-by: kernel test robot <lkp@intel.com >
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/488162/
Link: https://lore.kernel.org/r/20220602202447.1755115-6-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:27 +03:00
Dmitry Baryshkov
477db4feea
drm/msm/dpu: change catalog->perf to be a const pointer
...
Change dpu_mdss_cfg::perf to be a const pointer rather than embedding
the dpu_perf_cfg struct into the struct dpu_mdss_cfg.
Reported-by: kernel test robot <lkp@intel.com >
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/488158/
Link: https://lore.kernel.org/r/20220602202447.1755115-5-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:27 +03:00
Dmitry Baryshkov
129ae533fa
drm/msm/dpu: remove hwversion field from data structures
...
The driver should not depend on hw revision for detecting features.
Instead it should use features from the hw catalog. Drop the hwversion
field from struct dpu_mdss_cfg and struct dpu_hw_blk_reg_map.
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/488160/
Link: https://lore.kernel.org/r/20220602202447.1755115-4-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:27 +03:00
Dmitry Baryshkov
c87443150a
drm/msm/dpu: move VBIF_XINL_QOS_LVL_REMAP size to hw_catalog
...
Rather than detecting VBIF_XINL_QOS_LVL_REMAP_000 based on the
hwversion, push the offset to the hw_catalog.
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/488156/
Link: https://lore.kernel.org/r/20220602202447.1755115-3-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:27 +03:00
Dmitry Baryshkov
2d8a4edb67
drm/msm/dpu: use feature bit for LM combined alpha check
...
Rather than checking hwversion, follow the usual patter and add special
bit to the lm->features to check whether the LM has combined or separate
alpha registers. While we are at it, rename
dpu_hw_lm_setup_blend_config_sdm845() to
dpu_hw_lm_setup_blend_config_combined_alpha().
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Patchwork: https://patchwork.freedesktop.org/patch/488155/
Link: https://lore.kernel.org/r/20220602202447.1755115-2-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:27 +03:00
Abhinav Kumar
51e4d60e6b
drm/msm/dpu: add writeback support for sc7180
...
Add writeback support for sc7180 devices. This has been
validated on sc7180 chromebook using IGT writeback test
suite.
localhost /usr/local/libexec/igt-gpu-tools # ./kms_writeback
Starting subtest: writeback-pixel-formats
Subtest writeback-pixel-formats: SUCCESS (0.001s)
Starting subtest: writeback-invalid-parameters
Subtest writeback-invalid-parameters: SUCCESS (0.004s)
Starting subtest: writeback-fb-id
Subtest writeback-fb-id: SUCCESS (0.009s)
Starting subtest: writeback-check-output
Subtest writeback-check-output: SUCCESS (0.203s)
Adding this will increase IGT coverage on chromebooks and also
allow using writeback functionality for other use-cases as
necessary.
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/485787/
Link: https://lore.kernel.org/r/20220510235439.31916-1-quic_abhinavk@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-07-04 21:05:26 +03:00
Guillaume Ranquet
091e5e004e
drm/mediatek: dpi: Move the csc_enable bit to SoC config
...
Add flexibility by moving the csc_enable bit to SoC specific config
Signed-off-by: Guillaume Ranquet <granquet@baylibre.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com >
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220701035845.16458-13-rex-bc.chen@mediatek.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org >
2022-07-04 22:43:38 +08:00
Guillaume Ranquet
4e28119bd5
drm/mediatek: dpi: Move the yuv422_en_bit to SoC config
...
Add flexibility by moving the yuv422 en bit to SoC specific config
Signed-off-by: Guillaume Ranquet <granquet@baylibre.com >
Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com >
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220701035845.16458-12-rex-bc.chen@mediatek.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org >
2022-07-04 22:40:51 +08:00
Guillaume Ranquet
48fb81a271
drm/mediatek: dpi: Move swap_shift to SoC config
...
Add flexibility by moving the swap shift value to SoC specific config.
Signed-off-by: Guillaume Ranquet <granquet@baylibre.com >
Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com >
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220701035845.16458-11-rex-bc.chen@mediatek.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org >
2022-07-04 22:38:20 +08:00
Guillaume Ranquet
e373924d7e
drm/mediatek: dpi: Move hvsize_mask to SoC config
...
Add flexibility by moving the hvsize mask to SoC specific config.
Signed-off-by: Guillaume Ranquet <granquet@baylibre.com >
Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com >
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220701035845.16458-10-rex-bc.chen@mediatek.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org >
2022-07-04 22:36:02 +08:00
Guillaume Ranquet
a519e22bcf
drm/mediatek: dpi: Move dimension mask to SoC config
...
Add flexibility by moving the dimension mask to the SoC config
Signed-off-by: Guillaume Ranquet <granquet@baylibre.com >
Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com >
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220701035845.16458-9-rex-bc.chen@mediatek.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org >
2022-07-04 22:32:20 +08:00
Guillaume Ranquet
3145095fae
drm/mediatek: dpi: Implement a swap_input toggle in SoC config
...
The hardware design of dp_intf does not support input swap, so we add
a bit of flexibility to support SoCs without swap_input support.
We also add a warning message if the hardware is not supported and it
needs to swap input.
Signed-off-by: Guillaume Ranquet <granquet@baylibre.com >
Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com >
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220701035845.16458-8-rex-bc.chen@mediatek.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org >
2022-07-04 22:27:48 +08:00
Guillaume Ranquet
cf060519e4
drm/mediatek: dpi: Implement a CK/DE pol toggle in SoC config
...
Dp_intf does not support CK/DE polarity because the polarity information
is not used for eDP and DP while dp_intf is only for eDP and DP.
Therefore, we add a bit of flexibility to support SoCs without CK/DE pol
support.
Signed-off-by: Guillaume Ranquet <granquet@baylibre.com >
Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com >
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220701035845.16458-7-rex-bc.chen@mediatek.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org >
2022-07-04 22:26:12 +08:00
Bo-Chen Chen
4393c74a88
drm/mediatek: dpi: Add support for quantization range
...
For RGB colorimetry, CTA-861 support both limited and full range data
when receiving video with RGB color space.
We use drm_default_rgb_quant_range() to determine the correct setting.
Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220701035845.16458-6-rex-bc.chen@mediatek.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org >
2022-07-04 22:21:35 +08:00
Guillaume Ranquet
aed61ef6be
drm/mediatek: dpi: Only enable dpi after the bridge is enabled
...
Enabling the dpi too early causes glitches on screen.
Move the call to mtk_dpi_enable() at the end of the bridge_enable
callback to ensure everything is setup properly before enabling dpi.
Fixes: 9e629c17aa ("drm/mediatek: Add DPI sub driver")
Signed-off-by: Guillaume Ranquet <granquet@baylibre.com >
Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com >
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220701035845.16458-16-rex-bc.chen@mediatek.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org >
2022-07-04 22:16:38 +08:00