]> Git Repo - linux.git/log
linux.git
9 months agodrm/i915/dmc: convert intel_dmc_print_error_state() to drm_printer
Jani Nikula [Thu, 6 Jun 2024 14:07:04 +0000 (17:07 +0300)]
drm/i915/dmc: convert intel_dmc_print_error_state() to drm_printer

Use the regular drm printer, so we can drop the i915_error_printf()
usage.

Reviewed-by: Rodrigo Vivi <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915: Reduce DDI clock gating printk level from NOTICE to DEBUG
Ville Syrjälä [Wed, 5 Jun 2024 11:33:36 +0000 (14:33 +0300)]
drm/i915: Reduce DDI clock gating printk level from NOTICE to DEBUG

No idea why the DDI clock gating print is done with drm_notice().
Just use drm_dbg_kms() since no one is going to be interested in
this under normal circumstances.

Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Jani Nikula <[email protected]>
9 months agodrm/xe/display: drop i915_drv.h include from xe code
Jani Nikula [Wed, 29 May 2024 17:48:14 +0000 (20:48 +0300)]
drm/xe/display: drop i915_drv.h include from xe code

Drop i915_drv.h include from xe display code as much as possible, and
switch to xe types where necessary.

Reviewed-by: Rodrigo Vivi <[email protected]>
Acked-by: Rodrigo Vivi <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/bb490f3e928fd8178277fde2435de80638fc5715.1717004739.git.jani.nikula@intel.com
9 months agodrm/xe/display: reduce includes in compat i915_drv.h
Jani Nikula [Wed, 29 May 2024 17:48:13 +0000 (20:48 +0300)]
drm/xe/display: reduce includes in compat i915_drv.h

Remove some unnecessary includes, and replace xe_device.h with the
sufficient xe_device_types.h.

Reviewed-by: Rodrigo Vivi <[email protected]>
Acked-by: Rodrigo Vivi <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/ada73d5e3565b1cc284405386a16cc74d79bbb05.1717004739.git.jani.nikula@intel.com
9 months agodrm/xe/display: move compat runtime pm stubs to the correct file
Jani Nikula [Wed, 29 May 2024 17:48:12 +0000 (20:48 +0300)]
drm/xe/display: move compat runtime pm stubs to the correct file

Move things that belong to intel_runtime_pm.h to the correct place. Add
missing header guards while at it.

Reviewed-by: Rodrigo Vivi <[email protected]>
Acked-by: Rodrigo Vivi <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/edefb6ef02920528eacdf01b828cfc45ce55e061.1717004739.git.jani.nikula@intel.com
9 months agodrm/xe/display: move compat uncore stubs to the correct file
Jani Nikula [Wed, 29 May 2024 17:48:11 +0000 (20:48 +0300)]
drm/xe/display: move compat uncore stubs to the correct file

Move things that belong to intel_uncore.h to the correct place.

Reviewed-by: Rodrigo Vivi <[email protected]>
Acked-by: Rodrigo Vivi <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/3f3903c7c5e34aefac0f6d06e433710bc782c97e.1717004739.git.jani.nikula@intel.com
9 months agodrm/i915/display: include xe_bo.h, gem_object_types etc. where needed
Jani Nikula [Wed, 29 May 2024 17:48:10 +0000 (20:48 +0300)]
drm/i915/display: include xe_bo.h, gem_object_types etc. where needed

Include what you use. The dependencies on the headers, and what they
include, is a bit convoluted. Add xe compat gem/gem_object_types.h. Fix
all the places needed.

Reviewed-by: Rodrigo Vivi <[email protected]>
Acked-by: Rodrigo Vivi <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/e9ca3d6127ea22f252d9dbf30cfde99e37538c99.1717004739.git.jani.nikula@intel.com
9 months agodrm/i915/display: include intel_step.h where needed
Jani Nikula [Wed, 29 May 2024 17:48:09 +0000 (20:48 +0300)]
drm/i915/display: include intel_step.h where needed

Include what you use. With this, we can drop the include along with
xe_step.h from xe compat i915_drv.h.

Reviewed-by: Rodrigo Vivi <[email protected]>
Acked-by: Rodrigo Vivi <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/abee71a6c6edbd1a3ddf0f97838977e53feaa5ff.1717004739.git.jani.nikula@intel.com
9 months agodrm/i915/display: include intel_uncore.h where needed
Jani Nikula [Wed, 29 May 2024 17:48:08 +0000 (20:48 +0300)]
drm/i915/display: include intel_uncore.h where needed

Include what you use. With this, we can drop the include from xe compat
i915_drv.h.

Reviewed-by: Rodrigo Vivi <[email protected]>
Acked-by: Rodrigo Vivi <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/bc3a722413e20db905671e58627ba6d757f41c63.1717004739.git.jani.nikula@intel.com
9 months agodrm/i915/display: include i915_gpu_error.h where needed
Jani Nikula [Wed, 29 May 2024 17:48:07 +0000 (20:48 +0300)]
drm/i915/display: include i915_gpu_error.h where needed

Include what you use. With this, we can drop the include from xe compat
i915_drv.h.

Reviewed-by: Rodrigo Vivi <[email protected]>
Acked-by: Rodrigo Vivi <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/a5dbb8d46403761bd8518db45fa71dc55930d3cf.1717004739.git.jani.nikula@intel.com
9 months agodrm/i915/display: include gt/intel_gt_types.h where needed
Jani Nikula [Wed, 29 May 2024 17:48:06 +0000 (20:48 +0300)]
drm/i915/display: include gt/intel_gt_types.h where needed

