]> www.infradead.org Git - users/hch/configfs.git/log
users/hch/configfs.git
11 months agodrm/i915: Add skl+ plane name aliases to enum plane_id
Ville Syrjälä [Fri, 17 May 2024 17:12:08 +0000 (20:12 +0300)]
drm/i915: Add skl+ plane name aliases to enum plane_id

Using PLANE_PRIMARY + PLANE_SPRITE? on skl+ results in a bunch
of unnecessary head scratching. Add aliases using the skl+ plane
names.
And for pre-skl we only need to keep PRIMARY,SPRITE0,SPRITE1
as we only ever have 0-2 sprites per pipe on those platforms.

v2: Don't break icl_nv12_y_plane_mask() (Jani)

Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240517171208.21313-1-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915/dpt: Make DPT object unshrinkable
Vidya Srinivas [Mon, 20 May 2024 16:56:34 +0000 (22:26 +0530)]
drm/i915/dpt: Make DPT object unshrinkable

In some scenarios, the DPT object gets shrunk but
the actual framebuffer did not and thus its still
there on the DPT's vm->bound_list. Then it tries to
rewrite the PTEs via a stale CPU mapping. This causes panic.

Cc: stable@vger.kernel.org
Reported-by: Shawn Lee <shawn.c.lee@intel.com>
Fixes: 0dc987b699ce ("drm/i915/display: Add smem fallback allocation for dpt")
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
[vsyrjala: Add TODO comment]
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240520165634.1162470-1-vidya.srinivas@intel.com
11 months agodrm/i915: Bump max TMDS bitrate to 6 Gbps on ADL-S/ADL-P/DG2+
Ville Syrjälä [Mon, 20 May 2024 16:47:32 +0000 (19:47 +0300)]
drm/i915: Bump max TMDS bitrate to 6 Gbps on ADL-S/ADL-P/DG2+

Bspec lists the mas TMDS bitrate as 6 Gbps on ADL-S/ADL-P/DG2.
Bump our limit to match.

v2: Bump for ADL-S as well (Jani)

Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240520164732.3682-1-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915/bmg: Load DMC
Gustavo Sousa [Fri, 10 May 2024 14:05:33 +0000 (11:05 -0300)]
drm/i915/bmg: Load DMC

Load Battlemage's DMC. We re-use XELPDP_DMC_MAX_FW_SIZE since BMG's
display is a derivative of Xe_LPD+ and has the same MMIO offset limits.

Reviewed-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240510140532.112352-2-gustavo.sousa@intel.com
Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
11 months agodrm/i915/hdcp: Check mst_port to determine connector type
Suraj Kandpal [Tue, 21 May 2024 08:14:57 +0000 (13:44 +0530)]
drm/i915/hdcp: Check mst_port to determine connector type

Check mst_port field in intel_connector to check connector type
rather than rely on encoder as it may not be attached to connector
at times.

--v2
-Add closes tag [Imre]

Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10898
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240521081458.1500327-3-suraj.kandpal@intel.com
11 months agodrm/i915/hdcp: Move aux assignment after connector type check
Suraj Kandpal [Tue, 21 May 2024 08:14:56 +0000 (13:44 +0530)]
drm/i915/hdcp: Move aux assignment after connector type check

Move assignment of aux after connector type check as port may not
exist if connector is not DPMST.

--v2
-Fix unwanted change in intel_encoder check [Jani]

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240521081458.1500327-2-suraj.kandpal@intel.com
11 months agodrm/i915: stop redefining INTEL_VGA_DEVICE
Jani Nikula [Wed, 15 May 2024 16:56:51 +0000 (19:56 +0300)]
drm/i915: stop redefining INTEL_VGA_DEVICE

Now that the PCI ID macros allow us to pass in the macro to use, stop
redefining INTEL_VGA_DEVICE.

Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240515165651.1230465-2-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915/pciids: switch to xe driver style PCI ID macros
Jani Nikula [Wed, 15 May 2024 16:56:50 +0000 (19:56 +0300)]
drm/i915/pciids: switch to xe driver style PCI ID macros

The PCI ID macros in xe_pciids.h allow passing in the macro to operate
on each PCI ID, making it more flexible. Convert i915_pciids.h to the
same pattern.

INTEL_IVB_Q_IDS() for Quanta transcode remains a special case, and
unconditionally uses INTEL_QUANTA_VGA_DEVICE().

Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240515165651.1230465-1-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
11 months agoMAINTAINERS: Move the drm-intel repo location to fd.o GitLab
Ryszard Knop [Wed, 24 Apr 2024 11:41:59 +0000 (13:41 +0200)]
MAINTAINERS: Move the drm-intel repo location to fd.o GitLab

The drm-intel repo is moving from the classic fd.o git host to GitLab.
Update its location with a URL matching other fd.o GitLab kernel trees.

Signed-off-by: Ryszard Knop <ryszard.knop@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Tvrtko Ursulin <tursulin@ursulin.net>
Acked-by: Lucas De Marchi <lucas.demarchi@intel.com>
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240424114159.38719-1-ryszard.knop@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
11 months agodrm/i915/psr: PSR2_CTL[Block Count Number] not needed for LunarLake
Jouni Högander [Fri, 17 May 2024 07:30:05 +0000 (10:30 +0300)]
drm/i915/psr: PSR2_CTL[Block Count Number] not needed for LunarLake

PSR2_CTL[Block Count Number] is not used by LunarLake do not configure it.

Bspec: 69885

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240517073005.2414293-4-jouni.hogander@intel.com
11 months agodrm/i915/psr: LunarLake PSR2_CTL[IO Wake Lines] is 6 bits wide
Jouni Högander [Fri, 17 May 2024 07:30:04 +0000 (10:30 +0300)]
drm/i915/psr: LunarLake PSR2_CTL[IO Wake Lines] is 6 bits wide

On LunarLake  PSR2_CTL[IO Wake Lines] contains now bit 13:18. Take this
into account when enabling PSR2_CTL.

Bspec: 69885

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240517073005.2414293-3-jouni.hogander@intel.com
11 months agodrm/i915/psr: LunarLake IO and Fast Wake time line count maximums are 68
Jouni Högander [Fri, 17 May 2024 07:30:03 +0000 (10:30 +0300)]
drm/i915/psr: LunarLake IO and Fast Wake time line count maximums are 68

