Jani Nikula
37310936c3
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 <rodrigo.vivi@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/bc3a722413e20db905671e58627ba6d757f41c63.1717004739.git.jani.nikula@intel.com
2024-06-06 15:59:50 +03:00
Jani Nikula
8411aa0c55
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 <rodrigo.vivi@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/a5dbb8d46403761bd8518db45fa71dc55930d3cf.1717004739.git.jani.nikula@intel.com
2024-06-06 15:59:42 +03:00
Jani Nikula
03f8db65ad
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 <rodrigo.vivi@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/df73c0934ad21f157714a41b33b81cebd2a523a6.1717004739.git.jani.nikula@intel.com
2024-06-06 15:59:29 +03:00
Jani Nikula
27e3b4ee63
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 <rodrigo.vivi@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/6ac3480a8689fda5aaf4007cb604e06e939a03f7.1717004739.git.jani.nikula@intel.com
2024-06-06 15:59:08 +03:00
Jani Nikula
dd3cac0ac7
drm/i915: drop redundant W=1 warnings from Makefile
...
Since commit a61ddb4393 ("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 <lucas.demarchi@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/490931748fa9a1dbac2bceda0c4b778240b10b58.1716471145.git.jani.nikula@intel.com
2024-06-05 14:07:31 +03:00
Ville Syrjälä
17419f5c6d
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ä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240531115342.2763-8-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2024-06-05 12:49:02 +03:00
Ville Syrjälä
fddb9fa961
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ä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240531115342.2763-7-ville.syrjala@linux.intel.com
Acked-by: Jani Nikula <jani.nikula@intel.com >
2024-06-05 12:48:01 +03:00
Ville Syrjälä
31951bbe3e
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ä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240531115342.2763-6-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2024-06-05 12:47:50 +03:00
Ville Syrjälä
7bd7cfa833
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ä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240531115342.2763-5-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2024-06-05 12:46:59 +03:00
Ville Syrjälä
1ec6defe71
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ä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240531115342.2763-4-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2024-06-05 12:46:43 +03:00
Ville Syrjälä
1c1bfd8b0b
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ä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240531115342.2763-3-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2024-06-05 12:46:34 +03:00
Ville Syrjälä
ccb6ba9eba
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ä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240531115342.2763-2-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2024-06-05 12:46:26 +03:00
Ville Syrjälä
8b329d74fb
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ä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240531114101.19994-5-ville.syrjala@linux.intel.com
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2024-06-05 12:45:56 +03:00
Ville Syrjälä
81d604f44b
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ä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240531114101.19994-4-ville.syrjala@linux.intel.com
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2024-06-05 12:45:34 +03:00
Ville Syrjälä
738f3d8618
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ä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240531114101.19994-3-ville.syrjala@linux.intel.com
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2024-06-05 12:45:23 +03:00
Ville Syrjälä
7f57f21510
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ä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240531114101.19994-2-ville.syrjala@linux.intel.com
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2024-06-05 12:45:13 +03:00
Imre Deak
30ca6365bb
drm/i915: Fix assert on pending async-put power domain work when it requeues itself
...
Commit dd839aa857 ("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 <imre.deak@intel.com >
Reviewed-by: Jouni Högander <jouni.hogander@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240530105312.1016485-1-imre.deak@intel.com
2024-06-04 19:30:09 +03:00
Jouni Högander
b330568f0c
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 <animesh.manna@intel.com >
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240529093849.1016172-7-jouni.hogander@intel.com
2024-06-03 11:23:18 +03:00
Jouni Högander
04d0aed082
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 <animesh.manna@intel.com >
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240529093849.1016172-6-jouni.hogander@intel.com
2024-06-03 11:23:09 +03:00
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
cef26c2481
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 <joonas.lahtinen@linux.intel.com >
Cc: Lucas De Marchi <lucas.demarchi@intel.com >
Cc: Oded Gabbay <ogabbay@kernel.org >
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com >
Cc: Tvrtko Ursulin <tursulin@ursulin.net >
Reviewed-by: Andi Shyti <andi.shyti@linux.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/e0fdf28307bb3e457d8c67966c09c44cf7ff5783.1717075103.git.jani.nikula@intel.com
2024-05-31 16:11:39 +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
e051d64b0a
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 <daniel@ffwll.ch >
Cc: Dave Airlie <airlied@gmail.com >
Cc: Lucas De Marchi <lucas.demarchi@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/e19543f2ae978678c2ff814454f07c96ccd02175.1717075103.git.jani.nikula@intel.com
2024-05-31 16:11:33 +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