Include what you use. We need to move the compat intel_gt_types.h under
gt subdir. With this, we can drop the include from xe compat i915_drv.h.

Reviewed-by: Rodrigo Vivi <[email protected]>
Acked-by: Rodrigo Vivi <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/df73c0934ad21f157714a41b33b81cebd2a523a6.1717004739.git.jani.nikula@intel.com
9 months agodrm/i915/display: include gem/i915_gem_stolen.h where needed
Jani Nikula [Wed, 29 May 2024 17:48:05 +0000 (20:48 +0300)]
drm/i915/display: include gem/i915_gem_stolen.h where needed

Include what you use. We need to move the compat i915_gem_stolen.h under
gem subdir. With this, we can drop the include from xe compat
i915_drv.h.

Reviewed-by: Rodrigo Vivi <[email protected]>
Acked-by: Rodrigo Vivi <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/6ac3480a8689fda5aaf4007cb604e06e939a03f7.1717004739.git.jani.nikula@intel.com
9 months agodrm/i915: drop redundant W=1 warnings from Makefile
Jani Nikula [Thu, 23 May 2024 13:37:05 +0000 (16:37 +0300)]
drm/i915: drop redundant W=1 warnings from Makefile

Since commit a61ddb4393ad ("drm: enable (most) W=1 warnings by default
across the subsystem"), most of the extra warnings in the driver
Makefile are redundant. Remove them.

Note that -Wmissing-declarations and -Wmissing-prototypes are always
enabled by default in scripts/Makefile.extrawarn.

Acked-by: Lucas De Marchi <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/490931748fa9a1dbac2bceda0c4b778240b10b58.1716471145.git.jani.nikula@intel.com
9 months agodrm/i915: Protect CRC reg macro arguments for consistency
Ville Syrjälä [Fri, 31 May 2024 11:53:42 +0000 (14:53 +0300)]
drm/i915: Protect CRC reg macro arguments for consistency

It's probably a good idea to start protecting all macro arguments
to avoid any cargo-cult mistakes when people go looking for examples
of how to define these things.

Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Jani Nikula <[email protected]>
9 months agodrm/i915: Define the PIPE_CRC_EXP registers
Ville Syrjälä [Fri, 31 May 2024 11:53:41 +0000 (14:53 +0300)]
drm/i915: Define the PIPE_CRC_EXP registers

I need a scratch register which fill the following requirements:
- can be accessed via DSB
- all the bits can be read/written
- no serious side effects

So far the only thing I could think of is the "expected CRC"
register. Add the definition so I can use it.

While I only need the hsw+ variant currently, let's define the
older variants as well for completeness.

Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Acked-by: Jani Nikula <[email protected]>
9 months agodrm/i915: Document which platforms have which CRC registers
Ville Syrjälä [Fri, 31 May 2024 11:53:40 +0000 (14:53 +0300)]
drm/i915: Document which platforms have which CRC registers

Sprinkle some comments around to indicate which CRC registers
are valid for which platforms.

Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Jani Nikula <[email protected]>
9 months agodrm/i915: Add a separate definition for PIPE_CRC_RES_HSW
Ville Syrjälä [Fri, 31 May 2024 11:53:39 +0000 (14:53 +0300)]
drm/i915: Add a separate definition for PIPE_CRC_RES_HSW

On hsw+ we only have one CRC result register, instead of the
five we have on ivb, and some of the others have been repurposed
to serve other CRC related purposes.

Since the hsw+ vs. pre-hsw register operate quite differently
let's add a separate definition for the hsw+ variant to make the
situation a bit more clear. Also since we only use this from a
hsw+ codepath there is no real benefit to be had with reusing
the ivb register definition.

Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Jani Nikula <[email protected]>
9 months agodrm/i915: Regroup pipe CRC regs
Ville Syrjälä [Fri, 31 May 2024 11:53:38 +0000 (14:53 +0300)]
drm/i915: Regroup pipe CRC regs

Put all the definitions related to a single pipe CRC register
in one place, instead of the current approach where things are
spread all over the place.

Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Jani Nikula <[email protected]>
9 months agodrm/i915: Switch PIPE_CRC_RES_*_IVB to _MMIO_PIPE()
Ville Syrjälä [Fri, 31 May 2024 11:53:37 +0000 (14:53 +0300)]
drm/i915: Switch PIPE_CRC_RES_*_IVB to _MMIO_PIPE()

PIPE_CRC_RES_*_IVB are proper pipe registers, and only valid
for IVB+ where pipe register blocks are equally spaced, so we
can switch from _MMIO_TRANS2() to the simpler _MMIO_PIPE() for
these.

Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Jani Nikula <[email protected]>
9 months agodrm/i915: Extract intel_pipe_crc_regs.h
Ville Syrjälä [Fri, 31 May 2024 11:53:36 +0000 (14:53 +0300)]
drm/i915: Extract intel_pipe_crc_regs.h

The CRC registers are a pretty self contained bunch.
Extract them to a separate header to declutter i915_reg.h.

Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Jani Nikula <[email protected]>
9 months agodrm/i915/dsb: Use intel_color_uses_dsb()
Ville Syrjälä [Fri, 31 May 2024 11:41:01 +0000 (14:41 +0300)]
drm/i915/dsb: Use intel_color_uses_dsb()

Use intel_color_uses_dsb() instead of open coding it in
intel_vblank_evade_init(). Make the logic around DSB a bit
more isolated from the rest of the code.

Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Rodrigo Vivi <[email protected]>
9 months agodrm/i915/dsb: Pass DSB engine ID to intel_dsb_prepare()
Ville Syrjälä [Fri, 31 May 2024 11:41:00 +0000 (14:41 +0300)]
drm/i915/dsb: Pass DSB engine ID to intel_dsb_prepare()

Allow the caller of intel_dsb_prepare() to determine which DSB
engine (out of the three possible per pipe) to use. This will
let us utilize multiple DSB engines during the same commit.

Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Rodrigo Vivi <[email protected]>
9 months agodrm/i915/dsb: Move DSB ID definition to the header
Ville Syrjälä [Fri, 31 May 2024 11:40:59 +0000 (14:40 +0300)]
drm/i915/dsb: Move DSB ID definition to the header

We're going to need to make the DSB ID visible outside the DSB
code, so that we eg. can use multiple DSB engines in parallel.
to that end move the definition to intel_dsb.h.

Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Rodrigo Vivi <[email protected]>
9 months agodrm/i915/dsb: Polish the DSB ID enum
Ville Syrjälä [Fri, 31 May 2024 11:40:58 +0000 (14:40 +0300)]
drm/i915/dsb: Polish the DSB ID enum

Namespace the DSB ID enum properly, and make the naming match
other such enums in general. Also make the names 0 based as
that's what Bspec uses for DSB (unlike eg. planes where it
uses 1 based indexing).

