Bhaskar Chowdhury
6bac5b13b4
drm/msm/dpu: Fix a typo
...
s/struture/structure/
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com >
Link: https://lore.kernel.org/r/20210322062723.3215931-1-unixbhaskar@gmail.com
Acked-by: Randy Dunlap <rdunlap@infradead.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:33:52 -07:00
Zhen Lei
e020ac961c
drm/msm/dpu: Fix error return code in dpu_mdss_init()
...
The error code returned by platform_get_irq() is stored in 'irq', it's
forgotten to be copied to 'ret' before being returned. As a result, the
value 0 of 'ret' is returned incorrectly.
After the above fix is completed, initializing the local variable 'ret'
to 0 is no longer needed, remove it.
In addition, when dpu_mdss_init() is successfully returned, the value of
'ret' is always 0. Therefore, replace "return ret" with "return 0" to make
the code clearer.
Fixes: 070e64dc1b ("drm/msm/dpu: Convert to a chained irq chip")
Reported-by: Hulk Robot <hulkci@huawei.com >
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com >
Link: https://lore.kernel.org/r/20210510063805.3262-2-thunder.leizhen@huawei.com
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:33:52 -07:00
Zhen Lei
a1c9b1e3bd
drm/msm: Fix error return code in msm_drm_init()
...
Fix to return a negative error code from the error handling case instead
of 0, as done elsewhere in this function.
Fixes: 7f9743abaa ("drm/msm: validate display and event threads")
Reported-by: Hulk Robot <hulkci@huawei.com >
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com >
Link: https://lore.kernel.org/r/20210508022836.1777-1-thunder.leizhen@huawei.com
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:33:44 -07:00
Rob Clark
8c08c7b51a
Merge branch 'msm-fixes-v5.13-rc6' into msm-next-redo
...
Syncing up with -rc6 fixes to avoid conflicts with a660 patches.
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:59 -07:00
Krishna Manikandan
a1f2ba60ea
drm/msm/disp/dpu1: avoid perf update in frame done event
...
Crtc perf update from frame event work can result in
wrong bandwidth and clock update from dpu if the work
is scheduled after the swap state has happened.
Avoid such issues by moving perf update to complete
commit once the frame is accepted by the hardware.
Fixes: a29c8c0241 ("drm/msm/disp/dpu1: fix display underruns during modeset")
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org >
Tested-by: Douglas Anderson <dianders@chromium.org >
Link: https://lore.kernel.org/r/1622092076-5100-1-git-send-email-mkrishn@codeaurora.org
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:16 -07:00
Stephen Boyd
5b702d787b
drm/msm/disp: Move various debug logs to atomic bucket
...
These prints flood the logs with drm debugging set to enable kms and
driver logging (DRM_UT_KMS and DRM_UT_DRIVER). Let's move these prints
to the atomic bucket (DRM_UT_ATOMIC) as they're related to the atomic
paths.
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Cc: Abhinav Kumar <abhinavk@codeaurora.org >
Cc: Kuogee Hsieh <khsieh@codeaurora.org >
Cc: aravindh@codeaurora.org
Cc: Sean Paul <sean@poorly.run >
Signed-off-by: Stephen Boyd <swboyd@chromium.org >
Link: https://lore.kernel.org/r/20210430193104.1770538-7-swboyd@chromium.org
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:16 -07:00
Stephen Boyd
f6bc4e1d51
drm/msm/disp: Use plane debug print helper
...
Use the DPU_DEBUG_PLANE() helper to print the plane number instead of
open coding it.
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Cc: Abhinav Kumar <abhinavk@codeaurora.org >
Cc: Kuogee Hsieh <khsieh@codeaurora.org >
Cc: aravindh@codeaurora.org
Cc: Sean Paul <sean@poorly.run >
Signed-off-by: Stephen Boyd <swboyd@chromium.org >
Link: https://lore.kernel.org/r/20210430193104.1770538-6-swboyd@chromium.org
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:16 -07:00
Stephen Boyd
7cb017db18
drm/msm: Move FB debug prints to drm_dbg_state()
...
These are verbose prints that tell us about the framebuffer state. Let's
move them to drm_dbg_state() so that they're only printed if we're
interested in verbose state logging while drm debugging.
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Cc: Abhinav Kumar <abhinavk@codeaurora.org >
Cc: Kuogee Hsieh <khsieh@codeaurora.org >
Cc: aravindh@codeaurora.org
Cc: Sean Paul <sean@poorly.run >
Signed-off-by: Stephen Boyd <swboyd@chromium.org >
Link: https://lore.kernel.org/r/20210430193104.1770538-5-swboyd@chromium.org
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:15 -07:00
Stephen Boyd
e45b40ab9b
drm/msm/dp: Drop malformed debug print
...
This print is missing a newline, and doesn't really provide any value.
Drop it.
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Cc: Abhinav Kumar <abhinavk@codeaurora.org >
Cc: Kuogee Hsieh <khsieh@codeaurora.org >
Cc: aravindh@codeaurora.org
Cc: Sean Paul <sean@poorly.run >
Signed-off-by: Stephen Boyd <swboyd@chromium.org >
Link: https://lore.kernel.org/r/20210430193104.1770538-4-swboyd@chromium.org
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:15 -07:00
Stephen Boyd
721c6e0c6a
drm/msm: Move vblank debug prints to drm_dbg_vbl()
...
Put these debug prints in the vblank code into the appropriate vblank
category via drm_dbg_vbl().
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Cc: Abhinav Kumar <abhinavk@codeaurora.org >
Cc: Kuogee Hsieh <khsieh@codeaurora.org >
Cc: aravindh@codeaurora.org
Cc: Sean Paul <sean@poorly.run >
Signed-off-by: Stephen Boyd <swboyd@chromium.org >
Link: https://lore.kernel.org/r/20210430193104.1770538-2-swboyd@chromium.org
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:15 -07:00
Dmitry Baryshkov
d94fc8f36f
drm/msm/dpu: simplify IRQ enabling/disabling
...
Merge dpu_core_irq_enable() into dpu_core_irq_register_callback() and
dpu_core_irq_disable() into dpu_core_irq_unregister_callback(), because
they are called in pairs. There is no need to have separate
enable/disable pair, we can enable hardware IRQ when first callback is
registered and when the last callback is unregistered.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org >
Link: https://lore.kernel.org/r/20210516202910.2141079-7-dmitry.baryshkov@linaro.org
[fixup tracepoint compile warns]
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:15 -07:00
Dmitry Baryshkov
18b20ac0ec
drm/msm/dpu: drop remains of old irq lookup subsystem
...
There is no more need for the dpu_intr_type types, dpu_irq_map table,
individual intr defines and obsolete_irq field. Drop all of them now.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org >
Link: https://lore.kernel.org/r/20210516202910.2141079-6-dmitry.baryshkov@linaro.org
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:15 -07:00
Dmitry Baryshkov
667e9985ee
drm/msm/dpu: replace IRQ lookup with the data in hw catalog
...
The IRQ table in the dpu_hw_interrupts.h is big, ugly, and hard to
maintain. There are only few interrupts used from that table. Newer
generations use different IRQ locations. Move this data to hw catalog.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org >
Link: https://lore.kernel.org/r/20210516202910.2141079-5-dmitry.baryshkov@linaro.org
[fixup tracepoint compile warns/err]
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:15 -07:00
Dmitry Baryshkov
597762d5bf
drm/msm/dpu: define interrupt register names
...
In order to make mdss_irqs readable (and error-prone) define names for
interrupt register indices.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org >
Link: https://lore.kernel.org/r/20210516202910.2141079-4-dmitry.baryshkov@linaro.org
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:15 -07:00
Dmitry Baryshkov
98fbe6bb5b
drm/msm/dpu: hw_intr: always call dpu_hw_intr_clear_intr_status_nolock
...
Always call dpu_hw_intr_clear_intr_status_nolock() from the
dpu_hw_intr_dispatch_irqs(). This simplifies the callback function
(which call clears the interrupts anyway) and enforces clearing the hw
interrupt status.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org >
Link: https://lore.kernel.org/r/20210516202910.2141079-3-dmitry.baryshkov@linaro.org
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:15 -07:00
Dmitry Baryshkov
09e3a2b442
drm/msm/dpu: merge dpu_hw_intr_get_interrupt_statuses into dpu_hw_intr_dispatch_irqs
...
There is little sense in reading interrupt statuses and right after that
going after the array of statuses to dispatch them. Merge both loops
into single function doing read and dispatch.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org >
Link: https://lore.kernel.org/r/20210516202910.2141079-2-dmitry.baryshkov@linaro.org
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:15 -07:00
Stephen Boyd
e305f678e9
drm/msm/dp: Handle aux timeouts, nacks, defers
...
Let's look at the irq status bits after a transfer and see if we got a
nack or a defer or a timeout, instead of telling drm layers that
everything was fine, while still printing an error message. I wasn't
sure about NACK+DEFER so I lumped all those various errors along with a
nack so that the drm core can figure out that things are just not going
well. The important thing is that we're now returning -ETIMEDOUT when
the message times out and nacks for bad addresses.
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Cc: Abhinav Kumar <abhinavk@codeaurora.org >
Cc: Kuogee Hsieh <khsieh@codeaurora.org >
Cc: aravindh@codeaurora.org
Cc: Sean Paul <sean@poorly.run >
Signed-off-by: Stephen Boyd <swboyd@chromium.org >
Reviewed-by: Kuogee Hsieh <khsieh@codeaurora.org >
Link: https://lore.kernel.org/r/20210507212505.1224111-4-swboyd@chromium.org
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:15 -07:00
Stephen Boyd
47327fdd7e
drm/msm/dp: Shrink locking area of dp_aux_transfer()
...
We don't need to hold the lock to inspect the message we're going to
transfer, and we don't need to clear the busy flag either. Take the lock
later and bail out earlier if conditions aren't met.
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Cc: Abhinav Kumar <abhinavk@codeaurora.org >
Cc: Kuogee Hsieh <khsieh@codeaurora.org >
Cc: aravindh@codeaurora.org
Cc: Sean Paul <sean@poorly.run >
Signed-off-by: Stephen Boyd <swboyd@chromium.org >
Reviewed-by: Kuogee Hsieh <khsieh@codeaurora.org >
Link: https://lore.kernel.org/r/20210507212505.1224111-3-swboyd@chromium.org
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:15 -07:00
Stephen Boyd
24c7861b81
drm/msm/dp: Simplify aux irq handling code
...
We don't need to stash away 'isr' in the aux structure to pass to two
functions. Let's use a local variable instead. And we can complete the
completion variable in one place instead of two to simplify the code.
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Cc: Abhinav Kumar <abhinavk@codeaurora.org >
Cc: Kuogee Hsieh <khsieh@codeaurora.org >
Cc: aravindh@codeaurora.org
Cc: Sean Paul <sean@poorly.run >
Signed-off-by: Stephen Boyd <swboyd@chromium.org >
Reviewed-by: Kuogee Hsieh <khsieh@codeaurora.org >
Link: https://lore.kernel.org/r/20210507212505.1224111-2-swboyd@chromium.org
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:14 -07:00
Dmitry Baryshkov
53e231705e
drm/msm: fix display snapshotting if DP or DSI is disabled
...
Fix following warnings generated when either DP or DSI support is
disabled:
drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c:141:3: error: implicit declaration of function 'msm_dp_snapshot'; did you mean 'msm_dsi_snapshot'? [-Werror=implicit-function-declaration]
drivers/gpu/drm/msm/msm_kms.h:127:26: warning: 'struct msm_disp_state' declared inside parameter list will not be visible outside of this definition or declaration
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:867:21: error: initialization of 'void (*)(struct msm_disp_state *, struct msm_kms *)' from incompatible pointer type 'void (*)(struct msm_disp_state *, struct msm_kms *)' [-Werror=incompatible-pointer-types]
drivers/gpu/drm/msm/dsi/dsi.h:94:30: warning: 'struct msm_disp_state' declared inside parameter list will not be visible outside of this definition or declaration
Reported-by: kernel test robot <lkp@intel.com >
Cc: Abhinav Kumar <abhinavk@codeaurora.org >
Fixes: 1c3b7ac1a71d ("drm/msm: pass dump state as a function argument")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org >
Link: https://lore.kernel.org/r/20210527220330.3364716-1-dmitry.baryshkov@linaro.org
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:14 -07:00
Jonathan Marek
9ef364432d
drm/msm: deprecate MSM_BO_UNCACHED (map as writecombine instead)
...
There shouldn't be any reason to ever use uncached over writecombine,
so just use writecombine for MSM_BO_UNCACHED.
Note: userspace never used MSM_BO_UNCACHED anyway
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Acked-by: Jordan Crouse <jordan@cosmicpenguin.net >
Link: https://lore.kernel.org/r/20210423190833.25319-6-jonathan@marek.ca
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:14 -07:00
Jonathan Marek
d12e339044
drm/msm: add MSM_BO_CACHED_COHERENT
...
Add a new cache mode for creating coherent host-cached BOs.
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org >
Link: https://lore.kernel.org/r/20210423190833.25319-5-jonathan@marek.ca
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:14 -07:00
Jonathan Marek
af9b354707
drm/msm: use the right pgprot when mapping BOs in the kernel
...
Use the same logic as the userspace mapping.
This fixes msm_rd with cached BOs.
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Acked-by: Jordan Crouse <jordan@cosmicpenguin.net >
Link: https://lore.kernel.org/r/20210423190833.25319-4-jonathan@marek.ca
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:14 -07:00
Jonathan Marek
a5fc7aa901
drm/msm: replace MSM_BO_UNCACHED with MSM_BO_WC for internal objects
...
msm_gem_get_vaddr() currently always maps as writecombine, so use the right
flag instead of relying on broken behavior (things don't actually work if
they are mapped as uncached).
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Acked-by: Jordan Crouse <jordan@cosmicpenguin.net >
Link: https://lore.kernel.org/r/20210423190833.25319-3-jonathan@marek.ca
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:14 -07:00
Jonathan Marek
8eaf9b02ac
drm/msm: remove unnecessary mmap logic for cached BOs
...
No one knows what this is for anymore, so just remove it.
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Acked-by: Jordan Crouse <jordan@cosmicpenguin.net >
Link: https://lore.kernel.org/r/20210423190833.25319-2-jonathan@marek.ca
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:14 -07:00
Dmitry Baryshkov
d91940e289
drm/msm/dsi: add DSI PHY registers to snapshot data
...
Add DSI PHY registers to the msm state snapshots to be able to check
their contents.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org >
Link: https://lore.kernel.org/r/20210427001828.2375555-5-dmitry.baryshkov@linaro.org
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:14 -07:00
Dmitry Baryshkov
bac2c6a62e
drm/msm: get rid of msm_iomap_size
...
Instead of looping throught the resources each time to get the DSI CTRL
area size, get it at the ioremap time.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org >
Link: https://lore.kernel.org/r/20210427001828.2375555-4-dmitry.baryshkov@linaro.org
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:14 -07:00
Dmitry Baryshkov
2503003cb2
drm/msm: make msm_disp_state transient data struct
...
Instead of allocating snapshotting structure at the driver probe time
and later handling concurrent access, actual state, etc, make
msm_disp_state transient struct. Allocate one when snapshotting happens
and free it after coredump data is read by userspace.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org >
Link: https://lore.kernel.org/r/20210427001828.2375555-3-dmitry.baryshkov@linaro.org
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:14 -07:00
Dmitry Baryshkov
eb9d6c7ebe
drm/msm: pass dump state as a function argument
...
Instead of always getting the disp_state from drm device, pass it as an
argument.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org >
Link: https://lore.kernel.org/r/20210427001828.2375555-2-dmitry.baryshkov@linaro.org
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:14 -07:00
Abhinav Kumar
2ec5b3dc18
drm/msm: add disp snapshot points across dpu driver
...
Add snapshot points across dpu driver to trigger dumps when critical
errors are hit.
changes in v5:
- change the callers to use the snapshot function directly
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/1618606645-19695-8-git-send-email-abhinavk@codeaurora.org
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:14 -07:00
Abhinav Kumar
d87fe031bf
drm/msm: add support to take dsi, dp and dpu snapshot
...
Add support to take the register snapshot of dsi, dp and dpu
modules.
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/1618606645-19695-7-git-send-email-abhinavk@codeaurora.org
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:13 -07:00
Abhinav Kumar
a698b5cdfe
drm/msm/disp/dpu1: add API to take DPU register snapshot
...
Add an API to take a snapshot of DPU controller registers. This API
will be used by the msm_disp_snapshot module to capture the DPU
snapshot.
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/1618606645-19695-6-git-send-email-abhinavk@codeaurora.org
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:13 -07:00
Abhinav Kumar
0f6090f37f
drm/msm/dp: add API to take DP register snapshot
...
Add an API to take a snapshot of DP controller registers. This API
will be used by the msm_disp_snapshot module to capture the DP
snapshot.
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/1618606645-19695-5-git-send-email-abhinavk@codeaurora.org
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:13 -07:00
Abhinav Kumar
9d30a4bcf4
drm/msm/dsi: add API to take DSI register snapshot
...
Add an API to take a snapshot of DSI controller registers. This API
will be used by the msm_disp_snapshot module to capture the DSI
snapshot.
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/1618606645-19695-4-git-send-email-abhinavk@codeaurora.org
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:13 -07:00
Abhinav Kumar
98659487b8
drm/msm: add support to take dpu snapshot
...
Add the msm_disp_snapshot module which adds supports to dump dpu
registers and capture the drm atomic state which can be used in
case of error conditions.
changes in v5:
- start storing disp_state in msm_kms instead of dpu_kms
- get rid of MSM_DISP_SNAPSHOT_IN_* enum by simplifying the functions
- move snprintf inside the snapshot core by using varargs
- get rid of some stale code comments
- allow snapshot module for non-DPU targets
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/1618606645-19695-3-git-send-email-abhinavk@codeaurora.org
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:13 -07:00
Abhinav Kumar
a4324a7a1c
drm: allow drm_atomic_print_state() to accept any drm_printer
...
Currently drm_atomic_print_state() internally allocates and uses a
drm_info printer. Allow it to accept any drm_printer type so that
the API can be leveraged even for taking drm snapshot.
Rename the drm_atomic_print_state() to drm_atomic_print_new_state()
so that it reflects its functionality better.
changes in v5:
- none
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/1618606645-19695-2-git-send-email-abhinavk@codeaurora.org
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:13 -07:00
Kuogee Hsieh
f21c8a276c
drm/msm/dp: handle irq_hpd with sink_count = 0 correctly
...
irq_hpd interrupt should be handled after dongle plugged in and
before dongle unplugged. Hence irq_hpd interrupt is enabled at
the end of the plugin handle and disabled at the beginning of
unplugged handle. Current irq_hpd with sink_count = 0 is wrongly
handled same as the dongle unplugged which tears down the mainlink
and disables the phy. This patch fixes this problem by only tearing
down the mainlink but keeping phy enabled at irq_hpd with
sink_count = 0 handle so that next irq_hpd with sink_count =1 can be
handled by setup mainlink only. This patch also set dongle into D3
(power off) state at end of handling irq_hpd with sink_count = 0.
Changes in v2:
-- add ctrl->phy_Power_count
Changes in v3:
-- del ctrl->phy_Power_count
-- add phy_power_off to dp_ctrl_off_link_stream()
Changes in v4:
-- return immediately if clock disable failed at dp_ctrl_off_link_stream()
Changes in v5:
-- set dongle to D3 (power off) state at dp_ctrl_off_link_stream()
Changes in v6:
-- add Fixes tag
Fixes: ea9f337ce8 ("drm/msm/dp: reset dp controller only at boot up and pm_resume")
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org >
Tested-by: Stephen Boyd <swboyd@chromium.org >
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Link: https://lore.kernel.org/r/1621635930-30161-1-git-send-email-khsieh@codeaurora.org
Signed-off-by: Rob Clark <robdclark@chromium.org >
2021-06-23 07:32:05 -07:00
Dave Airlie
61c0cb8ae7
Merge tag 'drm-misc-next-fixes-2021-06-18' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
...
Short summary of fixes pull:
* hyperv: advertise the correct formatmodifiers for its primary plane
* dp_mst: VCPI fixes to make it work with StarTech hub
* dp_mst: Fix build error
Signed-off-by: Dave Airlie <airlied@redhat.com >
From: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/YMxgI1oluBpPyfu6@linux-uq9g.fritz.box
2021-06-23 14:46:39 +10:00
Dave Airlie
bde431fbe8
Merge tag 'drm/tegra/for-5.14-rc1' of ssh://git.freedesktop.org/git/tegra/linux into drm-next
...
drm/tegra: Changes for v5.14-rc1
The two major changes here are fixed YUV support as well as scaling on
Tegra186 and later. This allows Tegra DRM to be used, for example, as a
video sink for the kmssink gstreamer plugin. The remainder of the
changes are minor fixes.
Signed-off-by: Dave Airlie <airlied@redhat.com >
From: Thierry Reding <thierry.reding@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210611165157.3569315-1-thierry.reding@gmail.com
2021-06-23 14:24:37 +10:00
Dave Airlie
f45fbbb6d5
Backmerge tag 'v5.13-rc7' into drm-next
...
Backmerge Linux 5.13-rc7 to make some pulls from later bases apply,
and to bake in the conflicts so far.
2021-06-23 10:07:48 +10:00
Alex Deucher
8fe44c080a
drm/amdgpu/display: fold DRM_AMD_DC_DCN3_1 into DRM_AMD_DC_DCN
...
No need for a separate flag now that DCN3.1 is not in bring up.
Fold into DRM_AMD_DC_DCN like previous DCN IPs.
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-22 16:51:45 -04:00
Bernard Zhao
519424d776
drm/radeon: delete useless function return values & remove meaningless if(r) check code
...
Function radeon_fence_driver_init always returns success,
the function type maybe coule be changed to void.
This patch first delete the check of the return
value of the function call radeon_fence_driver_init, then,
optimise the function declaration and function to void type.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Bernard Zhao <bernard@vivo.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-22 16:51:45 -04:00
Aric Cyr
a7268cf9a4
drm/amd/display: 3.2.141
...
Signed-off-by: Aric Cyr <aric.cyr@amd.com >
Acked-by: Bindu Ramamurthy <bindu.r@amd.com >
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-22 16:51:45 -04:00
Anthony Koo
021eaef8ae
drm/amd/display: [FW Promotion] Release 0.0.71
...
- Introduce CMD for EDID CEA block parsing
- Add SCR5 definition for reporting eDP power sequencer status
Signed-off-by: Anthony Koo <Anthony.Koo@amd.com >
Acked-by: Bindu Ramamurthy <bindu.r@amd.com >
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-22 16:51:45 -04:00
Josip Pavic
7335d95659
drm/amd/display: do not compare integers of different widths
...
[Why & How]
Increase width of some variables to avoid comparing integers of
different widths
Signed-off-by: Josip Pavic <Josip.Pavic@amd.com >
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com >
Acked-by: Bindu Ramamurthy <bindu.r@amd.com >
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-22 16:51:44 -04:00
Stylon Wang
715bfff397
drm/amd/display: Revert "Guard ASSR with internal display flag"
...
This reverts commit 9127daa0a8 .
[Why]
1. Previous patch regresses on some embedded panels.
2. Project coreboot doesn't support passing of internal display flag.
[How]
This reverts "Guard ASSR with internal display flag" commit.
Fixes: 9127daa0a8 ("drm/amd/display: Guard ASSR with internal display flag")
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1620
Signed-off-by: Stylon Wang <stylon.wang@amd.com >
Reviewed-by: Wesley Chalmers <Wesley.Chalmers@amd.com >
Acked-by: Bindu Ramamurthy <bindu.r@amd.com >
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: stable@vger.kernel.org
2021-06-22 16:45:10 -04:00
Logush Oliver
eeb90e26ed
drm/amd/display: Fix edp_bootup_bl_level initialization issue
...
[why]
Updating the file to fix the missing line
Signed-off-by: Logush Oliver <ollogush@amd.com >
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com >
Acked-by: Bindu Ramamurthy <bindu.r@amd.com >
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-21 17:45:15 -04:00
Charlene Liu
452c76dfd2
drm/amd/display: get refclk from MICROSECOND_TIME_BASE_DIV HW register
...
[why]
recent VBIOS dce_infotable reference clock change caused a I2c regression.
instead of relying on vbios, let's get it from HW directly.
Signed-off-by: Charlene Liu <Charlene.Liu@amd.com >
Reviewed-by: Chris Park <Chris.Park@amd.com >
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com >
Acked-by: Bindu Ramamurthy <bindu.r@amd.com >
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-21 17:45:14 -04:00
Roman Li
1a365683d6
drm/amd/display: Delay PSR entry
...
[Why]
After panel power up, if PSR entry attempted too early,
PSR state may get stuck in transition.
This could happen if the panel is not ready
to respond to the SDP PSR entry message.
In this case dmub f/w is unable to abort PSR entry
since abortion is not permitted after the SDP has been sent.
[How]
Skip 5 pageflips before PSR enable.
Signed-off-by: Roman Li <roman.li@amd.com >
Reviewed-by: Hersen Wu <hersenxs.wu@amd.com >
Acked-by: Bindu Ramamurthy <bindu.r@amd.com >
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-21 17:45:14 -04:00
Aurabindo Pillai
9253e11503
drm/amd/display: get socBB from VBIOS for dcn302 and dcn303
...
[why]
Some SOC BB paramters may vary per SKU, and it does
not make sense for driver to hardcode these values.
This change was added for dcn30 and dcn301, but not
for dcn302 and dcn303
[how]
Parse the values from VBIOS if available, and use
them if valid
Fixes: 93669c8e48 ("drm/amd/display: get socBB from VBIOS")
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com >
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Bindu Ramamurthy <bindu.r@amd.com >
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-21 17:45:14 -04:00