On LunarLake maximum for IO and Fast Wake time line counts are 68: 6 bits +
5 lines added by the HW. Take this into account in calculation and when
writing the IO Wake lines.

v2: maximum line count is 68 (6 bits + 5 lines added by HW)

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240517073005.2414293-2-jouni.hogander@intel.com
11 months agodrm/i915/selftests: Set always_coherent to false when reading from CPU
Nirmoy Das [Thu, 16 May 2024 15:14:03 +0000 (17:14 +0200)]
drm/i915/selftests: Set always_coherent to false when reading from CPU

Commit 8d4ba9fc1c6c ("drm/i915/selftests: Pick correct caching mode.")
was not complete  as for non LLC  sharing platforms cpu read can happen
from LLC which probably doesn't have the latest changes made by GPU.

Cc: Andi Shyti <andi.shyti@linux.intel.com>
Cc: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Cc: Jonathan Cavitt <jonathan.cavitt@intel.com>
Fixes: 8d4ba9fc1c6c ("drm/i915/selftests: Pick correct caching mode.")
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240516151403.2875-1-nirmoy.das@intel.com
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
11 months agodrm/i915: pass dev_priv explicitly to CURSURFLIVE
Jani Nikula [Wed, 15 May 2024 11:56:48 +0000 (14:56 +0300)]
drm/i915: pass dev_priv explicitly to CURSURFLIVE

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

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/86aa98ad9f883681f5c2e3aba839d02d8591bfbf.1715774156.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: pass dev_priv explicitly to CUR_CHICKEN
Jani Nikula [Wed, 15 May 2024 11:56:47 +0000 (14:56 +0300)]
drm/i915: pass dev_priv explicitly to CUR_CHICKEN

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

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/0bd1fa8ab346ba2bb40f435136b975b472ad2bc8.1715774156.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: pass dev_priv explicitly to CUR_FBC_CTL
Jani Nikula [Wed, 15 May 2024 11:56:46 +0000 (14:56 +0300)]
drm/i915: pass dev_priv explicitly to CUR_FBC_CTL

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

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/f5e76f916ccf02aaf6016ffd476e9544817ac179.1715774156.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: pass dev_priv explicitly to CURSIZE
Jani Nikula [Wed, 15 May 2024 11:56:45 +0000 (14:56 +0300)]
drm/i915: pass dev_priv explicitly to CURSIZE

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

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/521ca44416eb95dcfcf4bfbc32ac7f9371aeaf5d.1715774156.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: pass dev_priv explicitly to CURPOS_ERLY_TPT
Jani Nikula [Wed, 15 May 2024 11:56:44 +0000 (14:56 +0300)]
drm/i915: pass dev_priv explicitly to CURPOS_ERLY_TPT

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

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/2263b6412e983026990f7f6730b0b1141be4fd0f.1715774156.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: pass dev_priv explicitly to CURPOS
Jani Nikula [Wed, 15 May 2024 11:56:43 +0000 (14:56 +0300)]
drm/i915: pass dev_priv explicitly to CURPOS

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

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ca229a123cb8a5d6a2970649a47236b3da1b02ad.1715774156.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: pass dev_priv explicitly to CURBASE
Jani Nikula [Wed, 15 May 2024 11:56:42 +0000 (14:56 +0300)]
drm/i915: pass dev_priv explicitly to CURBASE

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

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/e552df69a4e6a3dbd562ba8c442d0219cda3bfd0.1715774156.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: pass dev_priv explicitly to CURCNTR
Jani Nikula [Wed, 15 May 2024 11:56:41 +0000 (14:56 +0300)]
drm/i915: pass dev_priv explicitly to CURCNTR

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

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/06bc681558c86f351ae596e9600133bb10ae4bdd.1715774156.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915/pciids: don't include RPL-U PCI IDs in RPL-P
Jani Nikula [Fri, 10 May 2024 11:22:21 +0000 (14:22 +0300)]
drm/i915/pciids: don't include RPL-U PCI IDs in RPL-P

It's confusing for INTEL_RPLP_IDS() to include INTEL_RPLU_IDS(). Even if
we treat them the same elsewhere, the lists of PCI IDs should not.

Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patchwork.freedesktop.org/patch/msgid/28fe0910efb93a28c400728af14beff015667f42.1715340032.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915/pciids: remove 12 from INTEL_TGL_IDS()
Jani Nikula [Fri, 10 May 2024 11:22:20 +0000 (14:22 +0300)]
drm/i915/pciids: remove 12 from INTEL_TGL_IDS()

Most other PCI ID macros do not encode the gen in the name. Follow suit
for TGL.

Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patchwork.freedesktop.org/patch/msgid/044a5c553dc4564431bbef197d5e2dd085624fc2.1715340032.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915/pciids: remove 11 from INTEL_ICL_IDS()
Jani Nikula [Fri, 10 May 2024 11:22:19 +0000 (14:22 +0300)]
drm/i915/pciids: remove 11 from INTEL_ICL_IDS()

Most other PCI ID macros do not encode the gen in the name. Follow suit
for ICL.

Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patchwork.freedesktop.org/patch/msgid/36973674bf333dfdd7cd32ae656754bfa150022b.1715340032.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915/pciids: don't include WHL/CML PCI IDs in CFL
Jani Nikula [Fri, 10 May 2024 11:22:18 +0000 (14:22 +0300)]
drm/i915/pciids: don't include WHL/CML PCI IDs in CFL

It's confusing for INTEL_CFL_IDS() to include all WHL and CML PCI
IDs. Even if we treat them the same in a lot of places, CML is a
platform of its own, and the lists of PCI IDs should not conflate them.

Largely go by the idea that if a platform has a name, group its PCI IDs
together.

That said, AML is special, having both KBL and CFL variants. Leave that
alone.

v2: Also split out WHL not just CML (Rodrigo)

Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patchwork.freedesktop.org/patch/msgid/7cca91dc78ed2b5982f14e400f03a1704645e475.1715340032.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915/pciids: add INTEL_IVB_IDS()
Jani Nikula [Fri, 10 May 2024 11:22:17 +0000 (14:22 +0300)]
drm/i915/pciids: add INTEL_IVB_IDS()