We'll throw out INVALID_DSB while at it since we have no use for
it at the moment.

Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Rodrigo Vivi <[email protected]>
9 months agodrm/i915: Fix assert on pending async-put power domain work when it requeues itself
Imre Deak [Thu, 30 May 2024 10:53:12 +0000 (13:53 +0300)]
drm/i915: Fix assert on pending async-put power domain work when it requeues itself

Commit dd839aa857eb ("drm/i915: Fix incorrect assert about pending power domain async-put work")

fixed the assert about a pending work dropping a display power reference
asynchronously, leading to the

drm_WARN_ON(!queue_delayed_work(&power_domains->async_put_work));

warn next time around a power reference was put asynchronously, due to a
stale instance of the work still being pending. However the fix didn't
consider the case where multiple power reference was acquired and put,
requiring the work to requeue itself. Extend the fix for this case as
well canceling the pending instance of the work before it requeues
itself.

Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10915
Signed-off-by: Imre Deak <[email protected]>
Reviewed-by: Jouni Högander <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/psr: Add Early Transport into psr debugfs interface
Jouni Högander [Wed, 29 May 2024 09:38:49 +0000 (12:38 +0300)]
drm/i915/psr: Add Early Transport into psr debugfs interface

We want to have sink Early Transport capability and usage in our psr
debugfs status interface.

v4: use su_region_et_enabled instead of psr2_su_region_et_valid
v3: remove extra space from "PSR mode:  disabled"
v2: printout "Selective Update enabled (Early Transport)" instead of
    "Selective Update Early Transport enabled"

Reviewed-by: Animesh Manna <[email protected]>
Signed-off-by: Jouni Högander <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/psr: Allow setting I915_PSR_DEBUG_SU_REGION_ET_DISABLE via debugfs
Jouni Högander [Wed, 29 May 2024 09:38:48 +0000 (12:38 +0300)]
drm/i915/psr: Allow setting I915_PSR_DEBUG_SU_REGION_ET_DISABLE via debugfs

Currently setting I915_PSR_DEBUG_SU_REGION_ET_DISABLE (0x20) via psr_debug
debugfs interface is not allowed. This patch allows it.

v3:
  - ensure psr is disabled/enabled if enable_psr2_su_region_et changes
  - remove extra space
v2: ensure that fastset is performed when the bit changes

Reviewed-by: Animesh Manna <[email protected]>
Signed-off-by: Jouni Högander <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/display: Selective fetch Y position on Region Early Transport
Jouni Högander [Wed, 29 May 2024 09:38:47 +0000 (12:38 +0300)]
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 <[email protected]>
Signed-off-by: Jouni Högander <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/psr: Use enable boolean from intel_crtc_state for Early Transport
Jouni Högander [Wed, 29 May 2024 09:38:46 +0000 (12:38 +0300)]
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 <[email protected]>
Fixes: 467e4e061c44 ("drm/i915/psr: Enable psr2 early transport as possible")
Signed-off-by: Jouni Högander <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/psr: Get Early Transport status in intel_psr_pipe_get_config
Jouni Högander [Wed, 29 May 2024 09:38:45 +0000 (12:38 +0300)]
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 <[email protected]>
Fixes: 467e4e061c44 ("drm/i915/psr: Enable psr2 early transport as possible")
Signed-off-by: Jouni Högander <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/psr: Add Early Transport status boolean into intel_psr
Jouni Högander [Wed, 29 May 2024 09:38:44 +0000 (12:38 +0300)]
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 <[email protected]>
Signed-off-by: Jouni Högander <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agoMAINTAINERS: update i915 and xe entries for include/drm/intel
Jani Nikula [Thu, 30 May 2024 13:19:11 +0000 (16:19 +0300)]
MAINTAINERS: update i915 and xe entries for include/drm/intel

With all the Intel specific drm files under include/drm/intel, update
the i915, xe, and the shared display entries. Do not discriminate based
on file name pattern, just add the entire directory for all three
entries.

