Jani Nikula
fb48cb4355
drm/i915/display: use to_intel_uncore() to avoid i915_drv.h
...
A number of places that include i915_drv.h only need it to get from
display to i915 to uncore. We have to_intel_uncore() for that, use it to
avoid the i915_drv.h include.
v2: Rebase
Cc: Ville Syrjala <ville.syrjala@linux.intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Reviewed-by: Michał Grzelak <michal.grzelak@intel.com >
Link: https://patch.msgid.link/44a5d526a097ab9276e60162263fa8cd23325ce7.1766406794.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-12-29 12:31:13 +02:00
Jani Nikula
b8660fa662
drm/i915/dram: convert to struct intel_display
...
Convert everything except uncore access to struct
intel_display. Converting the graphics version checks to display version
checks needs a tweak for display version 13, which have graphics version
12.
While at it, convert logging to drm_dbg_kms().
v2: Handle display version 13
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patch.msgid.link/20251120161846.3128999-1-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-11-21 12:12:11 +02:00
Jani Nikula
ed46f724b7
drm/i915: move intel_dram.[ch] from soc/ to display/
...
The remaining users of intel_dram.[ch] are all in display. Move them
under display.
This allows us to remove the compat soc/intel_dram.h from xe.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patch.msgid.link/4c0fbdab989a70d287536a7eafb002dc836ced12.1763578288.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-11-21 12:12:00 +02:00
Dave Airlie
e237dfe708
Merge tag 'drm-misc-next-2025-11-05-1' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next
...
drm-misc-next for v6.19-rc1:
UAPI Changes:
- Add userptr support to ivpu.
- Add IOCTL's for resource and telemetry data in amdxdna.
Core Changes:
- Improve some atomic state checking handling.
- drm/client updates.
- Use forward declarations instead of including drm_print.h
- RUse allocation flags in ttm_pool/device_init and allow specifying max
useful pool size and propagate ENOSPC.
- Updates and fixes to scheduler and bridge code.
- Add support for quirking DisplayID checksum errors.
Driver Changes:
- Assorted cleanups and fixes in rcar-du, accel/ivpu, panel/nv3052cf,
sti, imxm, accel/qaic, accel/amdxdna, imagination, tidss, sti,
panthor, vkms.
- Add Samsung S6E3FC2X01 DDIC/AMS641RW, Synaptics TDDI series DSI,
TL121BVMS07-00 (IL79900A) panels.
- Add mali MediaTek MT8196 SoC gpu support.
- Add etnaviv GC8000 Nano Ultra VIP r6205 support.
- Document powervr ge7800 support in the devicetree.
Signed-off-by: Dave Airlie <airlied@redhat.com >
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Link: https://patch.msgid.link/5afae707-c9aa-4a47-b726-5e1f1aa7a106@linux.intel.com
2025-11-07 12:41:26 +10:00
Jani Nikula
f6e8dc9edf
drm: include drm_print.h where needed
...
There are a gazillion files that depend on drm_print.h being indirectly
included via drm_buddy.h, drm_mm.h, or ttm/ttm_resource.h. In
preparation for removing those includes, explicitly include drm_print.h
where needed.
Cc: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://lore.kernel.org/r/5fe67395907be33eb5199ea6d540e29fddee71c8.1761734313.git.jani.nikula@intel.com
2025-10-31 10:34:52 +02:00
Ville Syrjälä
324ccdb5ce
drm/i915/wm: Use fb->modfier to check for tiled vs. untiled
...
There is no point in checking the bo fence tiling mode when
we can just check the fb modifier instead.
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/20251003145734.7634-6-ville.syrjala@linux.intel.com
2025-10-09 21:03:03 +03:00
Ville Syrjälä
413439008c
drm/i915/dram: Use intel_dram_type_str() for pnv
...
Replace the hand rolled PNV memory type printk string
stuff with intel_dram_type_str().
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250902133113.18778-3-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2025-09-05 14:37:32 +03:00
Jani Nikula
7f38db435c
drm/i915/wm: use generic poll_timeout_us() instead of wait_for()
...
Prefer generic poll helpers over i915 custom helpers.
The functional change is losing the exponentially growing sleep of
wait_for(), which used to be 10, 20, 40, ..., 640, and 1280 us.
Use an arbitrary constant 500 us sleep instead. The timeout remains at 3
ms.
Reviewed-by: Jouni Högander <jouni.hogander@intel.com >
Link: https://lore.kernel.org/r/52c80860ea7b98e84f2386ed6cdd761f03190b1e.1756383233.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-09-04 14:02:58 +03:00
Jani Nikula
0492e13eb8
drm/i915/dram: move fsb_freq and mem_freq to dram info
...
Store fsb_freq and mem_freq in dram info the same way we do for other
memory info on later platforms for a slightly more unified approach.
This allows us to remove fsb_freq, mem_freq and is_ddr3 members from
struct drm_i915_private and struct xe_device.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://lore.kernel.org/r/a38c4b105ba9098fa0b128cb86cd4eb63bcc27e8.1755511595.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-08-19 11:20:40 +03:00
Jani Nikula
188bdfb776
drm/i915: split out display register macros to a separate file
...
This is a scripted split of the display related register macros from
i915_reg.h to display/intel_display_regs.h. As a starting point, move
all the macros that are only used in display code (or GVT). If there are
users in core i915 code or soc/, or no users anywhere, keep the macros
in i915_reg.h. This is done in groups of macros separated by blank
lines, moving the comments along with the groups.
Some manually picked macro groups are kept/moved regardless of the
heuristics above.
This is obviously a very crude approach. It's not perfect. But there are
4.2k lines in i915_reg.h, and its refactoring has ground to a halt. This
is the big hammer that splits the file to two, and enables further
cleanup.
Cc: Suraj Kandpal <suraj.kandpal@intel.com >
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Cc: Lucas De Marchi <lucas.demarchi@intel.com >
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com > # v2
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://lore.kernel.org/r/20250606102256.2080073-1-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-06-09 13:25:10 +03:00
Jani Nikula
bd4d1856f5
drm/i915: convert VLV IOSF SB interface to struct drm_device
...
With users both in i915 core and display, struct drm_device is the
common denominator for the VLV IOSF SB users. Also use drm_device for
the helpers on the display side to keep the static inlines as simple as
possible.
We can drop a number of dependencies on i915_drv.h with this.
v2,v3: Rebase
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://lore.kernel.org/r/c1d013ed88ce2e3e5bdc15ce3bf01a3960b1e817.1747061743.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-05-13 10:26:45 +03:00
Jani Nikula
8393253b85
drm/i915: move VLV IOSF SB unit specific helpers under display
...
Now that all the VLV IOSF SB unit specific helper users are under
display, relocate the helpers themselves under display as
well. Resurrect the vlv_sideband.[ch] name for this. Make everything
except DPIO helpers static inlines, as their implementations are
trivial.
All of this considerably simplifies the xe compat header.
v2: Rebase
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://lore.kernel.org/r/e86c2498c9f1c1d30f8e83fa5f1c23526b87b9ab.1747061743.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-05-13 10:26:45 +03:00
Jani Nikula
6819b5a67e
drm/i915: rename vlv_sideband*.[ch] to vlv_iosf_sb*.[ch]
...
Be more specific in the naming, and follow the existing function naming
pattern of vlv_iosf_sb_*() in the file.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://lore.kernel.org/r/d3d97d34a197ba801c558c3fd72b29f9e5c783af.1747061743.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-05-13 10:26:44 +03:00
Jani Nikula
4e9b0ac17f
drm/i915/display: pass struct intel_display to PCH macros
...
Now that INTEL_PCH_TYPE() and HAS_PCH_*() macros are under display, and
accept a struct intel_display pointer, use that instead of struct
drm_i915_private pointer in display code.
This is done naively by running:
$ sed -i 's/\(INTEL_PCH_TYPE\|HAS_PCH_[A-Z0-9_-]*\)([^)]*)/\1(display)/g' \
$(find drivers/gpu/drm/i915/display -name "*.c")
and fixing the fallout, i.e. removing unused local i915 variables and
adding display variables where needed.
v2: Rebase
Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com >
Link: https://lore.kernel.org/r/999f4d7b8ed11739b1c5ec8d6408fc39d5e3776b.1744880985.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-04-22 15:46:29 +03:00
Jani Nikula
d35b913f0e
drm/i915/wm: convert i9xx_wm.c internally to struct intel_display
...
Going forward, struct intel_display is the main display device data
pointer. Convert as much as possible of i9xx_wm.c to struct
intel_display.
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com >
Link: https://lore.kernel.org/r/bbee93f837fe7fedfd1627ff6fa295da8881df8d.1744119460.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-04-09 17:27:35 +03:00
Jani Nikula
d0e7412505
drm/i915/wm: convert i9xx_wm.c to intel_de_*() register interface
...
The registers handled in i9xx_wm.c are mostly display registers. The
MCH_SSKPD and MLTR_ILK registers are not. Convert register access to
intel_de_*() interface where applicaple.
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com >
Link: https://lore.kernel.org/r/68367382759570413669d5648895a1da8f6c68f7.1744119460.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-04-09 17:27:35 +03:00
Jani Nikula
ddb062b0e2
drm/i915/wm: convert i9xx_wm.h external interfaces to struct intel_display
...
Going forward, struct intel_display is the main display device data
pointer. Convert the i9xx_wm.h interface to struct intel_display.
With this, we can make intel_wm.c independent of i915_drv.h.
v2: Also remove i915_drv.h, fix commit message
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com >
Link: https://lore.kernel.org/r/3e30634d85c0e0aac9c95f9a2f928131ba400271.1744119460.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-04-09 17:27:35 +03:00
Jani Nikula
788f205f3c
drm/i915/wm: convert intel_wm.h external interfaces to struct intel_display
...
Going forward, struct intel_display is the main display device data
pointer. Convert the intel_wm.h interface as well as the hooks in struct
intel_wm_funcs to struct intel_display.
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com >
Link: https://lore.kernel.org/r/1085900b4e46bbb514e6918c321639ac380331ce.1744119460.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2025-04-09 17:27:35 +03:00
Ville Syrjälä
dbf1b1ed55
drm/i915: Split wm sanitize from readout
...
I'll need to move the wm readout to an earlier point in the
sequence (since the bw state readout will need ddb information
from the wm readout). But (at least for now) the wm sanitation
will need to stay put as it needs to also sanitize things for
any pipes/planes we disable later during the hw state takeover.
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250306163420.3961-16-ville.syrjala@linux.intel.com
2025-03-07 19:02:55 +02:00
Nitin Gote
c55af00652
drm/i915/display: fix typos in i915/display files
...
Fix all typos in files under drm/i915/display reported by codespell tool.
v2:
- Include british and american spelling, as those are
not typos.
- Fix commenting style. <Jani>
v3: Fix "In case" wrongly capitalized and
also fix comment style. <Krzysztof Niemiec>
Signed-off-by: Nitin Gote <nitin.r.gote@intel.com >
Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250120081517.3237326-8-nitin.r.gote@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2025-01-23 05:48:23 -05:00
Jani Nikula
aea0ec7e26
drm/i915: split out i9xx_wm_regs.h
...
Very few files need the i9xx watermark related registers. Split them out
to a dedicated file.
Reviewed-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241213115111.335474-1-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-12-16 14:20:02 +02:00
Ville Syrjälä
61b1058091
drm/i915: Rename variables in ilk_intermedidate_wm()
...
ilk_compute_intermediate_wm() uses rather poor variable names
for its watermark structs. Borrow a better naming convention
from the g4x/vlv counterpart code.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240916162413.8555-8-ville.syrjala@linux.intel.com
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com >
2024-09-24 10:56:17 +03:00
Ville Syrjälä
d77037bba7
drm/i915: s/disable_lp_wm/disable_cxsr/
...
The ilk+ disable_lp_wm boolean has the exact same role as
disable_cxsr for gmch platforms. The documentation also
still talks about CxSR on ilk+ even theough the way you
control it has now change to involve toggling the LP watermarks.
Get rid of disable_lp_wm and just use disable_cxsr for ilk+
as well.
TODO: Unify even more to not have any gmch vs. ilk+
details in high level modeset code...
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240916162413.8555-7-ville.syrjala@linux.intel.com
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com >
2024-09-24 10:56:11 +03:00
Ville Syrjälä
7572d3f72e
drm/i915: Move the dodgy pre-g4x wm stuff into i9xx_wm
...
As with other watermark calculations, the dodgy pre-g4x
update_wm_{pre,post} flag calcultion would like to know
if a modeset is about to happen or not, and technically
later stages in the atomic_check() may still flag one.
In practice that shouldn't happen as we don't have dynamic
CDCLK implemented for these old platforms.
Regardless it'll be nice to move this old cruft out from
the supposedly platform agnostic plane code.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240916162413.8555-6-ville.syrjala@linux.intel.com
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com >
2024-09-24 10:45:21 +03:00
Ville Syrjälä
9cf6f05cc5
drm/i915: Combine .compute_{pipe,intermediate}_wm() into one
...
We always call .compute_pipe_wm() and .compute_intermediate_wm()
back to back. Just combine them to a single hook for simplicity.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240916162413.8555-3-ville.syrjala@linux.intel.com
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com >
2024-09-24 10:43:45 +03:00
Jani Nikula
17cd58a8f1
drm/i915/display: start a buffer object abstraction layer
...
The display code needs to deal with gem objects, and mostly uses struct
drm_i915_gem_object. That's not great, because for xe we need to
redefine it struct xe_bo during build.
Start a common interface using struct drm_gem_object, with separate
implementations for i915 and xe. For starters, convert i9xx_wm.c to use
it.
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@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/df6867523a0b5fdd4eb63f657f545603ae6f6e0b.1726589119.git.jani.nikula@intel.com
2024-09-19 16:18:35 +03:00
Jani Nikula
307fa41577
drm/i915/display: convert intel_display_trace.h to struct intel_display
...
Going forward, struct intel_display shall replace struct
drm_i915_private as the main display device data pointer type. Convert
intel_display_trace.h to struct intel_display.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240904130633.3831492-2-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-09-05 21:08:09 +03:00
Jani Nikula
138d2bda4e
drm/i915/display: pass display to intel_crtc_for_pipe()
...
Convert the intel_crtc_for_pipe() struct drm_i915_private parameter to
struct intel_display.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240904130633.3831492-1-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-09-05 21:05:42 +03:00
Jani Nikula
9af06d0947
drm/i915/fb: hide the guts of intel_fb_obj()
...
Use a proper function in intel_fb.[ch] for intel_fb_obj() to be able to
drop the gem/i915_gem_object_types.h from intel_display_types.h.
Reviewed-by: Luca Coelho <luciano.coelho@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/c5ff0d355911903809ba366403192243c05d3427.1724689818.git.jani.nikula@intel.com
2024-09-05 12:21:27 +03:00
Jani Nikula
4e66f73ee0
drm/i915/wm: move struct intel_watermark_params to i9xx_wm.c
...
The definition is only used within i9xx_wm.c, hide it there.
Reviewed-by: Luca Coelho <luciano.coelho@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/d7408290c909eb67fc7a935469a3c6287b58587d.1724689818.git.jani.nikula@intel.com
2024-09-05 12:21:02 +03:00
Andi Shyti
6600c55ba0
drm/i915: Replace double blank with single blank after comma
...
Do not use double blanks, ", " in function parameters where it's
not required by any alignment purpose. Replase it with a single
blank, ", ".
Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com >
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240807130516.491053-3-andi.shyti@linux.intel.com
2024-08-08 12:26:33 +01:00
Jani Nikula
a4ad402078
drm/i915: convert fsb_freq and mem_freq to kHz
...
We'll want to use fsb frequency for deriving GT clock and rawclk
frequencies in the future. Increase the accuracy by converting to
kHz. Do the same for mem freq to be aligned.
Round the frequencies ending in 666 to 667.
v2: Also handle mem_freq in gen5_rps_init() (Ville)
Reviewed-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/17fe2544b876549f63fac0f956273f5f282081b3.1718356614.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-06-17 11:54:31 +03:00
Jani Nikula
322dc10b2a
drm/i915/wm: clarify logging on not finding CxSR latency config
...
Clarify and unify the logging on not finding PNV CxSR latency
config.
Just let the i915->fsb_freq == 0 || i915->mem_freq == 0 case go through
the table instead of checking for it separately.
v2: Do not check for fsb == 0 || mem == 0 separately (Matt)
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/6333cb0675c531e971e829105f1ecfc4d71bdc6b.1718356614.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-06-17 11:54:30 +03:00
Jani Nikula
105dadedc4
drm/i915/wm: rename intel_get_cxsr_latency -> pnv_get_cxsr_latency
...
Clarify that the function is specific to PNV, making subsequent changes
slightly easier to grasp.
Reviewed-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/7d4e3c9a4220ff84af2741e5cd7bb62d1b4f2a44.1718356614.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-06-17 11:54:30 +03:00
Jani Nikula
446db74bd3
drm/i915: pass dev_priv explicitly to DSPFW3
...
Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the DSPFW3 register macro.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/856978ed413e537b7d46eed5e8d93bdfd7c80fc6.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-06-07 11:28:28 +03:00
Jani Nikula
51946d0c75
drm/i915: pass dev_priv explicitly to DSPFW2
...
Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the DSPFW2 register macro.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/ba349f90b6614605c52f58ae048961c7b4da4495.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-06-07 11:27:04 +03:00
Jani Nikula
42879a6520
drm/i915: pass dev_priv explicitly to DSPFW1
...
Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the DSPFW1 register macro.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/4843726dff7d95e4127fb948073c9e4addc1e683.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-06-07 11:25:35 +03:00
Jani Nikula
f0fea98148
drm/i915: pass dev_priv explicitly to DSPARB
...
Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the DSPARB register macro.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/9e8dc8978ce3122a0e9c53778be547875a9ae6d8.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-06-07 11:13:18 +03:00
Ville Syrjälä
1db5efe51f
drm/i915/wm: Use per-device debugs ilk wm code
...
Switch to drm_dbg_kms() in the ilk wm code so we see which
device generated the debugs. Need to plumb i915 a bit deeper
to make that happen.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240208151720.7866-12-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2024-02-09 14:34:16 +02:00
Ville Syrjälä
167712d82a
drm/i915/wm: Use per-device debugs in pre-ilk wm code
...
Switch to drm_dbg_kms() in the pre-ilk wm code so we see which
device generated the debugs. Need to plumb i915 a bit deeper
to make that happen.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240208151720.7866-11-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2024-02-09 14:34:06 +02:00
Ville Syrjälä
29d7a5b4d2
drm/i915/wm: Pass the whole i915 to intel_get_cxsr_latency()
...
Just pass the whole i915 to intel_get_cxsr_latency() instead
of having each caller dig out bits and pieces.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240208151720.7866-10-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2024-02-09 14:33:23 +02:00
Ville Syrjälä
ed1566a982
drm/i915: Drop crtc NULL check from intel_crtc_active()
...
intel_crtc_active() is never called with a NULL crtc. Drop
the redundant NULL check.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20231207193441.20206-5-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2023-12-08 20:32:16 +02:00
Ville Syrjälä
8dfce5f309
drm/i915: Clean up some DISPLAY_VER checks
...
Use the >= and < operators for the DISPLAY_VER checks everywhere.
This is what most of the code does, but especially recently random
pieces of code have started doing this differently for no good reason.
Conversion done with the following cocci:
@find@
expression i915;
constant ver;
@@
(
DISPLAY_VER(i915) <= ver
|
DISPLAY_VER(i915) > ver
)
@script:python inc@
old_ver << find.ver;
new_ver;
@@
coccinelle.new_ver = str(int(old_ver) + 1)
@@
expression find.i915;
constant find.ver;
identifier inc.new_ver;
@@
(
- DISPLAY_VER(i915) <= ver
+ DISPLAY_VER(i915) < new_ver
|
- DISPLAY_VER(i915) > ver
+ DISPLAY_VER(i915) >= new_ver
)
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20231127145028.4899-4-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2023-11-29 17:06:36 +02:00
Jouni Högander
6f4f8aef7e
drm/i915/display: Move enable_fbc module parameter under display
...
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Acked-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Luca Coelho <luciano.coelho@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20231024124109.384973-4-jouni.hogander@intel.com
2023-10-26 12:13:50 +03:00
Jani Nikula
476f62b8a5
drm/i915: use explicit includes for i915_reg.h and i915_irq.h
...
A lot of places include i915_reg.h implicitly via i915_irq.h, which gets
included implicitly via intel_display_trace.h. Remove the includes from
the headers, and include i915_reg.h and i915_irq.h explicitly where
needed.
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230419094243.366821-1-jani.nikula@intel.com
2023-04-19 15:55:05 +03:00
Ville Syrjälä
76ec692721
drm/i915: Flag purely internal commits to not clear crtc_state->inherited
...
If we have to force the hardware to go through a full modeset
due to eg. cdclk reprogramming, we need to preserve
crtc_state->inherited for all crtcs that have not otherwise
gone through the whole compute_config() stuff after connectors
have been detected.
Otherwise eg. cdclk induced modeset glk_force_audio_cdclk()
will clear the inherited flag, and thus the first real commit
coming from userspace later on will not be forced through
the full .compute_config() path and so eg. audio state may
not get properly recomputed.
But instead of adding all kinds of ad-hoc crtc_state->inherited
preservation hacks all over, let's change things so that we
only clear it for the crtcs directly included in userspace/client
initiated commits.
Should be far less fragile since now we just need to remember
to flag the internal commits, and not worry about where new
crtcs might get pulled in.
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5260
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230328122357.1697-1-ville.syrjala@linux.intel.com
Reviewed-by: Luca Coelho <luciano.coelho@intel.com >
2023-04-13 14:22:42 +03:00
Jani Nikula
95ccb25e32
drm/i915: remove unnecessary intel_pm.h includes
...
As intel_pm.[ch] used to contain much more, intel_pm.h was included in a
lot of places. Many of them are now unnecessary. Remove.
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/ab9a7147b0cd63d95b9f27ed40615b9c9be18f84.1677678803.git.jani.nikula@intel.com
2023-03-06 18:26:30 +02:00
Jani Nikula
ae2ac2d806
drm/i915/wm: remove ILK+ nop funcs fallback
...
Disabling ILK+ watermarks on failure to read the watermark levels dates
back to 2010 and commit 7f8a85698f ("drm/i915: Add the support of
memory self-refresh on Ironlake"), with no explanations, and it's been
copied and modified from that ever since. Finally drop it.
If the value are actually zero, the ilk_compute_*_wm() functions should
handle it gracefully.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230215141910.433043-5-jani.nikula@intel.com
2023-02-16 16:46:36 +02:00
Jani Nikula
7380f545a8
drm/i915/wm: warn about ilk_wm_sanitize() on display ver 9+
...
The sanitization should be limited to PCH split platforms up to display
version 8. Warn and bail out otherwise.
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/20230215141910.433043-2-jani.nikula@intel.com
2023-02-16 16:46:35 +02:00
Jani Nikula
3dadb4a170
drm/i915/wm: move ILK watermark sanitization to i9xx_wm.[ch]
...
Move sanitize_watermarks() to i9xx_wm.[ch] and rename as
ilk_wm_sanitize(). The slightly unfortunate downside is having to expose
intel_atomic_check() from intel_display.c, but this declutters
intel_display.c nicely.
v2:
- Move to i9xx_wm.[ch] instead of intel_wm.[ch] (Ville)
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20230215141910.433043-1-jani.nikula@intel.com
2023-02-16 16:46:35 +02:00