Add INTEL_IVB_IDS() to identify all IVBs except IVB Q transcode.

Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ed89a25b2c6bce318fe59e883d18b62d9453196b.1715340032.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915/pciids: add INTEL_SNB_IDS()
Jani Nikula [Fri, 10 May 2024 11:22:16 +0000 (14:22 +0300)]
drm/i915/pciids: add INTEL_SNB_IDS()

Add INTEL_SNB_IDS() to identify all SNBs.

Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ffcb2d954ad9bca78ccd39836dc0a3dc7c6c0253.1715340032.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915/pciids: add INTEL_ILK_IDS(), use acronym
Jani Nikula [Fri, 10 May 2024 11:22:15 +0000 (14:22 +0300)]
drm/i915/pciids: add INTEL_ILK_IDS(), use acronym

Most other PCI ID macros use platform acronyms. Follow suit for ILK. Add
INTEL_ILK_IDS() to identify all ILKs.

Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patchwork.freedesktop.org/patch/msgid/27ada56363cfa6a5b093cb31908a4b89aa912621.1715340032.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915/pciids: add INTEL_PNV_IDS(), use acronym
Jani Nikula [Fri, 10 May 2024 11:22:14 +0000 (14:22 +0300)]
drm/i915/pciids: add INTEL_PNV_IDS(), use acronym

Most other PCI ID macros use platform acronyms. Follow suit for PNV. Add
INTEL_PNV_IDS() to identify all PNVs.

Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patchwork.freedesktop.org/patch/msgid/5f9b34a2cd388244be03263a5147776bfe64d5ac.1715340032.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: Handle SKL+ WM/DDB registers next to all other plane registers
Ville Syrjälä [Fri, 10 May 2024 15:23:29 +0000 (18:23 +0300)]
drm/i915: Handle SKL+ WM/DDB registers next to all other plane registers

Having the plane WM/DDB regitster write functions in skl_watermarks.c
is rather annoying when trying to implement DSB based plane updates.
Move them into the respective files that handle all other plane
register writes. Less places where I need to worry about the DSB
vs. MMIO decisions.

The downside is that we spread the wm struct details a bit further
afield. But if that becomes too annoying we can probably abstract
things a bit more with a few extra functions.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240510152329.24098-17-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: Nuke skl_write_wm_level() and skl_ddb_entry_write()
Ville Syrjälä [Fri, 10 May 2024 15:23:28 +0000 (18:23 +0300)]
drm/i915: Nuke skl_write_wm_level() and skl_ddb_entry_write()

Get rid of skl_ddb_entry_write() and skl_write_wm_level() and
just call intel_de_write_fw() directly.

This is prep work towards DSB based plane updates where these
wrappers are more of a hinderance.

Done with cocci mostly:
@@
expression D, R, L;
@@
- skl_write_wm_level(D, R, L)
+ intel_de_write_fw(D, R, skl_plane_wm_reg_val(L))

@@
expression D, R, B;
@@
- skl_ddb_entry_write(D, R, B)
+ intel_de_write_fw(D, R, skl_plane_ddb_reg_val(B))

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240510152329.24098-16-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: Extract skl_plane_{wm,ddb}_reg_val()
Ville Syrjälä [Fri, 10 May 2024 15:23:27 +0000 (18:23 +0300)]
drm/i915: Extract skl_plane_{wm,ddb}_reg_val()

Extract helpers to calculate the final wm/ddb register
values for skl+. Will allow me to more cleanly remove the
register write wrappers for these registers.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240510152329.24098-15-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: Refactor skl+ plane register offset calculations
Ville Syrjälä [Mon, 13 May 2024 17:00:40 +0000 (20:00 +0300)]
drm/i915: Refactor skl+ plane register offset calculations

Currently every skl+ plane register defines some intermediate
macros to calculate the final register offset. Pull all of that
into common macros, simplifying the final register offset stuff
into just five defines:
- raw register offsets for the planes 1 and 2 on pipes A and B
- the final parametrized macro

v2: Rebase

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240513170040.15393-1-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: Drop a few unwanted tabs from skl+ plane reg defines
Ville Syrjälä [Mon, 13 May 2024 17:00:08 +0000 (20:00 +0300)]
drm/i915: Drop a few unwanted tabs from skl+ plane reg defines

A few extra tabs have snuck into the skl+ plane register bit
definitions. Remove them.

v2: Rebase

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/20240513170008.15338-1-ville.syrjala@linux.intel.com
11 months agodrm/i915: Use REG_BIT for PLANE_WM bits
Ville Syrjälä [Mon, 13 May 2024 16:59:45 +0000 (19:59 +0300)]
drm/i915: Use REG_BIT for PLANE_WM bits

A couple of PLANE_WM bits were still using the hand
rolled (1<<N) form. Replace with REG_BIT().

v2: Rebase

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/20240513165945.15285-1-ville.syrjala@linux.intel.com
11 months agodrm/i915: Shuffle the skl+ plane register definitions
Ville Syrjälä [Mon, 13 May 2024 16:59:09 +0000 (19:59 +0300)]
drm/i915: Shuffle the skl+ plane register definitions

Rearrange the plane skl+ universal plane register definitions:
- keep everything related to the same register in one place
- sort based on register offset
- unify the whitespace/etc a bit

v2: Define register contents after all offsets (Jani)

Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240513165909.15234-1-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: Drop useless PLANE_FOO_3 register defines
Ville Syrjälä [Mon, 13 May 2024 16:58:42 +0000 (19:58 +0300)]
drm/i915: Drop useless PLANE_FOO_3 register defines

We only need register defines for the first two planes
on the first two pipes. Nuke everything else.

v2: Drop a few more that snuck through

Reviewed-by: Jani Nikula <jani.nikula@intel.com> #v1
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240513165842.15199-1-ville.syrjala@linux.intel.com
11 months agodrm/i915/gvt: Use PLANE_CTL and PLANE_SURF defines
Ville Syrjälä [Fri, 10 May 2024 15:23:21 +0000 (18:23 +0300)]
drm/i915/gvt: Use PLANE_CTL and PLANE_SURF defines

Stop hand rolling PLANE_CTL and PLANE_SURF for the third plane
and just use the real thing.

Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
CC: Zhi Wang <zhi.wang.linux@gmail.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240510152329.24098-9-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915/gvt: Use the full PLANE_KEY*() defines
Ville Syrjälä [Fri, 10 May 2024 15:23:20 +0000 (18:23 +0300)]
drm/i915/gvt: Use the full PLANE_KEY*() defines