Cc: Joonas Lahtinen <[email protected]>
Cc: Lucas De Marchi <[email protected]>
Cc: Oded Gabbay <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Cc: Thomas Hellström <[email protected]>
Cc: Tvrtko Ursulin <[email protected]>
Reviewed-by: Andi Shyti <[email protected]>
Acked-by: Rodrigo Vivi <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/e0fdf28307bb3e457d8c67966c09c44cf7ff5783.1717075103.git.jani.nikula@intel.com
9 months agodrm: move i915_hdcp_interface.h under include/drm/intel
Jani Nikula [Thu, 30 May 2024 13:19:10 +0000 (16:19 +0300)]
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 <[email protected]>
Cc: Dave Airlie <[email protected]>
Cc: Lucas De Marchi <[email protected]>
Cc: Tomas Winkler <[email protected]>
Acked-by: Lucas De Marchi <[email protected]>
Acked-by: Rodrigo Vivi <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/5f53384118e33123d3c87b94cc8835360237698b.1717075103.git.jani.nikula@intel.com
9 months agodrm: move xe_pciids.h under include/drm/intel
Jani Nikula [Thu, 30 May 2024 13:19:09 +0000 (16:19 +0300)]
drm: move xe_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 <[email protected]>
Cc: Dave Airlie <[email protected]>
Cc: Lucas De Marchi <[email protected]>
Acked-by: Lucas De Marchi <[email protected]>
Acked-by: Rodrigo Vivi <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/e19543f2ae978678c2ff814454f07c96ccd02175.1717075103.git.jani.nikula@intel.com
9 months agodrm: move i915_pciids.h under include/drm/intel
Jani Nikula [Thu, 30 May 2024 13:19:08 +0000 (16:19 +0300)]
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 <[email protected]>
Cc: Dave Airlie <[email protected]>
Cc: Lucas De Marchi <[email protected]>
Cc: Bjorn Helgaas <[email protected]>
Acked-by: Lucas De Marchi <[email protected]>
Acked-by: Rodrigo Vivi <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/a19cebc0f03588b9627dcaaebe69a9fef28c27f0.1717075103.git.jani.nikula@intel.com
9 months agodrm: move i915_pxp_tee_interface.h under include/drm/intel
Jani Nikula [Thu, 30 May 2024 13:19:07 +0000 (16:19 +0300)]
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 <[email protected]>
Cc: Dave Airlie <[email protected]>
Cc: Lucas De Marchi <[email protected]>
Cc: Tomas Winkler <[email protected]>
Acked-by: Lucas De Marchi <[email protected]>
Acked-by: Rodrigo Vivi <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/5c1626978d2552ef5732dcf9427c903046afb9c1.1717075103.git.jani.nikula@intel.com
9 months agodrm: move i915_drm.h under include/drm/intel
Jani Nikula [Thu, 30 May 2024 13:19:06 +0000 (16:19 +0300)]
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 <[email protected]>
Cc: Dave Airlie <[email protected]>
Cc: Lucas De Marchi <[email protected]>
Cc: Bjorn Helgaas <[email protected]>
Cc: Hans de Goede <[email protected]>
Cc: Ilpo Järvinen <[email protected]>
Acked-by: Lucas De Marchi <[email protected]>
Acked-by: Rodrigo Vivi <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/0e344a72e9be596ac2b8b55a26fd674a96f03cdc.1717075103.git.jani.nikula@intel.com
9 months agodrm: move intel_lpe_audio.h under include/drm/intel
Jani Nikula [Thu, 30 May 2024 13:19:05 +0000 (16:19 +0300)]
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 <[email protected]>
Cc: Dave Airlie <[email protected]>
Cc: Lucas De Marchi <[email protected]>
Cc: Jaroslav Kysela <[email protected]>
Cc: Takashi Iwai <[email protected]>
Reviewed-by: Andi Shyti <[email protected]>
Acked-by: Lucas De Marchi <[email protected]>
Acked-by: Rodrigo Vivi <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/2d645970a65cfd13e01fd8195b35bf9483ae9c2f.1717075103.git.jani.nikula@intel.com
9 months agodrm: move i915_component.h under include/drm/intel
Jani Nikula [Thu, 30 May 2024 13:19:04 +0000 (16:19 +0300)]
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 <[email protected]>
Cc: Dave Airlie <[email protected]>
Cc: Lucas De Marchi <[email protected]>
Cc: Tomas Winkler <[email protected]>
Cc: Jaroslav Kysela <[email protected]>
Cc: Takashi Iwai <[email protected]>
Acked-by: Lucas De Marchi <[email protected]>
Acked-by: Rodrigo Vivi <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/a8c07233a8234858eb6711140482ef8db4c91cf4.1717075103.git.jani.nikula@intel.com
9 months agodrm: move i915_gsc_proxy_mei_interface.h under include/drm/intel
Jani Nikula [Thu, 30 May 2024 13:19:03 +0000 (16:19 +0300)]
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 <[email protected]>
Cc: Dave Airlie <[email protected]>
Cc: Lucas De Marchi <[email protected]>
Cc: Tomas Winkler <[email protected]>
Reviewed-by: Andi Shyti <[email protected]>
Acked-by: Lucas De Marchi <[email protected]>
Acked-by: Rodrigo Vivi <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/461662d528c3f327c81b764b7c883cd4519d8729.1717075103.git.jani.nikula@intel.com
9 months agodrm: move intel-gtt.h under include/drm/intel
Jani Nikula [Thu, 30 May 2024 13:19:02 +0000 (16:19 +0300)]
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 <[email protected]>
Cc: Dave Airlie <[email protected]>
Cc: Lucas De Marchi <[email protected]>
Reviewed-by: Andi Shyti <[email protected]>
Acked-by: Lucas De Marchi <[email protected]>
Acked-by: Rodrigo Vivi <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/ae224504d99cc6428da6dced9dcde2b7953624ef.1717075103.git.jani.nikula@intel.com
9 months agodrm/i915: reduce includes in intel_clock_gating.c
Jani Nikula [Thu, 30 May 2024 10:07:47 +0000 (13:07 +0300)]
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ä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915: drop unnecessary i915_reg.h includes
Jani Nikula [Thu, 30 May 2024 10:07:46 +0000 (13:07 +0300)]
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ä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915: remove intermediate _PCH_DP_* macros
Jani Nikula [Tue, 28 May 2024 11:15:42 +0000 (14:15 +0300)]
drm/i915: remove intermediate _PCH_DP_* macros

