Alexander Stein
f8593120e3
drm/bridge: sii902x: Use dev_err_probe
...
This helps figuring out why the device probe is deferred.
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com >
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com >
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20230117105903.2068235-1-alexander.stein@ew.tq-group.com
2023-01-19 08:41:41 +01:00
Wadim Egorov
5688ca3469
drm/bridge: sii902x: Allow reset line to be tied to a sleepy GPIO controller
...
Switch to gpiod_set_value_cansleep() in sii902x_reset().
This is relevant if the reset line is tied to a I2C GPIO
controller.
Signed-off-by: Wadim Egorov <w.egorov@phytec.de >
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com >
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20221228145704.939801-1-w.egorov@phytec.de
2023-01-19 08:39:43 +01:00
Richard Acayan
9402cde934
drm/panel: vtdr6130: Use 16-bit brightness function
...
This panel communicates brightness in big endian. This is not a quirk of
the panels themselves, but rather, a part of the MIPI standard. Use the
new mipi_dsi_dcs_set_display_brightness_large() function that properly
handles 16-bit brightness instead of bypassing the brightness functions
entirely.
Signed-off-by: Richard Acayan <mailingradian@gmail.com >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Tested-by: Neil Armstrong <neil.armstrong@linaro.org > # on SM8550-MTP
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20230116224909.23884-4-mailingradian@gmail.com
2023-01-19 08:21:57 +01:00
Richard Acayan
fd40749a4f
drm/panel: sofef00: Use 16-bit brightness function
...
These panels communicate brightness in big endian. This is not a quirk
of the panels themselves, but rather, a part of the MIPI standard. Use
the new mipi_dsi_dcs_set_display_brightness_large() function that
properly handles 16-bit brightness instead of doing special processing
of the brightness values.
Signed-off-by: Richard Acayan <mailingradian@gmail.com >
Tested-by: Caleb Connolly <caleb@connolly.tech >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20230116224909.23884-3-mailingradian@gmail.com
2023-01-19 08:21:57 +01:00
Daniel Mentz
c9d27c6be5
drm/mipi-dsi: Fix byte order of 16-bit DCS set/get brightness
...
The MIPI DCS specification demands that brightness values are sent in
big endian byte order. It also states that one parameter (i.e. one byte)
shall be sent/received for 8 bit wide values, and two parameters shall
be used for values that are between 9 and 16 bits wide.
Add new functions to properly handle 16-bit brightness in big endian,
since the two 8- and 16-bit cases are distinct from each other.
[richard: use separate functions instead of switch/case]
[richard: split into 16-bit component]
Fixes: 1a9d759331 ("drm/dsi: Implement DCS set/get display brightness")
Signed-off-by: Daniel Mentz <danielmentz@google.com >
Link: 754affd62d
[richard: fix 16-bit brightness_get]
Signed-off-by: Richard Acayan <mailingradian@gmail.com >
Tested-by: Caleb Connolly <caleb@connolly.tech >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20230116224909.23884-2-mailingradian@gmail.com
2023-01-19 08:21:56 +01:00
Lang Yu
25959dd67d
drm/amdgpu: allow multipipe policy on ASICs with one MEC
...
Always enable multipipe policy on ASICs with GC VERSION > 9.0.0
instead of MEC number > 1.
This will allow multipipe policy on ASICs with one MEC,
e.g., gfx11 APUs.
Signed-off-by: Lang Yu <Lang.Yu@amd.com >
Reviewed-by: Aaron Liu <aaron.liu@amd.com >
Reviewed-by: Yifan Zhang <yifan1.zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-01-18 22:48:49 -05:00
Lang Yu
99761aaa1c
drm/amdgpu: correct MEC number for gfx11 APUs
...
There is only one MEC on these APUs.
Signed-off-by: Lang Yu <Lang.Yu@amd.com >
Reviewed-by: Aaron Liu <aaron.liu@amd.com >
Reviewed-by: Yifan Zhang <yifan1.zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-01-18 22:48:41 -05:00
Hamza Mahfooz
0feeb4fd4c
drm/amd/display: fix issues with driver unload
...
Currently, we run into a number of WARN()s when attempting to unload the
amdgpu driver (e.g. using "modprobe -r amdgpu"). These all stem from
calling drm_encoder_cleanup() too early. So, to fix this we can stop
calling drm_encoder_cleanup() from amdgpu_dm_fini() and instead have it
be called from amdgpu_dm_encoder_destroy(). Also, we don't need to free
in amdgpu_dm_encoder_destroy() since mst_encoders[] isn't explicitly
allocated by the slab allocator.
Fixes: f74367e492 ("drm/amdgpu/display: create fake mst encoders ahead of time (v4)")
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-01-18 22:46:33 -05:00
Guilherme G. Piccoli
09eb3ea391
drm/amdgpu/vcn: Remove redundant indirect SRAM HW model check
...
The HW model validation that guards the indirect SRAM checking in the
VCN code path is redundant - there's no model that's not included in the
switch, making it useless in practice [0].
So, let's remove this switch statement for good.
[0] lore.kernel.org/amd-gfx/MN0PR12MB61013D20B8A2263B22AE1BCFE2C19@MN0PR12MB6101.namprd12.prod.outlook.com
Suggested-by: Alex Deucher <Alexander.Deucher@amd.com >
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com >
Cc: James Zhu <James.Zhu@amd.com >
Cc: Lazar Lijo <Lijo.Lazar@amd.com >
Cc: Leo Liu <leo.liu@amd.com >
Cc: Sonny Jiang <sonny.jiang@amd.com >
Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-01-18 22:46:27 -05:00
Guilherme G. Piccoli
2ed9e22ed7
drm/amdgpu/vcn: Adjust firmware names indentation
...
This is an incredibly trivial fix, just for the sake of
"aesthetical" organization of the defines. Some were space based,
most were tab based and there was a lack of "alignment", now it's
all the same and aligned.
Cc: James Zhu <James.Zhu@amd.com >
Cc: Lazar Lijo <Lijo.Lazar@amd.com >
Cc: Leo Liu <leo.liu@amd.com >
Cc: Mario Limonciello <mario.limonciello@amd.com >
Cc: Sonny Jiang <sonny.jiang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-01-18 22:46:13 -05:00
Deepak R Varma
24d97468f4
drm/i915/display: Convert i9xx_pipe_crc_auto_source to void
...
Convert function i9xx_pipe_crc_auto_source() to return void instead
of int since the current implementation always returns 0 to the caller.
Issue identified using returnvar Coccinelle semantic patch.
$ make coccicheck COCCI=scripts/coccinelle/misc/returnvar.cocci \
M=drivers/gpu/drm/i915/
Signed-off-by: Deepak R Varma <drv@mailo.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/Y8K2SS/zNiPAmLsS@ubun2204.myguest.virtualbox.org
2023-01-18 11:33:04 -05:00
Christian König
13acb368bf
drm/ttm/vmwgfx: move ttm_bo_wait into VMWGFX
...
Not used anymore by other drivers or TTM itself.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Zack Rusin <zackr@vmware.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20221125102137.1801-9-christian.koenig@amd.com
2023-01-18 15:57:52 +01:00
Christian König
41d351f295
drm/nouveau: stop using ttm_bo_wait
...
TTM is just wrapping core DMA functionality here, remove the mid-layer.
No functional change.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Karol Herbst <kherbst@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20221125102137.1801-5-christian.koenig@amd.com
2023-01-18 15:57:52 +01:00
Dmitry Baryshkov
5e83f359d9
drm/bridge: lt9611: properly program the dual host mode
...
If the bridge is connected using both DSI ports, the driver should use
both of them all the time. Correct programming sequence to always use
dual-port mode if both dsi0 and dsi1 are connected.
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20230118081658.2198520-14-dmitry.baryshkov@linaro.org
2023-01-18 15:27:10 +01:00
Dmitry Baryshkov
4914cbc4fb
drm/bridge: lt9611: stop filtering modes via the table
...
The lt9611 bridge can support different modes, it makes no sense to list
them in the table. Drop the table and check the number of interfaces
using the fixed value.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20230118081658.2198520-13-dmitry.baryshkov@linaro.org
2023-01-18 15:27:09 +01:00
Dmitry Baryshkov
84cf74d99f
drm/bridge: lt9611: rework infoframes handling
...
Rework handling infoframes:
- Write full HDMI AVI infoframe instead of just fixing the VIC value
- Also send the HDMI Vendor Specific infoframe, as recommended by the
HDMI spec.
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20230118081658.2198520-12-dmitry.baryshkov@linaro.org
2023-01-18 15:27:09 +01:00
Dmitry Baryshkov
6b089d5e35
drm/bridge: lt9611: simplify video timings programming
...
Inline calculated values to simplify the calculation in
lt9611_mipi_video_setup().
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20230118081658.2198520-11-dmitry.baryshkov@linaro.org
2023-01-18 15:27:09 +01:00
Dmitry Baryshkov
0c74746948
drm/bridge: lt9611: fix sync polarity for DVI output
...
Attaching DVI sink to the lt9611 requires different setup. Fix the
register write to make the DVI displays sync onto the correct sync
pulse.
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20230118081658.2198520-10-dmitry.baryshkov@linaro.org
2023-01-18 15:27:08 +01:00
Dmitry Baryshkov
0c3997b0fe
drm/bridge: lt9611: attach to the next bridge
...
The bindings require that there is a next bridge after the lt9611. If
nothing else it can be the hdmi-connector (as used on the RB3 platform,
see sdm845-db845c.dts).
Bring in the next bridge into the drm bridges chain and attach to it.
Since lt9611 is not anymore the last bridge in the chain, this also
allows us to drop all the !DRM_BRIDGE_ATTACH_NO_CONNECTOR functionality.
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20230118081658.2198520-9-dmitry.baryshkov@linaro.org
2023-01-18 15:27:08 +01:00
Dmitry Baryshkov
fad97f2811
drm/bridge: lt9611: rework the mode_set function
...
The mode_set callback is deprectated for drm_bridges in favour of using
atomic_enable callback. Move corresponding code into the function
lt9611_bridge_atomic_enable() and turn lt9611_bridge_pre_enable() into
the proper atomic_pre_enable callback.
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20230118081658.2198520-8-dmitry.baryshkov@linaro.org
2023-01-18 15:27:07 +01:00
Dmitry Baryshkov
b0a7f87367
drm/bridge: lt9611: pass a pointer to the of node
...
Pass a pointer to the OF node while registering lt9611 MIPI device.
Fixes: 23278bf54a ("drm/bridge: Introduce LT9611 DSI to HDMI bridge")
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20230118081658.2198520-7-dmitry.baryshkov@linaro.org
2023-01-18 15:27:07 +01:00
Dmitry Baryshkov
2576eb2649
drm/bridge: lt9611: fix clock calculation
...
Instead of having several fixed values for the pcr register, calculate
it before programming. This allows the bridge to support most of the
display modes.
Fixes: 23278bf54a ("drm/bridge: Introduce LT9611 DSI to HDMI bridge")
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20230118081658.2198520-6-dmitry.baryshkov@linaro.org
2023-01-18 15:27:06 +01:00
Dmitry Baryshkov
ad188aa47e
drm/bridge: lt9611: fix programming of video modes
...
Program the upper part of the hfront_porch into the proper register.
Fixes: 23278bf54a ("drm/bridge: Introduce LT9611 DSI to HDMI bridge")
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20230118081658.2198520-5-dmitry.baryshkov@linaro.org
2023-01-18 15:27:06 +01:00
Dmitry Baryshkov
0b157efa38
drm/bridge: lt9611: fix polarity programming
...
Fix programming of hsync and vsync polarities
Fixes: 23278bf54a ("drm/bridge: Introduce LT9611 DSI to HDMI bridge")
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20230118081658.2198520-4-dmitry.baryshkov@linaro.org
2023-01-18 15:27:05 +01:00
Dmitry Baryshkov
a7790f6bd3
drm/bridge: lt9611: fix HPD reenablement
...
The driver will reset the bridge in the atomic_pre_enable(). However
this will also drop the HPD interrupt state. Instead of resetting the
bridge, properly wake it up. This fixes the HPD interrupt delivery after
the disable/enable cycle.
Fixes: 23278bf54a ("drm/bridge: Introduce LT9611 DSI to HDMI bridge")
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20230118081658.2198520-3-dmitry.baryshkov@linaro.org
2023-01-18 15:27:05 +01:00
Dmitry Baryshkov
ae2d329f10
drm/bridge: lt9611: fix sleep mode setup
...
On atomic_post_disable the bridge goes to the low power state. However
the code disables too much of the chip, so the HPD event is not being
detected and delivered to the host. Reduce the power saving in order to
get the HPD event.
Fixes: 23278bf54a ("drm/bridge: Introduce LT9611 DSI to HDMI bridge")
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20230118081658.2198520-2-dmitry.baryshkov@linaro.org
2023-01-18 15:27:04 +01:00
Christian König
5efbe6aa7a
drm/scheduler: deprecate drm_sched_resubmit_jobs
...
This interface is not working as it should.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20221109095010.141189-5-christian.koenig@amd.com
2023-01-18 12:46:52 +01:00
Christian König
cb3076e932
drm/scheduler: cleanup define
...
Remove some not implemented function define
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20221109095010.141189-4-christian.koenig@amd.com
2023-01-18 12:46:16 +01:00
Jani Nikula
e2855f8e91
drm/i915: move chv_dpll_md and bxt_phy_grc to display sub-struct under state
...
Move the display related members to the struct drm_i915_private display
sub-struct. Put them under "state", as they are related to storing
values that aren't readable from the hardware, to appease the state
checker.
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230117143946.2426043-3-jani.nikula@intel.com
2023-01-18 12:17:19 +02:00
Jani Nikula
a3f839762c
drm/i915: move pch_ssc_use to display sub-struct under dpll
...
Move the display related member to the struct drm_i915_private display
sub-struct.
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230117143946.2426043-2-jani.nikula@intel.com
2023-01-18 12:17:14 +02:00
Jani Nikula
3a7e2d58f8
drm/i915: move snps_phy_failed_calibration to display sub-struct under snps
...
Move the display related member to the struct drm_i915_private display
sub-struct.
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230117143946.2426043-1-jani.nikula@intel.com
2023-01-18 12:17:03 +02:00
Jani Nikula
378e04f7cb
drm/i915: remove a couple of superfluous i915_drm.h includes
...
Remove a couple of unnecessary includes.
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230117123856.2271720-1-jani.nikula@intel.com
2023-01-18 11:55:08 +02:00
Jani Nikula
e54051782e
drm/i915: drop cast from DEFINE_RES_MEM() usage
...
Since commit 52c4d11f1d ("resource: Convert DEFINE_RES_NAMED() to be
compound literal") it's no longer necessary to cast DEFINE_RES_MEM() to
struct resource.
This also fixes sparse warnings "cast from non-scalar" and "cast to
non-scalar".
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230116173422.1858527-2-jani.nikula@intel.com
2023-01-18 11:45:23 +02:00
Jani Nikula
1eca0778f4
drm/i915: add struct i915_dsm to wrap dsm members together
...
Wrap the stolen memory related struct drm_i915_private members (dsm,
dsm_reserved, and stolen_usable_size) together in a a new struct
i915_dsm.
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230116173422.1858527-1-jani.nikula@intel.com
2023-01-18 11:45:13 +02:00
Chris Wilson
14ec40a882
drm/i915/selftests: Unwind hugepages to drop wakeref on error
...
Make sure that upon error after we have acquired the wakeref we do
release it again.
v2: add another missing "goto out_wf"(Andi).
Fixes: 027c38b412 ("drm/i915/selftests: Grab the runtime pm in shrink_thp")
Cc: Andi Shyti <andi.shyti@linux.intel.com >
Reviewed-by: Matthew Auld <matthew.auld@intel.com >
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com >
Signed-off-by: Chris Wilson <chris.p.wilson@linux.intel.com >
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com >
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com >
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com >
Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230117123234.26487-1-nirmoy.das@intel.com
2023-01-18 10:16:50 +01:00
Jani Nikula
1af13bc6d0
drm/i915/vblank: add and use intel_de_read64_2x32() to read vblank counter
...
Add intel_de_read64_2x32() wrapper for the uncore version of the same,
and use it to read the high and low frame registers. Avoid duplicating
code for existing helpers.
The slight functional difference is checking that the entire high
register remains the same across two reads, instead of just the part
we're interested in. This should be of no consequence. (Unless those
bits function as a PRNG.)
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/33853549adff82045b95af527e14cfdff5712470.1673873708.git.jani.nikula@intel.com
2023-01-18 11:06:07 +02:00
Jani Nikula
75018f47ac
drm/i915/vblank: use intel_de_read()
...
Use the intel_de_* functions for display registers.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/ecfac5ebddcb46be1ddf2e34e52648fbf9fa4ca6.1673873708.git.jani.nikula@intel.com
2023-01-18 11:06:04 +02:00
Jani Nikula
e8adda5187
drm/i915/display: use common function for checking scanline is moving
...
cpt_verify_modeset() is roughly the same as
intel_wait_for_pipe_scanline_moving(). Assume it's close enough.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/bf26763caaad25f3dfcf6f8e468421f93fb99646.1673873708.git.jani.nikula@intel.com
2023-01-18 11:05:58 +02:00
Jani Nikula
61a0e794ed
drm/i915/display: move more scanline functions to intel_vblank.[ch]
...
Reduce clutter in intel_display.c by moving the scanline moving/stopped
wait functions to intel_vblank.[ch].
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/3613b8c22e5022ebf61ab942e6bc81b717e8f520.1673873708.git.jani.nikula@intel.com
2023-01-18 11:05:55 +02:00
Jani Nikula
62fe4515cf
drm/i915/irq: split out vblank/scanline code to intel_vblank.[ch]
...
The vblank/scanline code is fairly isolated in i915_irq.c. Split it out
to new intel_vblank.[ch].
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/3e3e9016f5135dccae5110c291ba048567622e7a.1673873708.git.jani.nikula@intel.com
2023-01-18 11:05:41 +02:00
Nirmoy Das
30e94ff769
drm_print: Remove deprecated DRM_DEBUG_KMS_RATELIMITED()
...
There are no current users of DRM_DEBUG_KMS_RATELIMITED()
so remove it.
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Maxime Ripard <mripard@kernel.org >
Cc: Thomas Zimmermann <tzimmermann@suse.de >
Cc: David Airlie <airlied@gmail.com >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230117180417.21066-2-nirmoy.das@intel.com
Signed-off-by: Christian König <christian.koenig@amd.com >
2023-01-18 10:00:33 +01:00
Nirmoy Das
6c57263763
drm/radeon: Do not use deprecated drm log API
...
Replace deprecated DRM_DEBUG_KMS_RATELIMITED() and DRM_ERROR()
with proper APIs.
v2: replace pr_err with dev_err(Alex).
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: Christian König <christian.koenig@amd.com >
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230117180417.21066-1-nirmoy.das@intel.com
Signed-off-by: Christian König <christian.koenig@amd.com >
2023-01-18 10:00:03 +01:00
Thomas Zimmermann
21fe352fa0
drm/crtc-helper: Remove most include statements from drm_crtc_helper.h
...
Remove most include statements from crm_crtc_helper.h and forward-
declare the contained types in drm_crtc_helper.h. Only keep <linux/types.h>
for the definition of 'bool'.
Suggested-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Jani Nikula <jani.nikula@intel.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230116131235.18917-23-tzimmermann@suse.de
2023-01-18 09:25:32 +01:00
Thomas Zimmermann
ad2a3bef13
drm/vboxvideo: Remove unnecessary include statements for drm_crtc_helper.h
...
Several source files include drm_crtc_helper.h without needing it or
only to get its transitive include statements; leading to unnecessary
compile-time dependencies.
Directly include required headers and drop drm_crtc_helper.h where
possible.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Jani Nikula <jani.nikula@intel.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230116131235.18917-22-tzimmermann@suse.de
2023-01-18 09:25:32 +01:00
Thomas Zimmermann
a47171f083
drm/udl: Remove unnecessary include statements for drm_crtc_helper.h
...
Several source files include drm_crtc_helper.h without needing it or
only to get its transitive include statements; leading to unnecessary
compile-time dependencies.
Directly include required headers and drop drm_crtc_helper.h where
possible.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Jani Nikula <jani.nikula@intel.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230116131235.18917-21-tzimmermann@suse.de
2023-01-18 09:25:32 +01:00
Thomas Zimmermann
a391a98989
drm/tidss: Remove unnecessary include statements for drm_crtc_helper.h
...
Several source files include drm_crtc_helper.h without needing it or
only to get its transitive include statements; leading to unnecessary
compile-time dependencies.
Directly include required headers and drop drm_crtc_helper.h where
possible.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Jani Nikula <jani.nikula@intel.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230116131235.18917-20-tzimmermann@suse.de
2023-01-18 09:25:32 +01:00
Thomas Zimmermann
7fe3ead722
drm/sun4i: Remove unnecessary include statements for drm_crtc_helper.h
...
Several source files include drm_crtc_helper.h without needing it or
only to get its transitive include statements; leading to unnecessary
compile-time dependencies.
Directly include required headers and drop drm_crtc_helper.h where
possible.
v2:
* keep includes sorted (Sam)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Jani Nikula <jani.nikula@intel.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230116131235.18917-19-tzimmermann@suse.de
2023-01-18 09:25:32 +01:00
Thomas Zimmermann
e825f56c4e
drm/sprd: Remove unnecessary include statements for drm_crtc_helper.h
...
Several source files include drm_crtc_helper.h without needing it or
only to get its transitive include statements; leading to unnecessary
compile-time dependencies.
Drop drm_crtc_helper.h where possible.
v2:
* update commit message (Sam)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Jani Nikula <jani.nikula@intel.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230116131235.18917-18-tzimmermann@suse.de
2023-01-18 09:25:32 +01:00
Thomas Zimmermann
62e4400613
drm/shmobile: Remove unnecessary include statements for drm_crtc_helper.h
...
Several source files include drm_crtc_helper.h without needing it or
only to get its transitive include statements; leading to unnecessary
compile-time dependencies.
Directly include required headers and drop drm_crtc_helper.h where
possible.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Jani Nikula <jani.nikula@intel.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230116131235.18917-17-tzimmermann@suse.de
2023-01-18 09:25:32 +01:00
Thomas Zimmermann
7c23598d02
drm/rockchip: Remove unnecessary include statements for drm_crtc_helper.h
...
Several source files include drm_crtc_helper.h without needing it or
only to get its transitive include statements; leading to unnecessary
compile-time dependencies.
Drop drm_crtc_helper.h where possible.
v2:
* update commit message (Sam)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Jani Nikula <jani.nikula@intel.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230116131235.18917-16-tzimmermann@suse.de
2023-01-18 09:25:31 +01:00