Stop hand rolling PLANE_KEY*() register defines and just
use the real thing.

Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
CC: Zhi Wang <zhi.wang.linux@gmail.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240510152329.24098-8-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915/gvt: Use the proper PLANE_AUX_OFFSET() define
Ville Syrjälä [Fri, 10 May 2024 15:23:19 +0000 (18:23 +0300)]
drm/i915/gvt: Use the proper PLANE_AUX_OFFSET() define

Stop hand rolling PLANE_AUX_OFFSET() and just use the real thing.

Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
CC: Zhi Wang <zhi.wang.linux@gmail.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240510152329.24098-7-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915/gvt: Use the proper PLANE_AUX_DIST() define
Ville Syrjälä [Fri, 10 May 2024 15:23:18 +0000 (18:23 +0300)]
drm/i915/gvt: Use the proper PLANE_AUX_DIST() define

Stop hand rolling PLANE_AUX_DIST() and just use the real thing.

Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
CC: Zhi Wang <zhi.wang.linux@gmail.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240510152329.24098-6-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: Move skl+ wm/ddb registers to proper headers
Ville Syrjälä [Fri, 10 May 2024 15:23:17 +0000 (18:23 +0300)]
drm/i915: Move skl+ wm/ddb registers to proper headers

On SKL+ the watermark/DDB registers are proper per-plane
registers. Move the definitons to their respective files.

Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
CC: Zhi Wang <zhi.wang.linux@gmail.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240510152329.24098-5-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: Extract intel_cursor_regs.h
Ville Syrjälä [Fri, 10 May 2024 15:23:16 +0000 (18:23 +0300)]
drm/i915: Extract intel_cursor_regs.h

Move most cursor register definitions into their own file.
Declutters i915_reg.h a bit more.

Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
CC: Zhi Wang <zhi.wang.linux@gmail.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240510152329.24098-4-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: Extract skl_universal_plane_regs.h
Ville Syrjälä [Fri, 10 May 2024 15:23:15 +0000 (18:23 +0300)]
drm/i915: Extract skl_universal_plane_regs.h

Move most of the SKL+ universal plane register definitions
into their own file. Declutters i915_reg.h a bit more.

Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
CC: Zhi Wang <zhi.wang.linux@gmail.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240510152329.24098-3-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: Nuke _MMIO_PLANE_GAMC()
Ville Syrjälä [Fri, 10 May 2024 15:23:14 +0000 (18:23 +0300)]
drm/i915: Nuke _MMIO_PLANE_GAMC()

_MMIO_PLANE_GAMC() is some leftover macro that is never used.
Get rid of it.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240510152329.24098-2-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915/psr: Add panel replay sel update support to debugfs interface
Jouni Högander [Fri, 10 May 2024 09:38:23 +0000 (12:38 +0300)]
drm/i915/psr: Add panel replay sel update support to debugfs interface

Add panel replay selective update support to debugfs status interface. In
case of sink supporting panel replay we will print out:

Sink support: PSR = no, Panel Replay = yes, Panel Replay Selective Update = yes

and PSR mode will look like this if printing out enabled panel replay
selective update:

PSR mode: Panel Replay Selective Update Enabled

Current PSR and panel replay printouts remain same.

Cc: Kunal Joshi <kunal1.joshi@intel.com>
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-13-jouni.hogander@intel.com
11 months agodrm/i915/psr: Split intel_psr2_config_valid for panel replay
Jouni Högander [Fri, 10 May 2024 09:38:22 +0000 (12:38 +0300)]
drm/i915/psr: Split intel_psr2_config_valid for panel replay

Part of intel_psr2_config_valid is valid for panel replay. rename it as
intel_sel_update_config_valid. Split psr2 specific part and name it as
intel_psr2_config_valid.

v3:
  - move early transport check to psr2 specific check
  - check intel_psr2_config_valid only for non-Panel Replay case
v2:
  - use psr2_global_enabled for panel replay as well
  - goto unsupported instead of return when global enabled check fails

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-12-jouni.hogander@intel.com
11 months agodrm/i915/psr: Update PSR module parameter descriptions
Jouni Högander [Fri, 10 May 2024 09:38:21 +0000 (12:38 +0300)]
drm/i915/psr: Update PSR module parameter descriptions

We are re-using PSR module parameters for panel replay. Update module
parameter descriptions with panel replay information:

enable_psr:

-1 (default) == follow what is in VBT
0 == disable PSR/PR
1 == Allow PSR1 and PR full frame update
2 == allow PSR1/PSR2 and PR Selective Update

enable_psr2_sel_fetch

0 == disable selective fetch for PSR and PR
1 (default) == allow selective fetch for PSR PR

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-11-jouni.hogander@intel.com
11 months agodrm/i915/psr: Do not apply workarounds in case of panel replay
Jouni Högander [Fri, 10 May 2024 09:38:20 +0000 (12:38 +0300)]
drm/i915/psr: Do not apply workarounds in case of panel replay

There are some workarounds that are not applicable for panel replay. Do not
apply these if panel replay is used.

Bspec: 66624, 50422

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-10-jouni.hogander@intel.com
11 months agodrm/i915/psr: Panel replay uses SRD_STATUS to track it's status
Jouni Högander [Fri, 10 May 2024 09:38:19 +0000 (12:38 +0300)]
drm/i915/psr: Panel replay uses SRD_STATUS to track it's status

DP Panel replay uses SRD_STATUS to track it's status despite selective
update mode.

Bspec: 53370, 68920

v4:
  - use PSR2_STATUS for eDP Panel Replay
  - handle intel_psr_wait_exit_locked as well
v3:
  - do not use PSR2_STATUS for PSR1
v2:
  - use intel_dp_is_edp to differentiate
  - modify debugfs status as well

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-9-jouni.hogander@intel.com
11 months agodrm/i915/psr: Modify intel_dp_get_su_granularity to support panel replay
Jouni Högander [Fri, 10 May 2024 09:38:18 +0000 (12:38 +0300)]
drm/i915/psr: Modify intel_dp_get_su_granularity to support panel replay

Currently intel_dp_get_su_granularity doesn't support panel replay.
This fix modifies it to support panel replay as well.