The intermediate macros are unused. Remove them.

Reviewed-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/0145043ff9767de93cc3dc5119f0e7152965ebe6.1716894910.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915: move PCH DP AUX CH regs to intel_dp_aux_regs.h
Jani Nikula [Tue, 28 May 2024 11:15:41 +0000 (14:15 +0300)]
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ä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/9bc3a7bb34edc5dc17ffcb2a9e64edcef8c7a7b8.1716894910.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915: rearrange DP AUX register macros
Jani Nikula [Tue, 28 May 2024 11:15:40 +0000 (14:15 +0300)]
drm/i915: rearrange DP AUX register macros

Follow the recommended style for grouping register macros.

Reviewed-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/8ace710d8a1edac7e1af1ed12122fb6bc68114e9.1716894910.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915: remove unused DP AUX CH register macros
Jani Nikula [Tue, 28 May 2024 11:15:39 +0000 (14:15 +0300)]
drm/i915: remove unused DP AUX CH register macros

The intermediate macros are no longer needed.

Reviewed-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/c97134b22d802ae82b19c299b79807ee60d9fae5.1716894909.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915/gvt: use proper macros for DP AUX CH CTL registers
Jani Nikula [Tue, 28 May 2024 11:15:38 +0000 (14:15 +0300)]
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ä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/f30d35f28ef106d6fb2faf100fe1c5e3a42dfa20.1716894909.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915: Switch intel_usecs_to_scanlines() to 64bit maths
Ville Syrjälä [Tue, 28 May 2024 18:56:46 +0000 (21:56 +0300)]
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ä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Jani Nikula <[email protected]>
9 months agodrm/i915: Move intel_crtc_scanline_offset()
Ville Syrjälä [Tue, 28 May 2024 18:56:45 +0000 (21:56 +0300)]
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ä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Jani Nikula <[email protected]>
9 months agodrm/i915: Simplify scanline_offset handling for gen2
Ville Syrjälä [Tue, 28 May 2024 18:56:44 +0000 (21:56 +0300)]
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ä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Jani Nikula <[email protected]>
9 months agodrm/i915: Extract intel_mode_vtotal()
Ville Syrjälä [Tue, 28 May 2024 18:56:43 +0000 (21:56 +0300)]
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ä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Jani Nikula <[email protected]>
9 months agodrm/i915: Extract intel_mode_vblank_end()
Ville Syrjälä [Tue, 28 May 2024 18:56:42 +0000 (21:56 +0300)]
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ä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Jani Nikula <[email protected]>
9 months agodrm/i915: Reuse intel_mode_vblank_start()
Ville Syrjälä [Tue, 28 May 2024 18:56:41 +0000 (21:56 +0300)]
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ä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Jani Nikula <[email protected]>
9 months agodrm/i915: Plumb the full atomic state into skl_ddb_add_affected_planes()
Ville Syrjälä [Tue, 28 May 2024 18:49:45 +0000 (21:49 +0300)]
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ä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Jani Nikula <[email protected]>
9 months agodrm/i915: Plumb the full atomic state into icl_check_nv12_planes()
Ville Syrjälä [Tue, 28 May 2024 18:49:44 +0000 (21:49 +0300)]
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ä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Jani Nikula <[email protected]>
9 months agodrm/i915/cdclk: Plumb the full atomic state deeper
Ville Syrjälä [Tue, 28 May 2024 18:49:43 +0000 (21:49 +0300)]
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ä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Jani Nikula <[email protected]>
9 months agodrm/i915/display: add probe message
Jani Nikula [Wed, 22 May 2024 17:33:47 +0000 (20:33 +0300)]
drm/i915/display: add probe message

Add an info message about which display device was probed.

Reviewed-by: Rodrigo Vivi <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/f9a4d015a2981ace2ef5b40b189efeaf6b18fb29.1716399081.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915/display: add support for subplatforms
Jani Nikula [Wed, 22 May 2024 17:33:46 +0000 (20:33 +0300)]
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 <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/8c04e32648395c0b745bc31a1edd4ef6f574bb70.1716399081.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915/display: identify platforms with enum and name
Jani Nikula [Wed, 22 May 2024 17:33:45 +0000 (20:33 +0300)]
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 <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/5dec70931217cd93e3ef34f7a57f949f6683f048.1716399081.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915/display: change display probe to identify GMD ID based platforms
Jani Nikula [Wed, 22 May 2024 17:33:44 +0000 (20:33 +0300)]
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 <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/e26f6a1a0aa2b051f49d76242194f819be3d83fd.1716399081.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915: add LNL PCI IDs
Jani Nikula [Wed, 22 May 2024 17:33:43 +0000 (20:33 +0300)]
drm/i915: add LNL PCI IDs

