Jouni Högander
16b65af8b7
drm/i915/display: Selective fetch Y position on Region Early Transport
...
Selective fetch Y position differs when Region Early Transport is
used. Use formula from Bspec for this.
Bspec: 68927
Reviewed-by: Animesh Manna <animesh.manna@intel.com >
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240529093849.1016172-5-jouni.hogander@intel.com
2024-06-03 11:22:58 +03:00
Jouni Högander
0a8c581ce0
drm/i915/psr: Use enable boolean from intel_crtc_state for Early Transport
...
When enabling Early Transport use
intel_crtc_state->enable_psr2_su_region_et instead of
psr2_su_region_et_valid.
Reviewed-by: Animesh Manna <animesh.manna@intel.com >
Fixes: 467e4e061c ("drm/i915/psr: Enable psr2 early transport as possible")
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240529093849.1016172-4-jouni.hogander@intel.com
2024-06-03 11:22:49 +03:00
Jouni Högander
13d1359d67
drm/i915/psr: Get Early Transport status in intel_psr_pipe_get_config
...
We are currently not getting Early Transport status information in
intel_psr_pipe_get_config. Fix this.
Reviewed-by: Animesh Manna <animesh.manna@intel.com >
Fixes: 467e4e061c ("drm/i915/psr: Enable psr2 early transport as possible")
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240529093849.1016172-3-jouni.hogander@intel.com
2024-06-03 11:22:38 +03:00
Jouni Högander
0e3771f459
drm/i915/psr: Add Early Transport status boolean into intel_psr
...
Currently we are purely relying on psr2_su_region_et_valid. Add new boolean
value into intel_psr struct indicating whether Early Transport is enabled
or not and use it instead of psr2_su_region_et_valid for getting Early
Transport status information.
Reviewed-by: Animesh Manna <animesh.manna@intel.com >
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240529093849.1016172-2-jouni.hogander@intel.com
2024-06-03 11:22:04 +03:00
Jani Nikula
3acbde3e9e
drm: move i915_hdcp_interface.h under include/drm/intel
...
Clean up the top level include/drm directory by grouping all the Intel
specific files under a common subdirectory.
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: Dave Airlie <airlied@gmail.com >
Cc: Lucas De Marchi <lucas.demarchi@intel.com >
Cc: Tomas Winkler <tomas.winkler@intel.com >
Acked-by: Lucas De Marchi <lucas.demarchi@intel.com >
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/5f53384118e33123d3c87b94cc8835360237698b.1717075103.git.jani.nikula@intel.com
2024-05-31 16:11:36 +03:00
Jani Nikula
aef8dc4398
drm: move i915_pciids.h under include/drm/intel
...
Clean up the top level include/drm directory by grouping all the Intel
specific files under a common subdirectory.
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: Dave Airlie <airlied@gmail.com >
Cc: Lucas De Marchi <lucas.demarchi@intel.com >
Cc: Bjorn Helgaas <bhelgaas@google.com >
Acked-by: Lucas De Marchi <lucas.demarchi@intel.com >
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/a19cebc0f03588b9627dcaaebe69a9fef28c27f0.1717075103.git.jani.nikula@intel.com
2024-05-31 16:11:29 +03:00
Jani Nikula
cce3819a5f
drm: move i915_pxp_tee_interface.h under include/drm/intel
...
Clean up the top level include/drm directory by grouping all the Intel
specific files under a common subdirectory.
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: Dave Airlie <airlied@gmail.com >
Cc: Lucas De Marchi <lucas.demarchi@intel.com >
Cc: Tomas Winkler <tomas.winkler@intel.com >
Acked-by: Lucas De Marchi <lucas.demarchi@intel.com >
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/5c1626978d2552ef5732dcf9427c903046afb9c1.1717075103.git.jani.nikula@intel.com
2024-05-31 16:11:25 +03:00
Jani Nikula
03c7918d0d
drm: move i915_drm.h under include/drm/intel
...
Clean up the top level include/drm directory by grouping all the Intel
specific files under a common subdirectory.
v2: Also fix comment in intel_pci_config.h (Ilpo)
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: Dave Airlie <airlied@gmail.com >
Cc: Lucas De Marchi <lucas.demarchi@intel.com >
Cc: Bjorn Helgaas <bhelgaas@google.com >
Cc: Hans de Goede <hdegoede@redhat.com >
Cc: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Acked-by: Lucas De Marchi <lucas.demarchi@intel.com >
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/0e344a72e9be596ac2b8b55a26fd674a96f03cdc.1717075103.git.jani.nikula@intel.com
2024-05-31 16:11:09 +03:00
Jani Nikula
a1ed6865df
drm: move intel_lpe_audio.h under include/drm/intel
...
Clean up the top level include/drm directory by grouping all the Intel
specific files under a common subdirectory.
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: Dave Airlie <airlied@gmail.com >
Cc: Lucas De Marchi <lucas.demarchi@intel.com >
Cc: Jaroslav Kysela <perex@perex.cz >
Cc: Takashi Iwai <tiwai@suse.com >
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com >
Acked-by: Lucas De Marchi <lucas.demarchi@intel.com >
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/2d645970a65cfd13e01fd8195b35bf9483ae9c2f.1717075103.git.jani.nikula@intel.com
2024-05-31 16:11:05 +03:00
Jani Nikula
1bb01bdab0
drm: move i915_component.h under include/drm/intel
...
Clean up the top level include/drm directory by grouping all the Intel
specific files under a common subdirectory.
v2: Also change Documentation/gpu/i915.rst (Andi)
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: Dave Airlie <airlied@gmail.com >
Cc: Lucas De Marchi <lucas.demarchi@intel.com >
Cc: Tomas Winkler <tomas.winkler@intel.com >
Cc: Jaroslav Kysela <perex@perex.cz >
Cc: Takashi Iwai <tiwai@suse.com >
Acked-by: Lucas De Marchi <lucas.demarchi@intel.com >
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/a8c07233a8234858eb6711140482ef8db4c91cf4.1717075103.git.jani.nikula@intel.com
2024-05-31 16:11:00 +03:00
Jani Nikula
0706d57100
drm: move i915_gsc_proxy_mei_interface.h under include/drm/intel
...
Clean up the top level include/drm directory by grouping all the Intel
specific files under a common subdirectory.
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: Dave Airlie <airlied@gmail.com >
Cc: Lucas De Marchi <lucas.demarchi@intel.com >
Cc: Tomas Winkler <tomas.winkler@intel.com >
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com >
Acked-by: Lucas De Marchi <lucas.demarchi@intel.com >
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/461662d528c3f327c81b764b7c883cd4519d8729.1717075103.git.jani.nikula@intel.com
2024-05-31 16:10:56 +03:00
Jani Nikula
05255ccbf1
drm: move intel-gtt.h under include/drm/intel
...
Clean up the top level include/drm directory by grouping all the Intel
specific files under a common subdirectory.
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: Dave Airlie <airlied@gmail.com >
Cc: Lucas De Marchi <lucas.demarchi@intel.com >
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com >
Acked-by: Lucas De Marchi <lucas.demarchi@intel.com >
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/ae224504d99cc6428da6dced9dcde2b7953624ef.1717075103.git.jani.nikula@intel.com
2024-05-31 16:10:50 +03:00
Jani Nikula
b95702e275
drm/i915: reduce includes in intel_clock_gating.c
...
With the refactoring in the file, some excessive includes were left
behind and are now unnecessary. Remove.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240530100747.328631-2-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-31 15:51:26 +03:00
Jani Nikula
b156a3e9bf
drm/i915: drop unnecessary i915_reg.h includes
...
With the register header refactoring, some of the includes of i915_reg.h
have become unnecessary. Remove.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240530100747.328631-1-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-31 15:51:18 +03:00
Jani Nikula
f8e1c8f5b0
drm/i915: remove intermediate _PCH_DP_* macros
...
The intermediate macros are unused. Remove them.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/0145043ff9767de93cc3dc5119f0e7152965ebe6.1716894910.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-31 15:39:16 +03:00
Jani Nikula
4adb24f734
drm/i915: move PCH DP AUX CH regs to intel_dp_aux_regs.h
...
Move the macros where they belong.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/9bc3a7bb34edc5dc17ffcb2a9e64edcef8c7a7b8.1716894910.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-31 15:39:16 +03:00
Jani Nikula
dd7d72c9a4
drm/i915: rearrange DP AUX register macros
...
Follow the recommended style for grouping register macros.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/8ace710d8a1edac7e1af1ed12122fb6bc68114e9.1716894910.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-31 15:39:16 +03:00
Jani Nikula
eccd1dbc49
drm/i915: remove unused DP AUX CH register macros
...
The intermediate macros are no longer needed.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/c97134b22d802ae82b19c299b79807ee60d9fae5.1716894909.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-31 15:39:16 +03:00
Jani Nikula
68cc33f613
drm/i915/gvt: use proper macros for DP AUX CH CTL registers
...
Use the proper helpers for DP AUX CH CTL registers, instead of
reinventing the wheels.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/f30d35f28ef106d6fb2faf100fe1c5e3a42dfa20.1716894909.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-31 15:39:16 +03:00
Ville Syrjälä
d3e80f2dcf
drm/i915: Switch intel_usecs_to_scanlines() to 64bit maths
...
Dotclocks can reach ~1GHz these days, so intel_usecs_to_scanlines(),
with its 32bit maths, is currently limited to a few milliseconds.
I want bigger numbers in DSB selftests, so switch over to 64bit
maths.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240528185647.7765-7-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2024-05-31 13:43:56 +03:00
Ville Syrjälä
5b7f65acf1
drm/i915: Move intel_crtc_scanline_offset()
...
I want to use intel_crtc_scanline_offset() in
intel_crtc_scanline_to_hw(). Relocate intel_crtc_scanline_offset()
a bit to avoid a forward declaration.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240528185647.7765-6-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2024-05-31 13:43:39 +03:00
Ville Syrjälä
5316dd0d61
drm/i915: Simplify scanline_offset handling for gen2
...
Currently intel_crtc_scanline_offset() is careful to always
return a positive offset. That is not actually necessary
as long as we take care of negative values when applying the
offset in __intel_get_crtc_scanline().
This simplifies intel_crtc_scanline_offset(), and makes
the scanline_offfset arithmetic more symmetric between
the forward (__intel_get_crtc_scanline()) and reverse
(intel_crtc_scanline_to_hw()) directions.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240528185647.7765-5-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2024-05-31 13:43:15 +03:00
Ville Syrjälä
9677dd01ca
drm/i915: Extract intel_mode_vtotal()
...
We have several copies of code calculating the hardware's
idea of vtotal. Pull that to a helper, similar to
intel_mode_vblank_{start,end}().
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240528185647.7765-4-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2024-05-31 13:42:46 +03:00
Ville Syrjälä
1fea297844
drm/i915: Extract intel_mode_vblank_end()
...
Extract intel_mode_vblank_end() in the same vein as
intel_mode_vblank_start(). While we have only one use
of this it seems nicer to unify the approach.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240528185647.7765-3-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2024-05-31 13:42:20 +03:00
Ville Syrjälä
edd27f8ee8
drm/i915: Reuse intel_mode_vblank_start()
...
Replace a few hand rolled copies of intel_mode_vblank_start() with
the real thing.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240528185647.7765-2-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2024-05-31 13:41:31 +03:00
Ville Syrjälä
b84641c0a1
drm/i915: Plumb the full atomic state into skl_ddb_add_affected_planes()
...
skl_ddb_add_affected_planes() needs the full atomic state. Instead
of digging that out from dubious sources plumb it in explicitly.
The wm counterpart (skl_wm_add_affected_planes()) already does
things in the proper way.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240528184945.24083-3-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2024-05-31 13:17:16 +03:00
Ville Syrjälä
5010375afa
drm/i915: Plumb the full atomic state into icl_check_nv12_planes()
...
icl_check_nv12_planes() needs the full atomic state. Instead of
digging that out from dubious sources plumb it in explicitly.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240528184945.24083-2-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2024-05-31 13:16:56 +03:00
Ville Syrjälä
4fab6b8b30
drm/i915/cdclk: Plumb the full atomic state deeper
...
Various parts of the cdclk code need access the full atomic
state. Currently it's being dug out via the cdclk_state->base.state
pointer, which is not great as that pointer isn't always valid.
Instead plumb the full atomic state from the top so that it's
clear that it is in fact valid.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240528184945.24083-1-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2024-05-31 13:15:20 +03:00
Jani Nikula
53d916d9a4
drm/i915/display: add probe message
...
Add an info message about which display device was probed.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/f9a4d015a2981ace2ef5b40b189efeaf6b18fb29.1716399081.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-31 10:13:25 +03:00
Jani Nikula
16b79b3397
drm/i915/display: add support for subplatforms
...
Add support for subplatforms. This is similar to what the xe driver is
doing. The subplatform is an enum and it's exclusive, i.e. only one
subplatform can match, and it completely identifies the platform and
subplatform. This is different from i915 core, and is notable in the
handling of ULT/ULX and RPL/RPL-U.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/8c04e32648395c0b745bc31a1edd4ef6f574bb70.1716399081.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-31 10:13:22 +03:00
Jani Nikula
b27259626a
drm/i915/display: identify platforms with enum and name
...
Add enum intel_display_platform and add that and name to all platform
descriptors.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/5dec70931217cd93e3ef34f7a57f949f6683f048.1716399081.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-31 10:13:19 +03:00
Jani Nikula
54836ee194
drm/i915/display: change display probe to identify GMD ID based platforms
...
We'll need to identify all platforms, including the ones that have
display defined by GMD ID. Add MTL and LNL. Their display info will
still be probed via GMD ID.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/e26f6a1a0aa2b051f49d76242194f819be3d83fd.1716399081.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-31 10:13:11 +03:00
Jani Nikula
785778ce21
drm/i915/display: add platform descriptors
...
We'll need to start identifying the platforms independently in display
code in order to break free from the i915 and xe IS_<PLATFORM>()
macros. This is fairly straightforward, as we already identify most
platforms by PCI ID in display probe anyway.
As the first step, add platform descriptors with pointers to display
info. We'll have more platforms than display info, so minimize
duplication:
- Add separate skl/kbl/cfl/cml descriptors while they share the display
info.
- Add separate jsl/ehl descriptors while they share the display info.
Identify ADL-P (and derivatives) and DG2 descriptors by their names even
though their display info is Xe LPD or HPD.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/45425c155608403efc149d4a022c0b443aa71200.1716399081.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-31 10:11:18 +03:00
Jani Nikula
fdf531b803
drm/i915/display: change GMD ID display ip ver propagation at probe
...
Add a name to the display ip version structure, and pass that around
instead of a triplet of u16's.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/1610e9f5675b4d0d4f16ecd10a86486ce309a283.1716399081.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-31 10:11:18 +03:00
Jani Nikula
cb9d05b9c2
drm/i915/display: check platforms without display one level higher
...
The main change here is that the check for platforms without display is
now also done for GMD ID based platforms. However, without matches, the
end result is the same.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/78d5d326c4c89f1942f120655c279c9274e96bfb.1716399081.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-31 10:11:18 +03:00
Jani Nikula
ae6daede02
drm/i915/display: change probe for no display case
...
Return NULL for errors, and handle the no display case in one
location. This will make subsequent changes easier.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/8dfac3532a72ca6494c9955987166d9c6e0919bd.1716399081.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-31 10:11:18 +03:00
Jani Nikula
54698865ad
drm/i915/display: move params copy at probe earlier
...
Copy the parameters earlier to make subsequent changes easier.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/a0c3e74d824d8a7c02fa1461c3d5518a71171256.1716399081.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-31 10:11:18 +03:00
Animesh Manna
42493f7cb2
drm/i915/alpm: Add debugfs for LOBF
...
For validation purpose add debugfs for LOBF.
v1: Initial version.
v2: Add aux-wake/less info along with lobf status. [Jouni]
Reviewed-by: Jouni Högander <jouni.hogander@intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240529200742.1694401-7-animesh.manna@intel.com
2024-05-31 10:56:03 +05:30
Animesh Manna
5a9b255fdb
drm/i915/alpm: Enable lobf from source in ALPM_CTL
...
Set the Link Off Between Frames Enable bit in ALPM_CTL register.
Note: Lobf need to be enabled adaptive sync fixed refresh mode
where vmin = vmax = flipline, which will arise after cmmr feature
enablement. Will add enabling sequence in a separate patch.
v1: Initial version.
v2: Condition check modified in alpm_configure(). [Jouni]
Reviewed-by: Jouni Högander <jouni.hogander@intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240529200742.1694401-6-animesh.manna@intel.com
2024-05-31 10:55:56 +05:30
Animesh Manna
15438b3259
drm/i915/alpm: Add compute config for lobf
...
Link Off Between Active Frames, is a new feature for eDP
that allows the panel to go to lower power state after
transmission of data. This is a feature on top of ALPM, AS SDP.
Add compute config during atomic-check phase.
v1: RFC version.
v2: Add separate flag for auxless-alpm. [Jani]
v3:
- intel_dp->lobf_supported replaced with crtc_state->has_lobf. [Jouni]
- Add DISPLAY_VER() check. [Jouni]
- Modify function name of get_aux_less_status. [Jani]
v4: Add enum alpm_mode to hold the aux-wake/less capability.
v5: Add alpm_dpcd to intel_dp and use aux_wake_supported()/
aux_less_wake_supported() instead of enum alpm_mode. [Jouni]
Reviewed-by: Jouni Högander <jouni.hogander@intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240529200742.1694401-5-animesh.manna@intel.com
2024-05-31 10:55:50 +05:30
Animesh Manna
8bdbde7c4c
drm/i915/alpm: Move alpm related code to a new file
...
Move ALPM feature related code as it will be used for
non-psr panel also thorugh LOBF feature.
v1: Initial version.
v2: Correct ordering in makefile. [Jani]
Reviewed-by: Jouni Högander <jouni.hogander@intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240529200742.1694401-3-animesh.manna@intel.com
2024-05-31 10:47:23 +05:30
Animesh Manna
dd73925e3b
drm/i915/alpm: Move alpm parameters from intel_psr
...
ALPM can be enabled for non psr panel and currenly aplm-params are
encapsulated under intel_psr struct, so moving out to intel_dp struct.
Reviewed-by: Jouni Högander <jouni.hogander@intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240529200742.1694401-2-animesh.manna@intel.com
2024-05-31 10:47:22 +05:30
Luca Coelho
ed43c40e1f
drm/i915: move uapi.event outside spinlock in intel_crtc_vblank_work
...
In intel_crtc_vblank_work(), we access uapi.event before grabbing the
event_lock spinlock, but modify it inside the spinlock block. This
causes some static analyzers to get confused and issue a warning.
The uapi.event value is not protected by the event_lock, so we can
safely move it out of the protected block to prevent false positives.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240528112901.476068-3-luciano.coelho@intel.com
2024-05-30 16:08:05 +05:30
Luca Coelho
b2c2f2df6f
drm/i915/bios: double check array-boundary in parse_sdvo_lvds_data
...
During static analysis, a concern was raised that we may access the
dtd->dtd[] array out of bounds, because we are not checking whether
the index we use is larger than the array.
This should not be a problem as is, because the enumeration that is
used for this index comes from "panel_type", which uses an enumeration
with 4 items. But if this enumeration is ever changed, it can lead to
hard-to-detect bugs, so better double-check it before using it as an
index to the array.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240528112901.476068-2-luciano.coelho@intel.com
2024-05-30 16:08:03 +05:30
Mika Kahola
45fe957ae7
drm/i915/display: Add compare config for MTL+ platforms
...
Currently, we may bump into pll mismatch errors during the
state verification stage. This happens when we try to use
fastset instead of full modeset. Hence, we would need to add
a check for pipe configuration to ensure that the sw and the
hw configuration will match. In case of hw and sw mismatch,
we would need to disable fastset and use full modeset instead.
v2: Fix C10 error on PLL comparison (BAT)
Use memcmp instead of fixed loops for pll config
comparison (Jani)
Clean up and use intel_cx0pll_dump_hw_state() to dump
pll information (Jani)
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Mika Kahola <mika.kahola@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240523134649.31452-3-mika.kahola@intel.com
2024-05-30 11:23:51 +03:00
Mika Kahola
5575d7b661
drm/i915/display: Revert "drm/i915/display: Skip C10 state verification in case of fastset"
...
This reverts commit a1d91c6e98 .
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Mika Kahola <mika.kahola@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240523134649.31452-2-mika.kahola@intel.com
2024-05-30 11:23:31 +03:00
Imre Deak
75800e2e42
drm/i915: Fix audio component initialization
...
After registering the audio component in i915_audio_component_init()
the audio driver may call i915_audio_component_get_power() via the
component ops. This could program AUD_FREQ_CNTRL with an uninitialized
value if the latter function is called before display.audio.freq_cntrl
gets initialized. The get_power() function also does a modeset which in
the above case happens too early before the initialization step and
triggers the
"Reject display access from task"
error message added by the Fixes: commit below.
Fix the above issue by registering the audio component only after the
initialization step.
Fixes: 87c1694533 ("drm/i915: save AUD_FREQ_CNTRL state at audio domain suspend")
Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10291
Cc: stable@vger.kernel.org # v5.5+
Signed-off-by: Imre Deak <imre.deak@intel.com >
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240521143022.3784539-1-imre.deak@intel.com
(cherry picked from commit fdd0b80172 )
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-29 11:35:48 +03:00
Vidya Srinivas
43e2b37e2a
drm/i915/dpt: Make DPT object unshrinkable
...
In some scenarios, the DPT object gets shrunk but
the actual framebuffer did not and thus its still
there on the DPT's vm->bound_list. Then it tries to
rewrite the PTEs via a stale CPU mapping. This causes panic.
Cc: stable@vger.kernel.org
Reported-by: Shawn Lee <shawn.c.lee@intel.com >
Fixes: 0dc987b699 ("drm/i915/display: Add smem fallback allocation for dpt")
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com >
[vsyrjala: Add TODO comment]
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240520165634.1162470-1-vidya.srinivas@intel.com
(cherry picked from commit 51064d471c )
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-29 11:35:43 +03:00
Andi Shyti
ee01b6a386
drm/i915/gt: Fix CCS id's calculation for CCS mode setting
...
The whole point of the previous fixes has been to change the CCS
hardware configuration to generate only one stream available to
the compute users. We did this by changing the info.engine_mask
that is set during device probe, reset during the detection of
the fused engines, and finally reset again when choosing the CCS
mode.
We can't use the engine_mask variable anymore, as with the
current configuration, it imposes only one CCS no matter what the
hardware configuration is.
Before changing the engine_mask for the third time, save it and
use it for calculating the CCS mode.
After the previous changes, the user reported a performance drop
to around 1/4. We have tested that the compute operations, with
the current patch, have improved by the same factor.
Fixes: 6db31251bb ("drm/i915/gt: Enable only one CCS for compute workload")
Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com >
Cc: Chris Wilson <chris.p.wilson@linux.intel.com >
Cc: Gnattu OC <gnattuoc@me.com >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Cc: Matt Roper <matthew.d.roper@intel.com >
Tested-by: Jian Ye <jian.ye@intel.com >
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com >
Tested-by: Gnattu OC <gnattuoc@me.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240517090616.242529-1-andi.shyti@linux.intel.com
(cherry picked from commit a09d2327a9 )
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-29 11:35:38 +03:00
Nirmoy Das
659a3062c7
drm/i915/selftests: Set always_coherent to false when reading from CPU
...
Commit 8d4ba9fc1c ("drm/i915/selftests: Pick correct caching mode.")
was not complete as for non LLC sharing platforms cpu read can happen
from LLC which probably doesn't have the latest changes made by GPU.
Cc: Andi Shyti <andi.shyti@linux.intel.com >
Cc: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com >
Cc: Jonathan Cavitt <jonathan.cavitt@intel.com >
Fixes: 8d4ba9fc1c ("drm/i915/selftests: Pick correct caching mode.")
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com >
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240516151403.2875-1-nirmoy.das@intel.com
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com >
(cherry picked from commit 007ed70831 )
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-05-29 11:35:32 +03:00