v4:
  - use drm_dp_dpcd_readb instead of drm_dp_dpcd_read
  - ensure return value is 0 if drm_dp_dpcd_readb fails
v3: use correct offset for DP_PANEL_PANEL_REPLAY_CAPABILITY
v2: rely on PSR definitions on common bits

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-8-jouni.hogander@intel.com
11 months agodrm/i915/psr: Detect panel replay selective update support
Jouni Högander [Fri, 10 May 2024 09:38:17 +0000 (12:38 +0300)]
drm/i915/psr: Detect panel replay selective update support

Add new boolean to store panel replay selective update support of sink into
intel_psr struct.  Detect panel replay selective update support and store
it into this new boolean.

v3: Clear sink_panel_replay_su_support in intel_dp_detect
v2: Merge adding new boolean into this patch

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-7-jouni.hogander@intel.com
11 months agodrm/panelreplay: dpcd register definition for panelreplay SU
Jouni Högander [Fri, 10 May 2024 09:38:16 +0000 (12:38 +0300)]
drm/panelreplay: dpcd register definition for panelreplay SU

Add definitions for panel replay selective update

v2: Remove unnecessary Cc from commit message

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-6-jouni.hogander@intel.com
11 months agodrm/i915/psr: Rename psr2_enabled as sel_update_enabled
Jouni Högander [Fri, 10 May 2024 09:38:15 +0000 (12:38 +0300)]
drm/i915/psr: Rename psr2_enabled as sel_update_enabled

We are about to reuse psr2_enabled for panel replay as well. Rename
it as sel_update_enabled to avoid confusion.

v3: Rebase
v2: Rebase

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-5-jouni.hogander@intel.com
11 months agodrm/i915/dp: Use always vsc revision 0x6 for Panel Replay
Jouni Högander [Fri, 10 May 2024 09:38:14 +0000 (12:38 +0300)]
drm/i915/dp: Use always vsc revision 0x6 for Panel Replay

We are about to enable Panel Replay Selective update mode. Vsc revision 0x6
for Panel Replay no matter if it is selective update or full frame update
mode. Take this into account when preparing VSC SDP package.

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-4-jouni.hogander@intel.com
11 months agodrm/i915/display: Do not print "psr: enabled" for on Panel Replay
Jouni Högander [Fri, 10 May 2024 09:38:13 +0000 (12:38 +0300)]
drm/i915/display: Do not print "psr: enabled" for on Panel Replay

After setting has_psr for panel replay as well crtc state dump is
improperly printing "psr: enabled" for Panel Replay as well. Fix this by
checking also has_panel_replay.

Fixes: 5afa6e496098 ("drm/i915/psr: Set intel_crtc_state->has_psr on panel replay as well")
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-3-jouni.hogander@intel.com
11 months agodrm/i915/psr: Rename has_psr2 as has_sel_update
Jouni Högander [Fri, 10 May 2024 09:38:12 +0000 (12:38 +0300)]
drm/i915/psr: Rename has_psr2 as has_sel_update

We are going to reuse has_psr2 for panel_replay as well. Rename it
as has_sel_update to avoid confusion.

v3: do not add has_psr check into psr2 case in intel_dp_compute_vsc_sdp
v2: Rebase

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-2-jouni.hogander@intel.com
11 months agoDocumentation/i915: remove kernel-doc for DMC wakelocks
Luca Coelho [Fri, 10 May 2024 09:05:02 +0000 (12:05 +0300)]
Documentation/i915: remove kernel-doc for DMC wakelocks

The function descriptions are optional and have not yet been added to
the DMC wakelock code, so we shouldn't try to use it.  Since this is a
regression, remove the kernel-doc entry for DMC wakelocks for now.
The proper documentation will be added in a future patch.

Fixes: 765425f598c2 ("drm/i915/display: add support for DMC wakelocks")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240510090502.667556-1-luciano.coelho@intel.com
11 months agodrm/xe/display: remove unused xe->sb_lock
Jani Nikula [Fri, 10 May 2024 09:43:13 +0000 (12:43 +0300)]
drm/xe/display: remove unused xe->sb_lock

Nothing in xe needs xe->sb_lock. None of the i915 display code using
->sb_lock gets built with xe, and in any case that would be wrong as xe
uses gt->pcode.lock for this.

Acked-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240510094313.3422982-2-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/xe/display: remove unused xe->enabled_irq_mask
Jani Nikula [Fri, 10 May 2024 09:43:12 +0000 (12:43 +0300)]
drm/xe/display: remove unused xe->enabled_irq_mask

The xe->enabled_irq_mask member has never been used for anything.

Acked-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240510094313.3422982-1-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: Rename the fb pinning functions to indicate the address space
Ville Syrjälä [Mon, 6 May 2024 12:57:18 +0000 (15:57 +0300)]
drm/i915: Rename the fb pinning functions to indicate the address space

Rename the fb pinning functions such that their name directly
informs us what gets pinned into which address space.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240506125718.26001-10-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Lucas De Marchi <lucas.demarchi@intel.com>
11 months agodrm/i915: Cleanup fbdev fb setup
Ville Syrjälä [Fri, 10 May 2024 10:22:57 +0000 (13:22 +0300)]
drm/i915: Cleanup fbdev fb setup

We use a mix of 'intel_fb' vs. 'ifbdev->fb' in the same function.
Both should be pointing at the same thing. Make things less
confusing by just getting existing fb from 'ifbdev->fb' at the
start and then sticking with the local 'fb' (renamed from the
'intel_fb') until the very end.

v2: rebase

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240510102257.25096-1-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: Change intel_fbdev_fb_alloc() return type
Ville Syrjälä [Fri, 10 May 2024 10:22:33 +0000 (13:22 +0300)]
drm/i915: Change intel_fbdev_fb_alloc() return type

Change intel_fbdev_fb_alloc() to return struct intel_fb instead
of struct drm_framebuffer. Let's us eliminate some annoying
aliasing variables in the fbdev setup code.

v2: Assing the results to the correct variable (Jani)
    Fix xe's copy

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240510102233.25057-1-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Lucas De Marchi <lucas.demarchi@intel.com>
11 months agodrm/i915: Constify 'fb' in during pinning
Ville Syrjälä [Mon, 6 May 2024 12:57:15 +0000 (15:57 +0300)]
drm/i915: Constify 'fb' in during pinning