Although not supported by i915 core, the display code needs to know the
LNL PCI IDs.

Long term, xe and i915 should probably share the file defining PCI IDs.

Reviewed-by: Rodrigo Vivi <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/d2baf7f89ed4df63674dac3d59982de69a7b14d4.1716399081.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915/display: add platform descriptors
Jani Nikula [Wed, 22 May 2024 17:33:42 +0000 (20:33 +0300)]
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 <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/45425c155608403efc149d4a022c0b443aa71200.1716399081.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915/display: change GMD ID display ip ver propagation at probe
Jani Nikula [Wed, 22 May 2024 17:33:41 +0000 (20:33 +0300)]
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 <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/1610e9f5675b4d0d4f16ecd10a86486ce309a283.1716399081.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915/display: check platforms without display one level higher
Jani Nikula [Wed, 22 May 2024 17:33:40 +0000 (20:33 +0300)]
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 <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/78d5d326c4c89f1942f120655c279c9274e96bfb.1716399081.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915/display: change probe for no display case
Jani Nikula [Wed, 22 May 2024 17:33:39 +0000 (20:33 +0300)]
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 <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/8dfac3532a72ca6494c9955987166d9c6e0919bd.1716399081.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915/display: move params copy at probe earlier
Jani Nikula [Wed, 22 May 2024 17:33:38 +0000 (20:33 +0300)]
drm/i915/display: move params copy at probe earlier

Copy the parameters earlier to make subsequent changes easier.

Reviewed-by: Rodrigo Vivi <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/a0c3e74d824d8a7c02fa1461c3d5518a71171256.1716399081.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915/alpm: Add debugfs for LOBF
Animesh Manna [Wed, 29 May 2024 20:07:42 +0000 (01:37 +0530)]
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 <[email protected]>
Signed-off-by: Animesh Manna <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/alpm: Enable lobf from source in ALPM_CTL
Animesh Manna [Wed, 29 May 2024 20:07:41 +0000 (01:37 +0530)]
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 <[email protected]>
Signed-off-by: Animesh Manna <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/alpm: Add compute config for lobf
Animesh Manna [Wed, 29 May 2024 20:07:40 +0000 (01:37 +0530)]
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 <[email protected]>
Signed-off-by: Animesh Manna <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/display: Add missing aux less alpm wake related bits
Jouni Högander [Wed, 29 May 2024 20:07:39 +0000 (01:37 +0530)]
drm/display: Add missing aux less alpm wake related bits

eDP1.5 adds some more bits into DP_RECEIVER_ALPM_CAP and
DP_RECEIVER_ALPM_CONFIG registers. Add definitions for these.

Acked-by: Maxime Ripard <[email protected]>
Reviewed-by: Ankit Nautiyal <[email protected]>
Signed-off-by: Jouni Högander <[email protected]>
Signed-off-by: Animesh Manna <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/alpm: Move alpm related code to a new file
Animesh Manna [Wed, 29 May 2024 20:07:38 +0000 (01:37 +0530)]
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 <[email protected]>
Signed-off-by: Animesh Manna <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/alpm: Move alpm parameters from intel_psr
Animesh Manna [Wed, 29 May 2024 20:07:37 +0000 (01:37 +0530)]
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 <[email protected]>
Signed-off-by: Animesh Manna <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915: move uapi.event outside spinlock in intel_crtc_vblank_work
Luca Coelho [Tue, 28 May 2024 11:29:01 +0000 (14:29 +0300)]
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 <[email protected]>
Reviewed-by: Rodrigo Vivi <[email protected]>
Signed-off-by: Suraj Kandpal <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/bios: double check array-boundary in parse_sdvo_lvds_data
Luca Coelho [Tue, 28 May 2024 11:29:00 +0000 (14:29 +0300)]
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 <[email protected]>
Reviewed-by: Rodrigo Vivi <[email protected]>
Signed-off-by: Suraj Kandpal <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/display: Add compare config for MTL+ platforms
Mika Kahola [Thu, 23 May 2024 13:46:49 +0000 (16:46 +0300)]
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 <[email protected]>
Signed-off-by: Mika Kahola <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/display: Revert "drm/i915/display: Skip C10 state verification in case of...
Mika Kahola [Thu, 23 May 2024 13:46:48 +0000 (16:46 +0300)]
drm/i915/display: Revert "drm/i915/display: Skip C10 state verification in case of fastset"

This reverts commit a1d91c6e989d0e66b89aa911f2cd459d7bdebbe5.

Reviewed-by: Jani Nikula <[email protected]>
Signed-off-by: Mika Kahola <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/hdcp: Fix IS_METEORLAKE usage for HDCP line rekeying
Suraj Kandpal [Mon, 27 May 2024 05:21:19 +0000 (10:51 +0530)]
drm/i915/hdcp: Fix IS_METEORLAKE usage for HDCP line rekeying

Replace IS_METEORLAKE usage with a more appropriate macro. While
we are at it also add the stepping restrictions for other platforms.

