Dmitry Baryshkov
5b90752f96
drm/msm/dpu: remove CRTC frame event callback registration
...
The frame event callback is always set to dpu_crtc_frame_event_cb() (or
to NULL) and the data is always either the CRTC itself or NULL
(correpondingly). Thus drop the event callback registration, call the
dpu_crtc_frame_event_cb() directly and gate on the dpu_enc->crtc
assigned using dpu_encoder_assign_crtc().
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Patchwork: https://patchwork.freedesktop.org/patch/600751/
Link: https://lore.kernel.org/r/20240625-dpu-no-crtc-register-v3-1-1b161df13776@linaro.org
2024-06-25 15:22:37 +03:00
Daniil Titov
2df0161959
drm/msm/dsi: Add phy configuration for MSM8937
...
Add phy configuration for 28nm dsi phy found on MSM8937 SoC. Only
difference from existing msm8916 configuration is number of phy
and io_start addresses.
Signed-off-by: Daniil Titov <daniilt971@gmail.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Barnabás Czémán <trabarni@gmail.com >
Patchwork: https://patchwork.freedesktop.org/patch/600518/
Link: https://lore.kernel.org/r/20240623-dsi-v2-4-a0ca70fb4846@gmail.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-06-25 01:09:09 +03:00
Daniil Titov
13099cb03f
drm/msm/mdp5: Add MDP5 configuration for MSM8937
...
Add the mdp5_cfg_hw entry for MDP5 version v1.14 found on msm8937.
Signed-off-by: Daniil Titov <daniilt971@gmail.com >
Signed-off-by: Barnabás Czémán <trabarni@gmail.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/600513/
Link: https://lore.kernel.org/r/20240623-dsi-v2-2-a0ca70fb4846@gmail.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-06-25 01:09:09 +03:00
Barnabás Czémán
a3a6b350eb
drm/msm/mdp5: Remove MDP_CAP_SRC_SPLIT from msm8x53_config
...
Remove MDP_CAP_SRC_SPLIT from msm8x53_config because
it is not referenced in downstream.
Fixes: fb25d4474f ("drm/msm/mdp5: Add configuration for MDP v1.16")
Signed-off-by: Barnabás Czémán <trabarni@gmail.com >
Patchwork: https://patchwork.freedesktop.org/patch/600521/
Link: https://lore.kernel.org/r/20240624-msm8953-mdp-fix-v1-1-be4d3262ebe3@gmail.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-06-25 01:08:22 +03:00
Jani Nikula
5bea90ad97
drm/msm/dp: switch to struct drm_edid
...
Prefer the struct drm_edid based functions for reading the EDID and
updating the connector.
Simplify the flow by updating the EDID property when the EDID is read
instead of at .get_modes.
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Patchwork: https://patchwork.freedesktop.org/patch/593976/
Link: https://lore.kernel.org/r/93d6c446ed4831dadfb4a77635a67cf5f27e19ff.1715691257.git.jani.nikula@intel.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-06-24 19:41:06 +03:00
Barnabás Czémán
f217b8b0bf
drm/msm/dpu: guard ctl irq callback register/unregister
...
CTLs on older qualcomm SOCs like msm8953 and msm8996 has not got interrupts,
so better to skip CTL irq callback register/unregister
make dpu_ctl_cfg be able to define without intr_start.
Signed-off-by: Barnabás Czémán <trabarni@gmail.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/596854/
Link: https://lore.kernel.org/r/20240509-ctl_irq-v1-1-9433f2da9dc7@gmail.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-06-24 19:41:06 +03:00
Dmitry Baryshkov
8ba16ca8cc
drm/msm/dpu: rename dpu_hw_setup_vsync_source functions
...
Rename dpu_hw_setup_vsync_source functions to make the names match the
implementation: on DPU 5.x the TOP only contains timer setup, while 3.x
and 4.x used MDP_VSYNC_SEL register to select TE source.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Patchwork: https://patchwork.freedesktop.org/patch/598745/
Link: https://lore.kernel.org/r/20240613-dpu-handle-te-signal-v2-8-67a0116b5366@linaro.org
2024-06-24 19:41:06 +03:00
Dmitry Baryshkov
bb3db0eb68
drm/msm/dpu: support setting the TE source
...
Make the DPU driver use the TE source specified in the DT. If none is
specified, the driver defaults to the first GPIO (mdp_vsync_p).
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Patchwork: https://patchwork.freedesktop.org/patch/598733/
Link: https://lore.kernel.org/r/20240613-dpu-handle-te-signal-v2-7-67a0116b5366@linaro.org
2024-06-24 19:41:05 +03:00
Dmitry Baryshkov
958d8d99cc
drm/msm/dsi: parse vsync source from device tree
...
Allow board's device tree to specify the vsync source (aka TE source).
If the property is omitted, the display controller driver will use the
default setting.
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
[DB: fixed clearing of return value if there is no TE property]
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org >
Patchwork: https://patchwork.freedesktop.org/patch/598740/
Link: https://lore.kernel.org/r/20240613-dpu-handle-te-signal-v2-6-67a0116b5366@linaro.org
2024-06-24 19:41:05 +03:00
Dmitry Baryshkov
47cda61fdc
drm/msm/dpu: rework vsync_source handling
...
The struct msm_display_info has is_te_using_watchdog_timer field which
is neither set anywhere nor is flexible enough to specify different
sources. Replace it with the field specifying the vsync source using
enum dpu_vsync_source.
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org >
Patchwork: https://patchwork.freedesktop.org/patch/598738/
Link: https://lore.kernel.org/r/20240613-dpu-handle-te-signal-v2-5-67a0116b5366@linaro.org
2024-06-24 19:41:05 +03:00
Dmitry Baryshkov
ceb5d43e06
drm/msm/dpu: pull the is_cmd_mode out of _dpu_encoder_update_vsync_source()
...
Setting vsync source makes sense only for DSI CMD panels. Pull the
is_cmd_mode condition out of the function into the calling code, so that
it becomes more explicit.
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org >
Patchwork: https://patchwork.freedesktop.org/patch/598736/
Link: https://lore.kernel.org/r/20240613-dpu-handle-te-signal-v2-4-67a0116b5366@linaro.org
2024-06-24 19:41:05 +03:00
Dmitry Baryshkov
36aa1f2bef
drm/msm/dsi: drop unused GPIOs handling
...
Neither disp-enable-gpios nor disp-te-gpios are defined in the schema.
None of the board DT files use those GPIO pins. Drop them from the
driver.
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org >
Patchwork: https://patchwork.freedesktop.org/patch/598734/
Link: https://lore.kernel.org/r/20240613-dpu-handle-te-signal-v2-3-67a0116b5366@linaro.org
2024-06-24 19:41:05 +03:00
Dmitry Baryshkov
548eb2bcea
drm/msm/dpu: convert vsync source defines to the enum
...
Add enum dpu_vsync_source instead of a series of defines. Use this enum
to pass vsync information.
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/598743/
Link: https://lore.kernel.org/r/20240613-dpu-handle-te-signal-v2-2-67a0116b5366@linaro.org
2024-06-24 19:41:05 +03:00
Abhinav Kumar
3d68e3dedd
drm/msm/dpu: drop validity checks for clear_pending_flush() ctl op
...
clear_pending_flush() ctl op is always assigned irrespective of the DPU
hardware revision. Hence there is no needed to check whether the op has
been assigned before calling it.
Drop the checks across the driver for clear_pending_flush() and also
update its documentation that it is always expected to be assigned.
changes in v2:
- instead of adding more validity checks just drop the one for clear_pending_flush
- update the documentation for clear_pending_flush() ctl op
- update the commit text reflecting these changes
changes in v3:
- simplify the documentation of clear_pending_flush
Fixes: d7d0e73f7d ("drm/msm/dpu: introduce the dpu_encoder_phys_* for writeback")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org >
Closes: https://lore.kernel.org/all/464fbd84-0d1c-43c3-a40b-31656ac06456@moroto.mountain/T/
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/600241/
Link: https://lore.kernel.org/r/20240620201731.3694593-1-quic_abhinavk@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-06-23 07:55:31 +03:00
Danila Tikhonov
0f47868812
drm/msm: mdss: Add SM7150 support
...
Add support for MDSS on SM7150.
Signed-off-by: Danila Tikhonov <danila@jiaxyga.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/599133/
Link: https://lore.kernel.org/r/20240614215855.82093-5-danila@jiaxyga.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-06-23 07:55:31 +03:00
Danila Tikhonov
75079df919
drm/msm/dpu: Add SM7150 support
...
Add definitions for the display hardware used on the Qualcomm SM7150
platform.
Signed-off-by: Danila Tikhonov <danila@jiaxyga.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/599129/
Link: https://lore.kernel.org/r/20240614215855.82093-3-danila@jiaxyga.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-06-23 07:55:31 +03:00
Jonathan Marek
294b381005
drm/msm/dsi: add a comment to explain pkt_per_line encoding
...
Make it clear why the pkt_per_line value is being "divided by 2".
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Jun Nie <jun.nie@linaro.org >
Tested-by: Neil Armstrong <neil.armstrong@linaro.org > # on SM8550-QRD
Tested-by: Neil Armstrong <neil.armstrong@linaro.org > # on SM8650-QRD
Tested-by: Neil Armstrong <neil.armstrong@linaro.org > # on SM8650-HDK
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Patchwork: https://patchwork.freedesktop.org/patch/596236/
Link: https://lore.kernel.org/r/20240530-msm-drm-dsc-dsi-video-upstream-4-v6-6-2ab1d334c657@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-06-23 01:15:39 +03:00
Jonathan Marek
9ecd0ddd22
drm/msm/dsi: set VIDEO_COMPRESSION_MODE_CTRL_WC
...
Video mode DSC won't work if this field is not set correctly. Set it to fix
video mode DSC (for slice_per_pkt==1 cases at least).
Fixes: 08802f515c ("drm/msm/dsi: Add support for DSC configuration")
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Jun Nie <jun.nie@linaro.org >
Tested-by: Neil Armstrong <neil.armstrong@linaro.org > # on SM8550-QRD
Tested-by: Neil Armstrong <neil.armstrong@linaro.org > # on SM8650-QRD
Tested-by: Neil Armstrong <neil.armstrong@linaro.org > # on SM8650-HDK
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Patchwork: https://patchwork.freedesktop.org/patch/596234/
Link: https://lore.kernel.org/r/20240530-msm-drm-dsc-dsi-video-upstream-4-v6-5-2ab1d334c657@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-06-23 01:15:39 +03:00
Jonathan Marek
007870b8ea
drm/msm/dsi: set video mode widebus enable bit when widebus is enabled
...
The value returned by msm_dsi_wide_bus_enabled() doesn't match what the
driver is doing in video mode. Fix that by actually enabling widebus for
video mode.
Fixes: efcbd6f9cd ("drm/msm/dsi: Enable widebus for DSI")
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org >
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Signed-off-by: Jun Nie <jun.nie@linaro.org >
Tested-by: Neil Armstrong <neil.armstrong@linaro.org > # on SM8550-QRD
Tested-by: Neil Armstrong <neil.armstrong@linaro.org > # on SM8650-QRD
Tested-by: Neil Armstrong <neil.armstrong@linaro.org > # on SM8650-HDK
Patchwork: https://patchwork.freedesktop.org/patch/596232/
Link: https://lore.kernel.org/r/20240530-msm-drm-dsc-dsi-video-upstream-4-v6-4-2ab1d334c657@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-06-23 01:15:39 +03:00
Jun Nie
063557239c
drm/msm/dpu: enable compression bit in cfg2 for DSC
...
Enable compression bit in cfg2 register for DSC in the DSI case
per hardware version.
Signed-off-by: Jun Nie <jun.nie@linaro.org >
Tested-by: Neil Armstrong <neil.armstrong@linaro.org > # on SM8550-QRD
Tested-by: Neil Armstrong <neil.armstrong@linaro.org > # on SM8650-QRD
Tested-by: Neil Armstrong <neil.armstrong@linaro.org > # on SM8650-HDK
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Patchwork: https://patchwork.freedesktop.org/patch/596231/
Link: https://lore.kernel.org/r/20240530-msm-drm-dsc-dsi-video-upstream-4-v6-3-2ab1d334c657@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-06-23 01:15:39 +03:00
Jun Nie
17236bc0ee
drm/msm/dpu: adjust data width for widen bus case
...
data is valid for only half the active window if widebus
is enabled
Signed-off-by: Jun Nie <jun.nie@linaro.org >
Tested-by: Neil Armstrong <neil.armstrong@linaro.org > # on SM8550-QRD
Tested-by: Neil Armstrong <neil.armstrong@linaro.org > # on SM8650-QRD
Tested-by: Neil Armstrong <neil.armstrong@linaro.org > # on SM8650-HDK
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Patchwork: https://patchwork.freedesktop.org/patch/596229/
Link: https://lore.kernel.org/r/20240530-msm-drm-dsc-dsi-video-upstream-4-v6-2-2ab1d334c657@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-06-23 01:15:39 +03:00
Jonathan Marek
f9ce482d7d
drm/msm/dpu: fix video mode DSC for DSI
...
Add width change in DPU timing for DSC compression case to work with
DSI video mode.
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Signed-off-by: Jun Nie <jun.nie@linaro.org >
Tested-by: Neil Armstrong <neil.armstrong@linaro.org > # on SM8550-QRD
Tested-by: Neil Armstrong <neil.armstrong@linaro.org > # on SM8650-QRD
Tested-by: Neil Armstrong <neil.armstrong@linaro.org > # on SM8650-HDK
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Patchwork: https://patchwork.freedesktop.org/patch/596227/
Link: https://lore.kernel.org/r/20240530-msm-drm-dsc-dsi-video-upstream-4-v6-1-2ab1d334c657@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-06-23 01:15:39 +03:00
Konrad Dybcio
5372db09f4
drm/msm/dsi: Remove dsi_phy_write_[un]delay()
...
These are dummy wrappers that do literally nothing interesting.
Remove them.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/590703/
Link: https://lore.kernel.org/r/20240423-topic-msm_cleanup-v1-2-b30f39f43b90@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-06-23 01:15:39 +03:00
Konrad Dybcio
8fd6f64ddb
drm/msm/dsi: Remove dsi_phy_read/write()
...
These are dummy wrappers that do literally nothing interesting.
Remove them.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/590700/
Link: https://lore.kernel.org/r/20240423-topic-msm_cleanup-v1-1-b30f39f43b90@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-06-23 01:15:39 +03:00
Connor Abbott
ecbf9b3a82
drm/msm/a7xx: Add missing register writes from downstream
...
This isn't known to fix anything yet, but it's a good idea to add it.
Signed-off-by: Connor Abbott <cwabbott0@gmail.com >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/592043/
Signed-off-by: Rob Clark <robdclark@chromium.org >
2024-06-21 13:41:43 -07:00
Connor Abbott
41fd54ef74
drm/msm: Add MSM_PARAM_RAYTRACING uapi
...
Expose the value of the software fuse to userspace.
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Connor Abbott <cwabbott0@gmail.com >
Patchwork: https://patchwork.freedesktop.org/patch/592044/
Signed-off-by: Rob Clark <robdclark@chromium.org >
2024-06-21 13:41:43 -07:00
Connor Abbott
14b27d5df3
drm/msm/a7xx: Initialize a750 "software fuse"
...
On all Qualcomm platforms with a7xx GPUs, qcom_scm provides a method to
initialize cx_mem. Copy this from downstream (minus BCL which we
currently don't support). On a750, this includes a new "fuse" register
which can be used by qcom_scm to fuse off certain features like
raytracing in software. The fuse is default off, and is initialized by
calling the method. Afterwards we have to read it to find out which
features were enabled.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Connor Abbott <cwabbott0@gmail.com >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/592042/
Signed-off-by: Rob Clark <robdclark@chromium.org >
2024-06-21 13:41:43 -07:00
Rob Clark
d38660ebde
drm/msm/adreno: Check for zap node availability
...
This should allow disabling the zap node via an overlay, for slbounce.
Suggested-by: Nikita Travkin <nikita@trvn.ru >
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com >
Patchwork: https://patchwork.freedesktop.org/patch/594572/
2024-06-21 13:41:43 -07:00
Rob Clark
f2608b70f6
drm/msm: Add obj flags to gpu devcoredump
...
When debugging faults, it is useful to know how the BO is mapped (cached
vs WC, gpu readonly, etc).
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Akhil P Oommen <quic_akhilpo@quicinc.com >
Acked-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/593854/
2024-06-21 13:41:43 -07:00
Rob Clark
204226de27
drm/msm: Add GPU memory traces
...
Perfetto can use these traces to track global and per-process GPU memory
usage.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Patchwork: https://patchwork.freedesktop.org/patch/580854/
2024-06-21 13:41:43 -07:00
Konrad Dybcio
593f1dd4c8
drm/msm/a6xx: Fix A702 UBWC mode
...
UBWC_MODE is a one-bit-wide field, so a value of 2 is obviously bogus.
Replace it with the correct value (0).
Fixes: 18397519cb ("drm/msm/adreno: Add A702 support")
Reported-by: Connor Abbott <cwabbott0@gmail.com >
Closes: https://lore.kernel.org/linux-arm-msm/CACu1E7FTN=kwaDJMNiTmFspALzj2+Q-nvsN5ugi=vz4RdUGvGw@mail.gmail.com/
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/597359/
Signed-off-by: Rob Clark <robdclark@chromium.org >
2024-06-20 10:08:29 -07:00
Abhinav Kumar
71d9b458b2
drm/msm/a6xx: use __unused__ to fix compiler warnings for gen7_* includes
...
GCC diagnostic pragma method throws below warnings in some of the versions
drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:16:9: warning: unknown
option after '#pragma GCC diagnostic' kind [-Wpragmas]
#pragma GCC diagnostic ignored "-Wunused-const-variable"
^
In file included from drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:18:0:
drivers/gpu/drm/msm/adreno/adreno_gen7_0_0_snapshot.h:924:19: warning:
'gen7_0_0_external_core_regs' defined but not used [-Wunused-variable]
static const u32 *gen7_0_0_external_core_regs[] = {
^
In file included from drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:19:0:
drivers/gpu/drm/msm/adreno/adreno_gen7_2_0_snapshot.h:748:19: warning:
'gen7_2_0_external_core_regs' defined but not used [-Wunused-variable]
static const u32 *gen7_2_0_external_core_regs[] = {
^
In file included from drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:20:0:
drivers/gpu/drm/msm/adreno/adreno_gen7_9_0_snapshot.h:1188:43: warning:
'gen7_9_0_sptp_clusters' defined but not used [-Wunused-variable]
static struct gen7_sptp_cluster_registers gen7_9_0_sptp_clusters[] = {
^
drivers/gpu/drm/msm/adreno/adreno_gen7_9_0_snapshot.h:1438:19: warning:
'gen7_9_0_external_core_regs' defined but not used [-Wunused-variable]
static const u32 *gen7_9_0_external_core_regs[] = {
Remove GCC version dependency by using __unused__ for the unused gen7_* includes.
Changes in v2:
- Fix the warnings in the commit text
- Use __attribute((__unused__)) instead of local assignment
changes in v3:
- drop the Link from the auto add
changes in v4:
- replace __attribute((__unused__)) with __always_unused
Fixes: 64d6255650 ("drm/msm: More fully implement devcoredump for a7xx")
Suggested-by: Rob Clark <robdclark@chromium.org >
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/597265/
[Add gen7_9_0_cx_debugbus_blocks as well]
Signed-off-by: Rob Clark <robdclark@chromium.org >
2024-06-20 10:08:29 -07:00
Rob Clark
fccf9dd008
drm/msm/adreno: Move CP_PROTECT settings to hw catalog
...
Move the CP_PROTECT settings into the hw catalog.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/599731/
2024-06-20 09:45:37 -07:00
Rob Clark
dff2f69f3e
drm/msm/adreno: Move hwcg table into a6xx specific info
...
Introduce a6xx_info where we can stash gen specific stuff without
polluting the toplevel adreno_info struct.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/599728/
2024-06-20 09:45:26 -07:00
Rob Clark
85e8cc06f2
drm/msm/adreno: Move hwcg regs to a6xx hw catalog
...
Move the hwcg tables into the hw catalog.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/599727/
2024-06-20 09:45:25 -07:00
Rob Clark
2e819c420e
drm/msm/adreno: Split catalog into separate files
...
Split each gen's gpu table into it's own file. Only code-motion, no
functional change.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/599725/
2024-06-20 09:45:25 -07:00
Rob Clark
8ed322f632
drm/msm/adreno: Split up giant device table
...
Split into a separate table per generation, in preparation to move each
gen's device table to it's own file.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/599723/
2024-06-20 09:45:25 -07:00
Dmitry Baryshkov
92815da457
Merge remote-tracking branch 'drm-misc/drm-misc-next' into HEAD
...
Merge drm-misc-next tree into the msm-next tree in order to be able to
use HDMI connector framework for the MSM HDMI driver.
2024-06-12 16:52:39 +03:00
Dmitry Baryshkov
6b4468b0c6
drm/bridge-connector: implement glue code for HDMI connector
...
In order to let bridge chains implement HDMI connector infrastructure,
add necessary glue code to the drm_bridge_connector. In case there is a
bridge that sets DRM_BRIDGE_OP_HDMI, drm_bridge_connector will register
itself as a HDMI connector and provide proxy drm_connector_hdmi_funcs
implementation.
Note, to simplify implementation, there can be only one bridge in a
chain that sets DRM_BRIDGE_OP_HDMI. Setting more than one is considered
an error. This limitation can be lifted later, if the need arises.
Acked-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240607-bridge-hdmi-connector-v5-3-ab384e6021af@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-06-12 10:56:57 +03:00
Dmitry Baryshkov
c12907be57
drm/bridge-connector: switch to using drmm allocations
...
Turn drm_bridge_connector to using drmm_kzalloc() and
drmm_connector_init() and drop the custom destroy function. The
drm_connector_unregister() and fwnode_handle_put() are already handled
by the drm_connector_cleanup() and so are safe to be dropped.
Acked-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240607-bridge-hdmi-connector-v5-2-ab384e6021af@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-06-12 10:55:54 +03:00
Dmitry Baryshkov
000d1940c9
drm/connector: hdmi: allow disabling Audio Infoframe
...
Add drm_atomic_helper_connector_hdmi_disable_audio_infoframe(), an API
to allow the driver disable sending the Audio Infoframe. This is to be
used by the drivers if setup of the infoframes is not tightly coupled
with the audio functionality and just disabling the audio playback
doesn't stop the HDMI hardware from sending the Infoframe.
Acked-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240607-bridge-hdmi-connector-v5-1-ab384e6021af@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-06-12 10:55:54 +03:00
Douglas Anderson
78f15847bd
drm/panel: raydium-rm67191: Don't call unprepare+disable at shutdown
...
It's the responsibility of a correctly written DRM modeset driver to
call drm_atomic_helper_shutdown() at shutdown time and that should be
disabling / unpreparing the panel if needed. Panel drivers shouldn't
be calling these functions themselves.
A recent effort was made to fix as many DRM modeset drivers as
possible [1] [2] [3] and most drivers are fixed now.
A grep through mainline for compatible strings used by this driver
indicates that it is used by IMX boards. The IMX driver appears to be
correctly calling drm_atomic_helper_shutdown() so we can remove the
calls.
[1] https://lore.kernel.org/r/20230901234015.566018-1-dianders@chromium.org
[2] https://lore.kernel.org/r/20230901234202.566951-1-dianders@chromium.org
[3] https://lore.kernel.org/r/20230921192749.1542462-1-dianders@chromium.org
Cc: Robert Chiras <robert.chiras@nxp.com >
Acked-by: Linus Walleij <linus.walleij@linaro.org >
Acked-by: Maxime Ripard <mripard@kernel.org >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20240604172305.v3.22.Id14188f1a8af7d524751c27c343a5b583ff5361f@changeid
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.22.Id14188f1a8af7d524751c27c343a5b583ff5361f@changeid
2024-06-11 09:58:49 +02:00
Douglas Anderson
b7c906d680
drm/panel: raydium-rm67191: Stop tracking enabled
...
As talked about in commit d2aacaf073 ("drm/panel: Check for already
prepared/enabled in drm_panel"), we want to remove needless code from
panel drivers that was storing and double-checking the
prepared/enabled state. Even if someone was relying on the
double-check before, that double-check is now in the core and not
needed in individual drivers.
The conversion of the rm67191 panel driver follows many of the other
panel drivers but has a few differences that need to be called out.
Like in commit 1e0465eb16 ("drm/panel: otm8009a: Don't double check
prepared/enabled"), this panel also uses the "prepared" flag to
prevent the backlight functions from running when the panel is powered
off. This is probably not the safest thing to do but the old behavior
was preserved. See the discussion in the otm8009a patch. Because of
this, I've left the driver tracking "prepared" but removed its
tracking of "enabled".
NOTE: as part of this, transition the panel's direct calls to its
disable/unprepare functions in shutdown to call through DRM panel.
Cc: Robert Chiras <robert.chiras@nxp.com >
Acked-by: Linus Walleij <linus.walleij@linaro.org >
Acked-by: Maxime Ripard <mripard@kernel.org >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20240604172305.v3.21.I20f82e9dd1597a14ae37a64c6b8275add60fbdb1@changeid
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.21.I20f82e9dd1597a14ae37a64c6b8275add60fbdb1@changeid
2024-06-11 09:58:48 +02:00
Douglas Anderson
b3494ccb04
drm/panel: sharp-ls043t1le01: Don't call disable at shutdown/remove
...
It's the responsibility of a correctly written DRM modeset driver to
call drm_atomic_helper_shutdown() at shutdown time and that should be
disabling / unpreparing the panel if needed. Panel drivers shouldn't
be calling these functions themselves.
A recent effort was made to fix as many DRM modeset drivers as
possible [1] [2] [3] and most drivers are fixed now.
A grep through mainline for compatible strings used by this driver
indicates that it is used by Qualcomm boards. The Qualcomm driver
appears to be correctly calling drm_atomic_helper_shutdown() so we can
remove the calls.
[1] https://lore.kernel.org/r/20230901234015.566018-1-dianders@chromium.org
[2] https://lore.kernel.org/r/20230901234202.566951-1-dianders@chromium.org
[3] https://lore.kernel.org/r/20230921192749.1542462-1-dianders@chromium.org
Cc: Werner Johansson <werner.johansson@sonymobile.com >
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Acked-by: Linus Walleij <linus.walleij@linaro.org >
Acked-by: Maxime Ripard <mripard@kernel.org >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20240604172305.v3.20.I89ee53f7fc2f0806cab318128e5fa927990d830f@changeid
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.20.I89ee53f7fc2f0806cab318128e5fa927990d830f@changeid
2024-06-11 09:58:48 +02:00
Douglas Anderson
804c4d0a20
drm/panel: sharp-ls043t1le01: Stop tracking prepared
...
As talked about in commit d2aacaf073 ("drm/panel: Check for already
prepared/enabled in drm_panel"), we want to remove needless code from
panel drivers that was storing and double-checking the
prepared/enabled state. Even if someone was relying on the
double-check before, that double-check is now in the core and not
needed in individual drivers.
Cc: Werner Johansson <werner.johansson@sonymobile.com >
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Acked-by: Linus Walleij <linus.walleij@linaro.org >
Acked-by: Maxime Ripard <mripard@kernel.org >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20240604172305.v3.19.I56849dbe7c906f0cff076dc5286fd05c7e3e9c18@changeid
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.19.I56849dbe7c906f0cff076dc5286fd05c7e3e9c18@changeid
2024-06-11 09:58:47 +02:00
Douglas Anderson
d7d473d846
drm/panel: sharp-lq101r1sx01: Don't call disable at shutdown/remove
...
It's the responsibility of a correctly written DRM modeset driver to
call drm_atomic_helper_shutdown() at shutdown time and that should be
disabling / unpreparing the panel if needed. Panel drivers shouldn't
be calling these functions themselves.
A recent effort was made to fix as many DRM modeset drivers as
possible [1] [2] [3] and most drivers are fixed now.
A grep through mainline for compatible strings used by this driver
indicates that it is used by Tegra boards. The Tegra driver appears to
be correctly calling drm_atomic_helper_shutdown() so we can remove the
calls.
[1] https://lore.kernel.org/r/20230901234015.566018-1-dianders@chromium.org
[2] https://lore.kernel.org/r/20230901234202.566951-1-dianders@chromium.org
[3] https://lore.kernel.org/r/20230921192749.1542462-1-dianders@chromium.org
Cc: Thierry Reding <treding@nvidia.com >
Acked-by: Linus Walleij <linus.walleij@linaro.org >
Acked-by: Maxime Ripard <mripard@kernel.org >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20240604172305.v3.18.I6a87fce1ee027c96f71c7adf74248b865f50b336@changeid
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.18.I6a87fce1ee027c96f71c7adf74248b865f50b336@changeid
2024-06-11 09:58:47 +02:00
Douglas Anderson
316bb1473c
drm/panel: sharp-lq101r1sx01: Stop tracking prepared/enabled
...
As talked about in commit d2aacaf073 ("drm/panel: Check for already
prepared/enabled in drm_panel"), we want to remove needless code from
panel drivers that was storing and double-checking the
prepared/enabled state. Even if someone was relying on the
double-check before, that double-check is now in the core and not
needed in individual drivers.
Cc: Thierry Reding <treding@nvidia.com >
Acked-by: Linus Walleij <linus.walleij@linaro.org >
Acked-by: Maxime Ripard <mripard@kernel.org >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20240604172305.v3.17.Ifd6b12b8a4bca7d492e892ea7455e83f5c0ab5a8@changeid
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.17.Ifd6b12b8a4bca7d492e892ea7455e83f5c0ab5a8@changeid
2024-06-11 09:58:46 +02:00
Douglas Anderson
728290006a
drm/panel: seiko-43wvf1g: Don't call disable at shutdown/remove
...
It's the responsibility of a correctly written DRM modeset driver to
call drm_atomic_helper_shutdown() at shutdown time and that should be
disabling / unpreparing the panel if needed. Panel drivers shouldn't
be calling these functions themselves.
A recent effort was made to fix as many DRM modeset drivers as
possible [1] [2] [3] and most drivers are fixed now.
A grep through mainline for compatible strings used by this driver
indicates that it is used by IMX boards. As far as I can tell, all IMX
boards are now correctly calling drm_atomic_helper_shutdown() so we
can remove the calls.
[1] https://lore.kernel.org/r/20230901234015.566018-1-dianders@chromium.org
[2] https://lore.kernel.org/r/20230901234202.566951-1-dianders@chromium.org
[3] https://lore.kernel.org/r/20230921192749.1542462-1-dianders@chromium.org
Cc: Marco Franchi <marco.franchi@nxp.com >
Cc: Fabio Estevam <festevam@denx.de >
Cc: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com >
Cc: Pengutronix Kernel Team <kernel@pengutronix.de >
Cc: imx@lists.linux.dev
Acked-by: Linus Walleij <linus.walleij@linaro.org >
Acked-by: Maxime Ripard <mripard@kernel.org >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20240604172305.v3.16.Ief712fb6720cb98bdf9ec8644362d028b6554f9b@changeid
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.16.Ief712fb6720cb98bdf9ec8644362d028b6554f9b@changeid
2024-06-11 09:58:46 +02:00
Douglas Anderson
1557395799
drm/panel: seiko-43wvf1g: Stop tracking prepared/enabled
...
As talked about in commit d2aacaf073 ("drm/panel: Check for already
prepared/enabled in drm_panel"), we want to remove needless code from
panel drivers that was storing and double-checking the
prepared/enabled state. Even if someone was relying on the
double-check before, that double-check is now in the core and not
needed in individual drivers.
Cc: Marco Franchi <marco.franchi@nxp.com >
Cc: Fabio Estevam <festevam@denx.de >
Cc: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com >
Cc: Pengutronix Kernel Team <kernel@pengutronix.de >
Cc: imx@lists.linux.dev
Acked-by: Linus Walleij <linus.walleij@linaro.org >
Acked-by: Maxime Ripard <mripard@kernel.org >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20240604172305.v3.15.Idda91d310ca2e4f5a4ab4ca6eaf1afdaf14eeb51@changeid
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.15.Idda91d310ca2e4f5a4ab4ca6eaf1afdaf14eeb51@changeid
2024-06-11 09:58:45 +02:00
Douglas Anderson
f10b4577da
drm/panel: panasonic-vvx10f034n00: Don't call disable at shutdown/remove
...
It's the responsibility of a correctly written DRM modeset driver to
call drm_atomic_helper_shutdown() at shutdown time and that should be
disabling / unpreparing the panel if needed. Panel drivers shouldn't
be calling these functions themselves.
A recent effort was made to fix as many DRM modeset drivers as
possible [1] [2] [3] and most drivers are fixed now.
Unfortunately, grepping mainline for this panel's compatible string
shows no hits, so we can't be 100% sure if the DRM modeset driver used
with this panel has been fixed. If it is found that the DRM modeset
driver hasn't been fixed then this patch could be temporarily reverted
until it is.
[1] https://lore.kernel.org/r/20230901234015.566018-1-dianders@chromium.org
[2] https://lore.kernel.org/r/20230901234202.566951-1-dianders@chromium.org
[3] https://lore.kernel.org/r/20230921192749.1542462-1-dianders@chromium.org
Cc: Werner Johansson <werner.johansson@sonymobile.com >
Acked-by: Linus Walleij <linus.walleij@linaro.org >
Acked-by: Maxime Ripard <mripard@kernel.org >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20240604172305.v3.14.I1562c864ee35a9c166765488c95104b7e4e562da@changeid
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.14.I1562c864ee35a9c166765488c95104b7e4e562da@changeid
2024-06-11 09:58:45 +02:00