Make the 'fb' pointers const in the pinning code. We never
want to mutate these. Also nuke a few aliasing fb vs. intel_fb
cases by just using the more specific type everywhere in the
same function.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240506125718.26001-7-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Lucas De Marchi <lucas.demarchi@intel.com>
11 months agodrm/i915: Implement Audio WA_14020863754
Uma Shankar [Thu, 9 May 2024 05:35:08 +0000 (11:05 +0530)]
drm/i915: Implement Audio WA_14020863754

WA_14020863754: Corner case with Min Hblank Fix can cause
audio hang

Issue: Previously a fix was made to avoid issues with extremely
small hblanks, called the "Min Hblank Fix". However, this can
potentially cause an audio hang.

Workaround :
During "Audio Programming Sequence" Audio Enabling -
When DP mode is enabled Set mmio offset 0x65F1C bit 18 = 1b,
before step #1 "Enable audio Presence Detect"

During "Audio Programming Sequence" Audio Disabling -
When DP mode is enabled Clear mmio offset 0x65F1C bit 18 = 0b,
after step #6 "Disable Audio PD (Presence Detect)"
If not clearing PD bit, must also not clear 0x65F1C bit 18 (leave = 1b)

v2: Update the platform checks (Jani Nikula)

v3: Limited the WA to LNL and BMG, added a helper (Matt Roper)

v4: Updated the bit naming, fixed redundant if statement

Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240509053508.2807834-1-uma.shankar@intel.com
11 months agodrm/i915/dp: Write panel override luminance values
Suraj Kandpal [Tue, 7 May 2024 04:04:07 +0000 (09:34 +0530)]
drm/i915/dp: Write panel override luminance values

Write panel override luminance values which helps the TCON decide
if tone mapping needs to be enabled or not.

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240507040407.1056061-8-suraj.kandpal@intel.com
11 months agodrm/i915/dp: Enable AUX based backlight for HDR
Suraj Kandpal [Tue, 7 May 2024 04:04:06 +0000 (09:34 +0530)]
drm/i915/dp: Enable AUX based backlight for HDR

As of now whenerver HDR is switched on we use the PWM to change the
backlight as opposed to AUX based backlight changes in terms of nits.
This patch writes to the appropriate DPCD registers to enable aux
based backlight using values in nits.

--v2
-Fix max_cll and max_fall assignment [Jani]
-Fix the size sent in drm_dpcd_write [Jani]

--v3
-Content Luminance needs to be sent only for pre-ICL after that
it is directly picked up from hdr metadata [Ville]

--v4
-Add checks for HDR TCON cap bits [Ville]
-Check eotf of hdr_output_data and sets bits base of that value.

--v5
-Fix capability check bits.
-Check colorspace before setting BT2020

--v6
-Use intel_dp_has_gamut_dip to check if we have capability
to send sdp [Ville]
-Seprate filling of all hdr tcon related bits into it's
own function.
-Check eotf data to make sure we are in HDR mode [Sebastian]

--v7
-Fix confusion function name for hdr mode check [Jani]
-Fix the condition which tells us if we are in HDR mode or not
[Sebastian]

--v8
-Call fill_hdr_tcon_param unconditionally as some parameters may not
be dependent on the fact if we are in hdr mode or not [Sebastian]
-Fix some conditions after change in hdr mode check [Sebastian]

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240507040407.1056061-7-suraj.kandpal@intel.com
11 months agodrm/i915/dp: Drop comments on EDP HDR DPCD registers
Suraj Kandpal [Tue, 7 May 2024 04:04:05 +0000 (09:34 +0530)]
drm/i915/dp: Drop comments on EDP HDR DPCD registers

Drop comments for EDP HDR DPCD registers as the code and
conditions will tell us what can be written where.

--v2
-Drop the comments altogether instead of just renaming them
[Sebastian]

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240507040407.1056061-6-suraj.kandpal@intel.com
11 months agodrm/i915/dp: Fix Register bit naming
Suraj Kandpal [Tue, 7 May 2024 04:04:04 +0000 (09:34 +0530)]
drm/i915/dp: Fix Register bit naming

Change INTEL_EDP_HDR_TCON_SDP_COLORIMETRY enable to
INTEL_EDP_HDR_TCON_SDP_OVERRIDE_AUX as this bit tells TCON to
ignore DPCD colorimetry values and take the one's sent through
SDP.

--v2
-Fix typo in commit message [Arun]

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240507040407.1056061-5-suraj.kandpal@intel.com
11 months agodrm/i915/dp: Add TCON HDR capability checks
Suraj Kandpal [Tue, 7 May 2024 04:04:03 +0000 (09:34 +0530)]
drm/i915/dp: Add TCON HDR capability checks

Add checks to see the HDR capability of TCON panel.

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240507040407.1056061-4-suraj.kandpal@intel.com
11 months agodrm/i915/dp: Rename intel struct inside intel_panel
Suraj Kandpal [Tue, 7 May 2024 04:04:02 +0000 (09:34 +0530)]
drm/i915/dp: Rename intel struct inside intel_panel

Rename intel to intel cap which is present inside panel.edp struct
to make it more sensible to tell us what it contains.

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240507040407.1056061-3-suraj.kandpal@intel.com
11 months agodrm/i915/dp: Make has_gamut_metadata_dip() non static
Suraj Kandpal [Tue, 7 May 2024 04:04:01 +0000 (09:34 +0530)]
drm/i915/dp: Make has_gamut_metadata_dip() non static

Make has_gamut_metadata_dip() non static so it can also be used to
at other places eg in intel_dp_aux_backlight. So that we can check
if HW is capable of sending SDP which helps us decide if we use
AUX based HDR control or via SDP.

--v2
-State reason the function is needed [Arun]

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240507040407.1056061-2-suraj.kandpal@intel.com
11 months agodrm/i915: Polish types in fb calculations
Ville Syrjälä [Mon, 6 May 2024 12:57:14 +0000 (15:57 +0300)]
drm/i915: Polish types in fb calculations

Be a bit more consistent in our use of integer types in
the fb related calculatiosn. u32 we generally only use
for ggtt offsets and such, and everything else can be regular
(unsigned) ints.