Fixes: 6a3691ca4799 ("drm/i915/hdcp: Disable HDCP Line Rekeying for HDCP2.2 on HDMI")
Signed-off-by: Suraj Kandpal <[email protected]>
Reviewed-by: Dnyaneshwar Bhadane <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/psr: modify psr status debugfs to support eDP Panel Replay
Jouni Högander [Tue, 28 May 2024 11:44:55 +0000 (14:44 +0300)]
drm/i915/psr: modify psr status debugfs to support eDP Panel Replay

Some PSR2_CTL bits are applicable for eDP panel replay as well.
Dump this register for eDP Panel Replay as well.

Bspec: 68920

Signed-off-by: Jouni Högander <[email protected]>
Reviewed-by: Animesh Manna <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/psr: Move printing PSR mode to own function
Jouni Högander [Tue, 28 May 2024 11:44:54 +0000 (14:44 +0300)]
drm/i915/psr: Move printing PSR mode to own function

intel_psr_status has grown and is about to grow even. Let's split it a bit
and move printing PSR mode to an own function.

v2: s/intel_psr_psr_mode/intel_psr_print_mode/

Signed-off-by: Jouni Högander <[email protected]>
Reviewed-by: Animesh Manna <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/psr: Move printing sink PSR support to own function
Jouni Högander [Tue, 28 May 2024 11:44:53 +0000 (14:44 +0300)]
drm/i915/psr: Move printing sink PSR support to own function

intel_psr_status has grown and is about to grow even. Let's split it a bit
and move printing sink psr support to an own function.

Signed-off-by: Jouni Högander <[email protected]>
Reviewed-by: Animesh Manna <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/panel replay: Add edp1.5 Panel Replay bits and register
Jouni Högander [Tue, 28 May 2024 11:44:52 +0000 (14:44 +0300)]
drm/panel replay: Add edp1.5 Panel Replay bits and register

Add PANEL_REPLAY_CONFIGURATION_2 register and some missing Panel Replay
bits.

Signed-off-by: Jouni Högander <[email protected]>
Reviewed-by: Animesh Manna <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Acked-by: Maarten Lankhorst <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915/psr: Store pr_dpcd in intel_dp
Jouni Högander [Tue, 28 May 2024 11:44:51 +0000 (14:44 +0300)]
drm/i915/psr: Store pr_dpcd in intel_dp

We need pr_dpcd contents for early transport validity check on eDP Panel
Replay and in debugfs interface to dump out panel early transport
capability. Also remove unnecessarily printing out "Panel replay is not
supported by panel"

v2: commit message modified

Signed-off-by: Jouni Högander <[email protected]>
Reviewed-by: Animesh Manna <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
9 months agodrm/i915: pass dev_priv explicitly to ADL_TVIDEO_DIP_AS_SDP_DATA
Jani Nikula [Mon, 27 May 2024 11:10:53 +0000 (14:10 +0300)]
drm/i915: pass dev_priv explicitly to ADL_TVIDEO_DIP_AS_SDP_DATA

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the ADL_TVIDEO_DIP_AS_SDP_DATA register macro.

Reviewed-by: Chaitanya Kumar Borah <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/75a4f817f7c73277b2b8021275ccb9a4f3716953.1716808214.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915: pass dev_priv explicitly to ICL_VIDEO_DIP_PPS_ECC
Jani Nikula [Mon, 27 May 2024 11:10:52 +0000 (14:10 +0300)]
drm/i915: pass dev_priv explicitly to ICL_VIDEO_DIP_PPS_ECC

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the ICL_VIDEO_DIP_PPS_ECC register macro.

Reviewed-by: Chaitanya Kumar Borah <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/620fd2da6eea334bf9a5d1b93717ca1176c4203e.1716808214.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915: pass dev_priv explicitly to ICL_VIDEO_DIP_PPS_DATA
Jani Nikula [Mon, 27 May 2024 11:10:51 +0000 (14:10 +0300)]
drm/i915: pass dev_priv explicitly to ICL_VIDEO_DIP_PPS_DATA

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the ICL_VIDEO_DIP_PPS_DATA register macro.

Reviewed-by: Chaitanya Kumar Borah <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/fb7c308dd655d1bc4af44ab9c88b5f5245d8a5d6.1716808214.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915: pass dev_priv explicitly to GLK_TVIDEO_DIP_DRM_DATA
Jani Nikula [Mon, 27 May 2024 11:10:50 +0000 (14:10 +0300)]
drm/i915: pass dev_priv explicitly to GLK_TVIDEO_DIP_DRM_DATA

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the GLK_TVIDEO_DIP_DRM_DATA register macro.

Reviewed-by: Chaitanya Kumar Borah <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/bab2d0385b748c34bec262afaf491be881990033.1716808214.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915: pass dev_priv explicitly to HSW_TVIDEO_DIP_VSC_DATA
Jani Nikula [Mon, 27 May 2024 11:10:49 +0000 (14:10 +0300)]
drm/i915: pass dev_priv explicitly to HSW_TVIDEO_DIP_VSC_DATA

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the HSW_TVIDEO_DIP_VSC_DATA register macro.

Reviewed-by: Chaitanya Kumar Borah <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/2f0ed82eb9c759feb3978e38f3b2835f359d6d1f.1716808214.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915: pass dev_priv explicitly to HSW_TVIDEO_DIP_GMP_DATA
Jani Nikula [Mon, 27 May 2024 11:10:48 +0000 (14:10 +0300)]
drm/i915: pass dev_priv explicitly to HSW_TVIDEO_DIP_GMP_DATA

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the HSW_TVIDEO_DIP_GMP_DATA register macro.

