Jouni Högander
1bb2af547a
drm/i915: Handle dma fences in dirtyfb callback
...
Take into account dma fences in dirtyfb callback. If there is no
unsignaled dma fences perform flush immediately. If there are
unsignaled dma fences perform invalidate and add callback which will
queue flush when the fence gets signaled.
v4:
- Move invalidate before callback is added
v3:
- Check frontbuffer bits before adding any fence fb
- Flush only when adding fence cb succeeds
v2: Use dma_resv_get_singleton
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230901093500.3463046-5-jouni.hogander@intel.com
2023-09-04 12:05:19 +03:00
Jouni Högander
40320844ca
drm/i915: Add new frontbuffer tracking interface to queue flush
...
We want to wait dma fences in dirtyfb ioctl. As we don't want to make
dirtyfb ioctl as blocking call we need to use
dma_fence_add_callback. Callback used for dma_fence_add_callback is
called from atomic context. Due to this we need to add a new
frontbuffer tracking interface to queue flush.
v3:
- Check schedule work success rather than work being pending
- Init flush work when frontbuffer struct is initialized
v2: Check if flush work is already pending
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230901093500.3463046-4-jouni.hogander@intel.com
2023-09-04 12:04:07 +03:00
Jouni Högander
35a97f56d6
drm/i915/psr: Clear frontbuffer busy bits on flip
...
We are planning to move flush performed from work queue. This
means it is possible to have invalidate -> flip -> flush sequence.
Handle this by clearing possible busy bits on flip.
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230901093500.3463046-3-jouni.hogander@intel.com
2023-09-04 12:03:40 +03:00
Jouni Högander
4f89df198d
drm/i915/fbc: Clear frontbuffer busy bits on flip
...
We are planning to move flush performed from work queue. This
means it is possible to have invalidate -> flip -> flush sequence.
Handle this by clearing possible busy bits on flip.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230901093500.3463046-2-jouni.hogander@intel.com
2023-09-04 12:03:07 +03:00
Jani Nikula
f208f4a49a
media: cec: core: add note about *_from_edid() function usage in drm
...
In the drm subsystem, the source physical address is, in most cases,
available without having to parse the EDID again. Add notes about
preferring to use the pre-parsed address instead.
Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl >
Cc: linux-media@vger.kernel.org
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl >
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl >
Link: https://patchwork.freedesktop.org/patch/msgid/20230831105144.25923-1-jani.nikula@intel.com
2023-09-01 11:59:37 +03:00
Jani Nikula
1bc7344835
drm/i915/cec: switch to setting physical address directly
...
Avoid parsing the EDID again for source physical address. Also gets rids
of a few remaining raw EDID usages.
Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl >
Cc: linux-media@vger.kernel.org
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl >
Link: https://patchwork.freedesktop.org/patch/msgid/01a90c82c8a4f2fd945e0181ffeaca595928d19e.1692884619.git.jani.nikula@intel.com
2023-09-01 11:47:53 +03:00
Jani Nikula
113cdddcde
drm/cec: add drm_dp_cec_attach() as the non-edid version of set edid
...
Connectors have source physical address available in display
info. There's no need to parse the EDID again for this. Add
drm_dp_cec_attach() to do this.
Seems like the set_edid/unset_edid naming is a bit specific now that
there's no need to pass the EDID at all, so aim for attach/detach going
forward.
v2: Fix the embarrashing build failures
Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl >
Cc: linux-media@vger.kernel.org
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl >
Acked-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20230825130120.1250089-1-jani.nikula@intel.com
2023-09-01 11:47:53 +03:00
Jani Nikula
82b599ece3
drm/edid: parse source physical address
...
CEC needs the source physical address. Parsing it is trivial with the
existing EDID CEA DB infrastructure.
Default to CEC_PHYS_ADDR_INVALID (0xffff) instead of 0 to cater for
easier CEC usage.
Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl >
Cc: linux-media@vger.kernel.org
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl >
Acked-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/8c6b6403932536b6849e0b44e1ee6e7ebdbe4a69.1692884619.git.jani.nikula@intel.com
2023-09-01 11:47:53 +03:00
Jani Nikula
e1039cde68
drm/i915/display: use drm_edid_is_digital()
...
Reduce the use of struct edid and drm_edid_raw().
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/dbc0269d34f3140aff410eefae8a2711c59299b3.1692884619.git.jani.nikula@intel.com
2023-09-01 11:47:53 +03:00
Jani Nikula
7218779efc
drm/edid: add drm_edid_is_digital()
...
Checking edid->input & DRM_EDID_INPUT_DIGITAL is common enough to
deserve a helper that also lets us abstract the raw EDID a bit better.
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Acked-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/4bdb407bf189fd922be022eb2f9564692377c81d.1692884619.git.jani.nikula@intel.com
2023-09-01 11:47:53 +03:00
Suraj Kandpal
a35239a892
drm/i915/hdcp: Use correct aux for capability check scenario
...
Send the correct aux rather than the one derived
from intel_digital_port so that the HDCP version of both monitors
are fetched rather than just the primary one's
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com >
Reviewed-by: Uma Shankar <uma.shankar@intel.com >
Signed-off-by: Uma Shankar <uma.shankar@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230830073437.666263-3-suraj.kandpal@intel.com
2023-09-01 13:17:44 +05:30
Suraj Kandpal
130849f8ec
drm/i915/hdcp: Use intel_connector as argument for hdcp_2_2_capable
...
Use intel_connector as argument instead of intel_digital_port in
hdcp_2_2_capable function and dig_port can be later derived from
connector. This will help with getting the correct hdcp version of
particular monitor in a MST setup.
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com >
Reviewed-by: Uma Shankar <uma.shankar@intel.com >
Signed-off-by: Uma Shankar <uma.shankar@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230830073437.666263-2-suraj.kandpal@intel.com
2023-09-01 13:17:44 +05:30
Jani Nikula
c1464a89e1
drm/i915: add minimal i915_gem_object_frontbuffer.h
...
Split out frontbuffer related declarations and static inlines from
gem/i915_gem_object.h into new gem/i915_gem_object_frontbuffer.h.
The main goal is to reduce header interdependencies. With
gem/i915_gem_object.h including display/intel_frontbuffer.h,
modification of the latter causes a whopping 300+ objects to be rebuilt,
while many of the source files actually needing it aren't explicitly
including it at all.
After the change, only 21 objects depend on display/intel_frontbuffer.h,
directly or indirectly.
Cc: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Jouni Högander <jouni.hogander@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230830085127.2416842-1-jani.nikula@intel.com
2023-08-31 18:41:34 +03:00
Imre Deak
7ce8ac49e4
drm/i915/mtl: Add TC port lockdep assert to AUX power well enabling
...
Similarly to earlier platforms, assert in the MTL AUX power well
enabling handler for TC AUX CH power wells that the TC port using the
AUX CH is locked.
Signed-off-by: Imre Deak <imre.deak@intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230830140421.2031111-2-imre.deak@intel.com
2023-08-31 13:14:40 +03:00
Imre Deak
74c699e419
drm/i915/dp: Drop redundant AUX power get/put in intel_dp_force()
...
intel_dp_force() takes the AUX power reference as required by the DP AUX
transactions in intel_dp_set_edid(). However the low level AUX handler
takes this reference already so the get/put in intel_dp_force() can be
dropped. This also fixes a problem where the TC port mode changed while
the AUX power well was enabled.
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8779
Signed-off-by: Imre Deak <imre.deak@intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230830140421.2031111-1-imre.deak@intel.com
2023-08-31 13:14:23 +03:00
Swati Sharma
84bd5e9685
drm/i915/dg2: Add support for new DG2-G12 revid 0x1
...
The bspec has been updated with a new revision 0x1 that
translates to A1 GT stepping and C0 display stepping.
Bspec: 44477
Signed-off-by: Swati Sharma <swati2.sharma@intel.com >
Reviewed-by: Matt Roper <matthew.d.roper@intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230829135945.1201574-1-swati2.sharma@intel.com
2023-08-30 19:40:37 +05:30
Ankit Nautiyal
a10ca2afb8
drivers/drm/i915: Honor limits->max_bpp while computing DSC max input bpp
...
Edid specific BPC constraints are stored in limits->max_bpp. Honor these
limits while computing the input bpp for DSC.
v2: Use int instead of u8 for computations. (Jani)
Add closes tag. (Ankit)
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/9161
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com >
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230824125121.840298-3-ankit.k.nautiyal@intel.com
2023-08-30 14:50:17 +03:00
Ankit Nautiyal
10eaac085b
drm/display/dp: Assume 8 bpc support when DSC is supported
...
As per DP v1.4, a DP DSC Sink device shall support 8bpc in DPCD 6Ah.
Apparently some panels that do support DSC, are not setting the bit for
8bpc.
So always assume 8bpc support by DSC decoder, when DSC is claimed to be
supported.
v2: Use helper to get check dsc support. (Ankit)
v3: Fix styling and other typos. (Jani)
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com >
Acked-by: Maxime Ripard <mripard@kernel.org >
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230824125121.840298-2-ankit.k.nautiyal@intel.com
2023-08-30 14:49:47 +03:00
Jouni Högander
b3bca7b8fa
drm/i915/psr: Apply Wa_14015648006 for all display 14 steppings
...
According to recent Bspec Wa 14015648006 has to be applied for all display
14 steppings.
Bspec: 66624
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Matt Roper <matthew.d.roper@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230829094435.2100669-1-jouni.hogander@intel.com
2023-08-29 16:34:35 -07:00
Ville Syrjälä
9c7e9db11a
drm/i915/sdvo: Print out the i2c pin and slave address
...
To reduce the guesswork a bit let's print out the SDVO
device i2c bus and slave address during init.
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230825134431.24391-7-ville.syrjala@linux.intel.com
2023-08-29 11:39:42 +03:00
Ville Syrjälä
c0ff6c6e4c
drm/i915/sdvo: Rework DDC bus handling
...
Each SDVO device can have up to three sets of DDC pins.
Currently we just register a single i2c_adapter for the
entire SDVO device and semi-randomly pick the "correct"
set of DDC pins during intel_sdvo_tmds_sink_detect().
This doesn't make any real sense especially if we have
multiple outputs each with their own dedicated DDC bus.
Let's clean up this mess and register a dedicated
i2c_adapter for each of the possible pin pairs. Each
output (ie. connector) can then pick the correct i2c_adapter
to use for its DDC bus. And we can just switch over to
drm_connector_init_with_ddc() to take care of the
connector->ddc association, which also populates the
"ddc" sysfs symlink as a bonus.
And now that things are based on the actual connector we can
also nuke the sketchy sdvo->controller_output thing.
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230825134431.24391-6-ville.syrjala@linux.intel.com
2023-08-29 11:39:38 +03:00
Ville Syrjälä
5bb306b1d1
drm/i915/sdvo: Get rid of the per-connector i2c symlink
...
We should switch over to the standard "ddc" per-connector
symlink instead of rolling our own thing. The i2c specific
symlink is also in the way of reworking the SDVO DDC handling
(which is a mess atm) so get rid of it.
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230825134431.24391-5-ville.syrjala@linux.intel.com
2023-08-29 11:39:35 +03:00
Ville Syrjälä
c6eddd311d
drm/i915/sdvo: Nuke the duplicate sdvo->port
...
We already have encoder->port so get rid of the duplicate
sdvo->port.
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230825134431.24391-4-ville.syrjala@linux.intel.com
2023-08-29 11:39:31 +03:00
Ville Syrjälä
0eb8252a6f
drm/i915/sdvo: Initialize the encoder earlier
...
Call drm_encoder_init() earlier so that we don't have to keep passing
the i915/dev_priv around separately.
v2: Reorder drm_encoder_cleanup() in the error path (Jani)
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230825134431.24391-3-ville.syrjala@linux.intel.com
2023-08-29 11:39:25 +03:00
Ville Syrjälä
31ea78571e
drm/i915/sdvo: Nuke attached_output tracking
...
Instead of operating on the output the user specified (via the
connector) the current code tends to operate on whichever outputs
it has detected as attached. That is not how the kms uapi is supposed
to work. So simply get rid of attached_outputs and instead directly
operate on the output the user has specified.
Acked-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230825134431.24391-2-ville.syrjala@linux.intel.com
2023-08-29 11:39:22 +03:00
Suraj Kandpal
3974f9c17b
drm/i915/hdcp: Adjust timeout for read in DPMST Scenario
...
For dpmst hdcp scenario increase the message timeout based
on the number of ports connected as each port needs to be
validated and each will take the prescribed amount of time
for the respective msg_id and total timeout will be
original_timeout * num_ports.
--v2
-Add justification for Adjusting the timeout [Arun]
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com >
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com >
Signed-off-by: Uma Shankar <uma.shankar@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230828063401.600414-5-suraj.kandpal@intel.com
2023-08-29 13:51:41 +05:30
Suraj Kandpal
ae4f902bb3
drm/i915/hdcp: Send the correct aux for DPMST HDCP scenario
...
Up until now we were sending the base aux stored in dig_port which
is not correct as this causes an issue when monitor is connected via
a DPMST hub causing it to be remote hence we end up seeing AUX
failures so let's send the remote aux in case of DPMST.
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com >
Reviewed-by: Arun R Murthy <arun.r.mruthy@intel.com >
Signed-off-by: Uma Shankar <uma.shankar@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230828063401.600414-4-suraj.kandpal@intel.com
2023-08-29 13:51:40 +05:30
Suraj Kandpal
524240b231
drm/i915/hdcp: Propagate aux info in DP HDCP functions
...
We were propagating dig_port info to dp hdcp2 specific functions.
Let us clean that up and send intel_connector in the following
functions: intel_dp_hdcp2_wait_for_msg, get_receiver_id_list_rx_info,
intel_dp_hdcp2_read_rx_status.
This optimises mst scenarios where aux ends up being remote and not
stored in dig_port and dig_port can always be derived from
intel_connector if needed.
--v2
-Fix Typo [Arun]
-Dont pass drm_dp core structures [Arun]
-Fix commit message styling [Arun]
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com >
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com >
Signed-off-by: Uma Shankar <uma.shankar@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230828063850.604048-1-suraj.kandpal@intel.com
2023-08-29 13:51:40 +05:30
Suraj Kandpal
51152acfdc
drm/i915/hdcp: Use intel_connector argument in intel_hdcp_shim
...
Update intel_hdcp_shim funcs specifically read_2_2_message,
write_2_2_message and config_stream_type to use intel_connector
argument instead of intel_digital_port as this will help in getting
correct aux later for dp mst scenarios also already hdcp funcs
derive digital_port from connector and then many funcs again get back
the connector from dig_port which doesn't seem right.
Connector specific hdcp functions can derive dig_port on need basis.
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com >
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com >
Signed-off-by: Uma Shankar <uma.shankar@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230828063401.600414-2-suraj.kandpal@intel.com
2023-08-29 13:51:39 +05:30
Jani Nikula
9af09dfcdf
drm/i915/color: move pre-SKL gamma and CSC enable read to intel_color
...
Abstract the register access better. The DSPCNTR read could be moved to
either i9xx_plane.c or intel_color.c. The latter feels better, even if
the register is written in the former.
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Jouni Högander <jouni.hogander@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/33830dba5d69027469d976f6909740ccff8c7281.1692287501.git.jani.nikula@intel.com
2023-08-25 13:12:31 +03:00
Jani Nikula
f56e23edb1
drm/i915/color: move SKL+ gamma and CSC enable read to intel_color
...
Abstract the platform specific register access better.
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Jouni Högander <jouni.hogander@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/c0c37c06d1f2673c82d567c8bcbb6b0b0054b5fa.1692287501.git.jani.nikula@intel.com
2023-08-25 13:12:27 +03:00
Jani Nikula
cecdea151e
drm/i915: move ILK+ CSC mode read to intel_color
...
Abstract the platform specific register access better.
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Jouni Högander <jouni.hogander@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/8f34c577c663839020405e96cdb464319c2881d4.1692287501.git.jani.nikula@intel.com
2023-08-25 13:12:24 +03:00
Jani Nikula
efe6fcb2dc
drm/i915: move HSW+ gamma mode read to intel_color
...
Abstract the platform specific register access better. The separate
hsw_read_gamma_mode() will make more sense with the following changes.
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Jouni Högander <jouni.hogander@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/b7ddcc8b0fb783eb149864070821bdb695c40366.1692287501.git.jani.nikula@intel.com
2023-08-25 13:12:21 +03:00
Jani Nikula
7f52ca642f
drm/i915/color: move CHV CGM pipe mode read to intel_color
...
Add color .get_config hook to read config other than LUTs and CSCs, and
start off with CHV CGM pipe mode to abstract the platform specific
register access better.
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Jouni Högander <jouni.hogander@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/1444200931ae61b6360e3dcad8cbea206ad62e2f.1692287501.git.jani.nikula@intel.com
2023-08-25 13:12:17 +03:00
Jani Nikula
ae3a70adc2
drm/i915/regs: split out intel_color_regs.h
...
Declutter i915_regs.h.
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Jouni Högander <jouni.hogander@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/8e76007a361bd3ca8dd8913281854886b3a1954c.1692287501.git.jani.nikula@intel.com
2023-08-25 13:12:10 +03:00
Vinod Govindapillai
6297ee90f6
drm/i915/display: configure SDP split for DP-MST
...
Extend the SDP split audio config for DP-MST
Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com >
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230822204818.109742-3-vinod.govindapillai@intel.com
2023-08-25 09:08:24 +03:00
Vinod Govindapillai
2e775f2d41
drm/i915/display: update intel_dp_has_audio to support MST
...
Modify intel_dp_has_audio to handle DP-MST as well.
v1: fix the wrong port comparison (Jani Nikula)
Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com >
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230822204818.109742-2-vinod.govindapillai@intel.com
2023-08-25 09:08:20 +03:00
Jani Nikula
f1f959d523
drm/i915/vma: constify unbind_fence_ops
...
unbind_fence_ops can be const and placed in rodata.
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Jouni Högander <jouni.hogander@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230818112758.3586545-1-jani.nikula@intel.com
2023-08-25 09:02:55 +03:00
Dnyaneshwar Bhadane
5d5fea7c79
drm/i915/rpl: Update pci ids for RPL P/U
...
Update pci device ids as per bspec for
RPL P/U.
v2:
- Append new id's instead of replacing the existing in device
id list define
v3:
- Fixed the commit messege with revision details.
Bpsec: 55376
Signed-off-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com >
Reviewed-by: Matt Roper <matthew.d.roper@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230824062840.2372872-1-dnyaneshwar.bhadane@intel.com
2023-08-24 08:37:55 -07:00
Ville Syrjälä
e83d12e092
drm/i915/sdvo: Fail gracefully if the TV dotclock is out of range
...
Instead of warning and continuing with bogus state when the
requested dotclock isn't acceptable just print some debug
spew and fail gracefully.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230705202122.17915-8-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2023-08-24 15:24:43 +03:00
Ville Syrjälä
d320aaaa2c
drm/i915/sdvo: Pick the TV dotclock from adjusted_mode
...
port_clock is what the encoder/dpll code is supposed to calculate,
it is not the input clock. Use the dotclock as the target we're
trying to achieve instead.
TODO: the SDVO TV clocking is a mess atm and needs further work
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230705202122.17915-7-ville.syrjala@linux.intel.com
Acked-by: Jani Nikula <jani.nikula@intel.com >
2023-08-24 15:24:31 +03:00
Ville Syrjälä
c99c0e2839
drm/i915: Fully populate crtc_state->dpll
...
Call *_calc_dpll_params() even in cases where the encoder has
computed the DPLL params for us.
The SDVO TV output code doesn't populate crtc_state->dpll.dot
leading to the dotclock getting calculated as zero, and that
leads to all kinds of real problems. The g4x DP code also
doesn't populate the derived dividers nor .vco, which could
also create some confusion.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230705202122.17915-6-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2023-08-24 15:24:12 +03:00
Ville Syrjälä
7176dca943
drm/i915: Don't warn about zero N/P in *_calc_dpll_params()
...
Allow *_calc_dpll_params() to be called even if the N/P dividers
are zero without warning. We'll want to call these to make sure the
derived values are fully computed, but not all users (VLV DSI in
particular) even enable the DPLL and thus the dividers will
be left at zero.
It could also be possible that the BIOS has misprogrammed the DPLL
(IIRC happened with some SNB machines with 4k+ displays) and thus
we'll currently generate a lot of dmesg spew. Better be silent and
just let the normal state checker/etc. deal with any driver bugs.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230705202122.17915-5-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2023-08-24 15:22:19 +03:00
Ville Syrjälä
469c09624b
drm/i915/sdvo: s/sdvo_inputs_mask/sdvo_num_inputs/
...
The SDVO inputs are reported a simple number, not a bitmask.
Adjust the code to match reality.
Note that we don't actually support dual input SDVO devices,
and we just always use the first input.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230705202122.17915-4-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2023-08-24 15:20:46 +03:00
Ville Syrjälä
a5d1d0a1fc
drm/i915/sdvo: Protect macro args
...
Put parens around macro argument evaluation for safety.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230705202122.17915-3-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2023-08-24 15:20:32 +03:00
Ville Syrjälä
1d6f7b19bd
drm/i915/sdvo: Issue SetTargetOutput prior to GetAttachedDisplays
...
I have at least one SDVO device (some Lenovo DVI-I ADD2 card,
based on Conexant CX25904) where GetAttachedDisplays returns
success but fails to report any attached displays unless we
precede the command with a SetTargetOutput. Make it so.
I wasn't able to spot anything in the SDVO spec stating that
this should be necessary, but real world wins over spec.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230705202122.17915-2-ville.syrjala@linux.intel.com
Acked-by: Jani Nikula <jani.nikula@intel.com >
2023-08-24 15:20:03 +03:00
Juha-Pekka Heikkila
40a54a268f
drm/i915/display: add lock while printing frontbuffer tracking bits to debugfs
...
Add missing spin_lock/unlock
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com >
Reviewed-by: Jouni Högander <jouni.hogander@intel.com >
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230814163452.2925-1-juhapekka.heikkila@gmail.com
2023-08-24 13:02:27 +03:00
Imre Deak
50452f2f76
drm/i915: Fix HPD polling, reenabling the output poll work as needed
...
After the commit in the Fixes: line below, HPD polling stopped working
on i915, since after that change calling drm_kms_helper_poll_enable()
doesn't restart drm_mode_config::output_poll_work if the work was
stopped (no connectors needing polling) and enabling polling for a
connector (during runtime suspend or detecting an HPD IRQ storm).
After the above change calling drm_kms_helper_poll_enable() is a nop
after it's been called already and polling for some connectors was
disabled/re-enabled.
Fix this by calling drm_kms_helper_poll_reschedule() added in the
previous patch instead, which reschedules the work whenever expected.
Fixes: d33a54e399 ("drm/probe_helper: sort out poll_running vs poll_enabled")
CC: stable@vger.kernel.org # 6.4+
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Jouni Högander <jouni.hogander@intel.com >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230822113015.41224-2-imre.deak@intel.com
2023-08-23 22:25:09 +03:00
Imre Deak
fe2352fd64
drm: Add an HPD poll helper to reschedule the poll work
...
Add a helper to reschedule drm_mode_config::output_poll_work after
polling has been enabled for a connector (and needing a reschedule,
since previously polling was disabled for all connectors and hence
output_poll_work was not running).
This is needed by the next patch fixing HPD polling on i915.
CC: stable@vger.kernel.org # 6.4+
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Jouni Högander <jouni.hogander@intel.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230822113015.41224-1-imre.deak@intel.com
2023-08-23 22:25:08 +03:00
Vinod Govindapillai
1bd1817b68
drm/i915/display: combine DP audio compute config steps
...
Combine all DP audio configs into a single function
Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com >
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230818111950.128992-3-vinod.govindapillai@intel.com
2023-08-22 16:42:11 +03:00