There's also an overabundance of consts for local variables
in skl_check_main_surface() which is not something we generally
do. So get rid of those while at it.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240506125718.26001-6-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: Extract intel_plane_needs_physical()
Ville Syrjälä [Mon, 6 May 2024 12:57:13 +0000 (15:57 +0300)]
drm/i915: Extract intel_plane_needs_physical()

Pull the "does this plane need a physical address?" check into
a small helper.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240506125718.26001-5-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: Drop 'uses_fence' parameter from intel_pin_fb_obj_dpt()
Ville Syrjälä [Mon, 6 May 2024 12:57:12 +0000 (15:57 +0300)]
drm/i915: Drop 'uses_fence' parameter from intel_pin_fb_obj_dpt()

Fence regions are only relevant for GGTT, not DPT. Drop the
pointless 'uses_fence' argument from intel_pin_fb_obj_dpt().

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240506125718.26001-4-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: Clean up skl+ plane stride limits
Ville Syrjälä [Mon, 6 May 2024 12:57:11 +0000 (15:57 +0300)]
drm/i915: Clean up skl+ plane stride limits

skl_plane_max_stride() is pretty messy. Streamline it and
split it into clear skl+ vs. adl+ variants.

TODO: Deal with icl and tgl strude limits properly

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240506125718.26001-3-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: Split gen2 vs. gen3 .max_stride()
Ville Syrjälä [Mon, 6 May 2024 12:57:10 +0000 (15:57 +0300)]
drm/i915: Split gen2 vs. gen3 .max_stride()

Plane .max_stride() is already a vfunc so having one made
up of two branches based on the display version is silly.
Split i9xx_plane_max_stride() into gen2 vs. gen3 variants
so  that we get rid of said check.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240506125718.26001-2-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: pass dev_priv explicitly to TRANS_VRR_VSYNC
Jani Nikula [Wed, 8 May 2024 15:47:56 +0000 (18:47 +0300)]
drm/i915: pass dev_priv explicitly to TRANS_VRR_VSYNC

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

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/61b464bedfd75a97ca214e066be5417d790ccb26.1715183162.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: pass dev_priv explicitly to TRANS_PUSH
Jani Nikula [Wed, 8 May 2024 15:47:55 +0000 (18:47 +0300)]
drm/i915: pass dev_priv explicitly to TRANS_PUSH

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

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/5b2a4eea42cf76830a829d8a543d877cad0fc52d.1715183162.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: pass dev_priv explicitly to TRANS_VRR_STATUS2
Jani Nikula [Wed, 8 May 2024 15:47:54 +0000 (18:47 +0300)]
drm/i915: pass dev_priv explicitly to TRANS_VRR_STATUS2

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

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/a8e095f1ac3b3d41343f7e6d8dd191e9e2a6d76a.1715183162.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: pass dev_priv explicitly to TRANS_VRR_FLIPLINE
Jani Nikula [Wed, 8 May 2024 15:47:53 +0000 (18:47 +0300)]
drm/i915: pass dev_priv explicitly to TRANS_VRR_FLIPLINE

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

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/fd8b6a7c71ba908a55a7b40dc54a1d4cf920056c.1715183162.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: pass dev_priv explicitly to TRANS_VRR_VTOTAL_PREV
Jani Nikula [Wed, 8 May 2024 15:47:52 +0000 (18:47 +0300)]
drm/i915: pass dev_priv explicitly to TRANS_VRR_VTOTAL_PREV

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

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/de2c305ffef3df1112234baeae944b8dc84d0707.1715183162.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: pass dev_priv explicitly to TRANS_VRR_STATUS
Jani Nikula [Wed, 8 May 2024 15:47:51 +0000 (18:47 +0300)]
drm/i915: pass dev_priv explicitly to TRANS_VRR_STATUS

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

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/57285c891b10d4827423c20563f2b4a2632e65c1.1715183162.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: pass dev_priv explicitly to TRANS_VRR_VMAXSHIFT
Jani Nikula [Wed, 8 May 2024 15:47:50 +0000 (18:47 +0300)]
drm/i915: pass dev_priv explicitly to TRANS_VRR_VMAXSHIFT

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

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/6117aa8936a8e91c58a7a0bada21f266c79a0e5f.1715183162.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: pass dev_priv explicitly to TRANS_VRR_VMIN
Jani Nikula [Wed, 8 May 2024 15:47:49 +0000 (18:47 +0300)]
drm/i915: pass dev_priv explicitly to TRANS_VRR_VMIN

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

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ac1c6545a80e4cbdc98f54f8d67e69fd46cdcc91.1715183162.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: pass dev_priv explicitly to TRANS_VRR_VMAX
Jani Nikula [Wed, 8 May 2024 15:47:48 +0000 (18:47 +0300)]
drm/i915: pass dev_priv explicitly to TRANS_VRR_VMAX

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

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/6256642f1943b87650fdf600ef08f6d3b8617a87.1715183162.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915: pass dev_priv explicitly to TRANS_VRR_CTL
Jani Nikula [Wed, 8 May 2024 15:47:47 +0000 (18:47 +0300)]
drm/i915: pass dev_priv explicitly to TRANS_VRR_CTL

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

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/d86be64197d547085e857b09dacd21f4ee6b1517.1715183162.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
11 months agodrm/i915/hdcp: Disable HDCP Line Rekeying for HDCP2.2 on HDMI
Suraj Kandpal [Tue, 7 May 2024 06:22:44 +0000 (11:52 +0530)]
drm/i915/hdcp: Disable HDCP Line Rekeying for HDCP2.2 on HDMI

Disable HDCP Line Rekeying when HDCP ver > 1.4 and when we are
on HDMI TMDS operation for DISPLAY_VER >= 14.

--v2
-Wa to be mentioned in comments not in commit message [Jani]
-Remove blankline [Jani]

--v3
-No need to write what is being done in comments when code
is self explanatory [Jani]

--v4
-Add comment regarding need of this WA when in TMDS mode
[Chaitanya]
-Write in chicken register for MTL [CHaitanya]

--v5
-Fix comment [Chaitanya]
-Use correct set and clear value in intel_de_rmw [Chaitanya]

--v6
-No need to define C, D chicken bits it gets calculated [Animesh]