Reviewed-by: Chaitanya Kumar Borah <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/fff766dca0e790a801fb7d1ad78980da69d3b9f7.1716808214.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915: pass dev_priv explicitly to HSW_TVIDEO_DIP_SPD_DATA
Jani Nikula [Mon, 27 May 2024 11:10:47 +0000 (14:10 +0300)]
drm/i915: pass dev_priv explicitly to HSW_TVIDEO_DIP_SPD_DATA

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the HSW_TVIDEO_DIP_SPD_DATA register macro.

Reviewed-by: Chaitanya Kumar Borah <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/97412857f7580994ea9c9c0c8f5f778261f7e71b.1716808214.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915: pass dev_priv explicitly to HSW_TVIDEO_DIP_VS_DATA
Jani Nikula [Mon, 27 May 2024 11:10:46 +0000 (14:10 +0300)]
drm/i915: pass dev_priv explicitly to HSW_TVIDEO_DIP_VS_DATA

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the HSW_TVIDEO_DIP_VS_DATA register macro.

Reviewed-by: Chaitanya Kumar Borah <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/6f676d9b2bce0d4911e888c5efeacaddef98579c.1716808214.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915: pass dev_priv explicitly to HSW_TVIDEO_DIP_AVI_DATA
Jani Nikula [Mon, 27 May 2024 11:10:45 +0000 (14:10 +0300)]
drm/i915: pass dev_priv explicitly to HSW_TVIDEO_DIP_AVI_DATA

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the HSW_TVIDEO_DIP_AVI_DATA register macro.

Reviewed-by: Chaitanya Kumar Borah <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/113e40bf4d42a38c1be09a7ce0159dc828356ebc.1716808214.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915: pass dev_priv explicitly to HSW_TVIDEO_DIP_GCP
Jani Nikula [Mon, 27 May 2024 11:10:44 +0000 (14:10 +0300)]
drm/i915: pass dev_priv explicitly to HSW_TVIDEO_DIP_GCP

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the HSW_TVIDEO_DIP_GCP register macro.

Reviewed-by: Chaitanya Kumar Borah <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/36f0b90f07c7aa78e88fadb375359df39ecd0a77.1716808214.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915: pass dev_priv explicitly to HSW_TVIDEO_DIP_CTL
Jani Nikula [Mon, 27 May 2024 11:10:43 +0000 (14:10 +0300)]
drm/i915: pass dev_priv explicitly to HSW_TVIDEO_DIP_CTL

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the HSW_TVIDEO_DIP_CTL register macro.

Reviewed-by: Chaitanya Kumar Borah <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/7261777d02eeb94093ed3510989c6809c66d50da.1716808214.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915: pass dev_priv explicitly to PP_DIVISOR
Jani Nikula [Mon, 27 May 2024 10:42:02 +0000 (13:42 +0300)]
drm/i915: pass dev_priv explicitly to PP_DIVISOR

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the PP_DIVISOR register macro.

Reviewed-by: Chaitanya Kumar Borah <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/28e9f7e3570c15ac5c229048ec0def2e4a667ffc.1716806471.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915: pass dev_priv explicitly to PP_OFF_DELAYS
Jani Nikula [Mon, 27 May 2024 10:42:01 +0000 (13:42 +0300)]
drm/i915: pass dev_priv explicitly to PP_OFF_DELAYS

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the PP_OFF_DELAYS register macro.

Reviewed-by: Chaitanya Kumar Borah <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/122e143ff6a1c1016534dae0ba28fde0b15e3e76.1716806471.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915: pass dev_priv explicitly to PP_ON_DELAYS
Jani Nikula [Mon, 27 May 2024 10:42:00 +0000 (13:42 +0300)]
drm/i915: pass dev_priv explicitly to PP_ON_DELAYS

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the PP_ON_DELAYS register macro.

Reviewed-by: Chaitanya Kumar Borah <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/0fc707fde15bc11893b6e1d5038162368e3a2b8d.1716806471.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915: pass dev_priv explicitly to PP_CONTROL
Jani Nikula [Mon, 27 May 2024 10:41:59 +0000 (13:41 +0300)]
drm/i915: pass dev_priv explicitly to PP_CONTROL

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the PP_CONTROL register macro.

Reviewed-by: Chaitanya Kumar Borah <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/01024887af682d4c9ddfb440af98284c44422df7.1716806471.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915: pass dev_priv explicitly to PP_STATUS
Jani Nikula [Mon, 27 May 2024 10:41:58 +0000 (13:41 +0300)]
drm/i915: pass dev_priv explicitly to PP_STATUS

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the PP_STATUS register macro.

Reviewed-by: Chaitanya Kumar Borah <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/7b76be10723f36d6e1b45be76d112a4b178ef493.1716806471.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
9 months agodrm/i915: pass dev_priv explicitly to _MMIO_PPS
Jani Nikula [Mon, 27 May 2024 10:41:57 +0000 (13:41 +0300)]
drm/i915: pass dev_priv explicitly to _MMIO_PPS

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the _MMIO_PPS register macro.

While at it, use __to_intel_display() to allow passing in struct
intel_display at a later time.

Reviewed-by: Chaitanya Kumar Borah <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/1e9f3ef7eee65946c0e6bf06cc2547a38e8dab78.1716806471.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
This page took 0.105907 seconds and 4 git commands to generate.