Bspec: 49273
Bspec: 69964
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Signed-off-by: Animesh Manna <animesh.manna@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240507062243.1076047-2-suraj.kandpal@intel.com
11 months agodrm/xe: Nuke xe's copy of intel_fbdev_fb.h
Ville Syrjälä [Mon, 6 May 2024 18:33:31 +0000 (21:33 +0300)]
drm/xe: Nuke xe's copy of intel_fbdev_fb.h

For some reason xe and i915 each have an identical (fortunately)
copy of intel_fbdev_fb.h. The xe copy actually only gets included
by xe's intel_fbdev_fb.c, and the i915 copy by everyone else,
include intel_fbdev.c which is the actual caller of the
functions declared in the header.

This means the xe and i915 headers are free to define/declare
completely incompatible things and the build would still succeed
as long as the symbol names match.

That is not a good thing, so let's nuke xe's copy of the header
so that everyone will use the same header, and be forced to
agree on the same API/ABI.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240506183331.7720-1-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Lucas De Marchi <lucas.demarchi@intel.com>
12 months agodrm/i915: Use drm_crtc_vblank_crtc()
Ville Syrjälä [Mon, 8 Apr 2024 19:06:09 +0000 (22:06 +0300)]
drm/i915: Use drm_crtc_vblank_crtc()

Replace the open coded drm_crtc_vblank_crtc() with the real
thing.

Cc: intel-gfx@lists.freedesktop.org
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240408190611.24914-3-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
12 months agodrm/i915/bios: Define VBT block 253 (PRD Table) contents
Ville Syrjälä [Fri, 3 May 2024 12:24:49 +0000 (15:24 +0300)]
drm/i915/bios: Define VBT block 253 (PRD Table) contents

Define the contents of VBT block 253 (PRD Table).

Unfortunately the block has two definitions, with the cutoff
supposedly happening on ICL vs. TGL. Also according to some
notes it might be that the VBIOS (if that's still a thing)
still uses the old definition even on TGL+. Quite the mess.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-36-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
12 months agodrm/i915/bios: Define VBT block 252 (int15 Hook)
Ville Syrjälä [Fri, 3 May 2024 12:24:48 +0000 (15:24 +0300)]
drm/i915/bios: Define VBT block 252 (int15 Hook)

Declare that VBT block 252 is the "int15 hook". This is some
VBIOS only juju so don't bother with a full definition.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-35-ville.syrjala@linux.intel.com
Acked-by: Jani Nikula <jani.nikula@intel.com>
12 months agodrm/i915/bios: Define VBT block 55 (Compression Parameters)
Ville Syrjälä [Fri, 3 May 2024 12:24:47 +0000 (15:24 +0300)]
drm/i915/bios: Define VBT block 55 (Compression Parameters)

Define the contents of the obsolete VBT block 55 (Compression
Parameters).

This was some early attempt at defining the compression
parameters. However the spec says:
"This block is obsolete and should not be consumed for any
 compression programming."

Block 56 is the replacement that should actually be used.

So let's just name the obsolete old block but not even
bother defining the contents.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-34-ville.syrjala@linux.intel.com
Acked-by: Jani Nikula <jani.nikula@intel.com>
12 months agodrm/i915/bios: Define VBT block 50 (MIPI) contents
Ville Syrjälä [Fri, 3 May 2024 12:24:46 +0000 (15:24 +0300)]
drm/i915/bios: Define VBT block 50 (MIPI) contents

Define the contents of VBT block 50 (MIPI).

This was some easly attempt at a MIPI DSI stuff. I'm not sure
this was ever actually used (I certainly don't have any VBTs
with this block), but here's some kind of definition for it
anyway.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-33-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
12 months agodrm/i915/bios: Define VBT block 57 (Vswing PreEmphasis Table) contents
Ville Syrjälä [Fri, 3 May 2024 12:24:45 +0000 (15:24 +0300)]
drm/i915/bios: Define VBT block 57 (Vswing PreEmphasis Table) contents

Define the contents of VBT block 57 (Vswing PreEmphasis Table).

The contents is highly platform specific. The columns of the
table corresponding to some set of PHY/etc registers. The rows
corresponding to all legal vswing+pre-emphasis combinations
(ie. should be 10 rows in each table). And each table
corresponds to a platform specific (mostly undocumented)
mapping based on link rate/eDP low-vswing/etc. parameters.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-32-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
12 months agodrm/i915/bios: Define VBT block 55 (RGB Palette Table) contents
Ville Syrjälä [Fri, 3 May 2024 12:24:44 +0000 (15:24 +0300)]
drm/i915/bios: Define VBT block 55 (RGB Palette Table) contents

Define the contents of VBT block 55 (RGB Palette Table).

Note that I've not actually seen any real world VBTs with this
block.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-31-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
12 months agodrm/i915/bios: Define VBT block 51 (Fixed Set Mode Table) contents
Ville Syrjälä [Fri, 3 May 2024 12:24:43 +0000 (15:24 +0300)]
drm/i915/bios: Define VBT block 51 (Fixed Set Mode Table) contents

Define the contents of VBT block 51 (Fixed Set Mode Table).

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-30-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
12 months agodrm/i915/bios: Define VBT block 46 (Chromaticity For Narrow Gamut Panel) contents
Ville Syrjälä [Fri, 3 May 2024 12:24:42 +0000 (15:24 +0300)]
drm/i915/bios: Define VBT block 46 (Chromaticity For Narrow Gamut Panel) contents

Define the contents of VBT block 46 (Chromaticity For Narrow Gamut
Panel). One entry per panel.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-29-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
12 months agodrm/i915/bios: Define VBT block 45 (eDP BFI) contents
Ville Syrjälä [Fri, 3 May 2024 12:24:41 +0000 (15:24 +0300)]
drm/i915/bios: Define VBT block 45 (eDP BFI) contents

Define the contents of VBT block 45 (eDP BFI).

Note that I've not actually seen any real world VBTs with this
block.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-28-ville.syrjala@linux.intel.com
Acked-by: Jani Nikula <jani.nikula@intel.com>
12 months agodrm/i915/bios: Define VBT block 28 (EFP DTD) contents
Ville Syrjälä [Fri, 3 May 2024 12:24:40 +0000 (15:24 +0300)]
drm/i915/bios: Define VBT block 28 (EFP DTD) contents

Define the contents of VBT block 28 (EFP DTD).

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-27-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>