platform/kernel/linux-starfive.git
21 months agodrm/i915: move wm to display.wm
Jani Nikula [Wed, 24 Aug 2022 13:15:40 +0000 (16:15 +0300)]
drm/i915: move wm to display.wm

Move display watermark related members under drm_i915_private display
sub-struct.

It's a bit arbitrary when to define a named struct for grouping, but
clearly intel_wm is big enough to warrant a separate definition.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/b991dd25f8f539746c475d417691e0816ff6b24a.1661346845.git.jani.nikula@intel.com
21 months agodrm/i915: move and group fbdev under display.fbdev
Jani Nikula [Wed, 24 Aug 2022 13:15:39 +0000 (16:15 +0300)]
drm/i915: move and group fbdev under display.fbdev

Move display fbdev related members under drm_i915_private display
sub-struct.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/7eb563bc88623bd3f12b9a00efec85e6a78d5800.1661346845.git.jani.nikula@intel.com
21 months agodrm/i915: move dpll under display.dpll
Jani Nikula [Wed, 24 Aug 2022 13:15:38 +0000 (16:15 +0300)]
drm/i915: move dpll under display.dpll

Move display dpll related members under drm_i915_private display
sub-struct.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/8818a2a4330edb9800f567626958b2de8872aa63.1661346845.git.jani.nikula@intel.com
21 months agodrm/i915: move and split audio under display.audio and display.funcs
Jani Nikula [Wed, 24 Aug 2022 13:15:37 +0000 (16:15 +0300)]
drm/i915: move and split audio under display.audio and display.funcs

Move display audio related members under drm_i915_private display
sub-struct.

Split audio funcs to display.funcs to follow the same pattern as all the
other display functions.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/51c0b966963a8b47efe3a431e0ce106bdd5269c5.1661346845.git.jani.nikula@intel.com
21 months agodrm/i915: move dmc to display.dmc
Jani Nikula [Wed, 24 Aug 2022 13:15:36 +0000 (16:15 +0300)]
drm/i915: move dmc to display.dmc

Move display dmc related members under drm_i915_private display
sub-struct.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/7cb91222e099b96b82c74b5f086d50c43459d61b.1661346845.git.jani.nikula@intel.com
21 months agodrm/i915: move and group pps members under display.pps
Jani Nikula [Wed, 24 Aug 2022 13:15:35 +0000 (16:15 +0300)]
drm/i915: move and group pps members under display.pps

Move display PPS related members under drm_i915_private display
sub-struct.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/7ecc37045ab9eb22831517e5a59ca74edb31962f.1661346845.git.jani.nikula@intel.com
21 months agodrm/i915: move and group gmbus members under display.gmbus
Jani Nikula [Wed, 24 Aug 2022 13:15:34 +0000 (16:15 +0300)]
drm/i915: move and group gmbus members under display.gmbus

Move display gmbus related members under drm_i915_private display
sub-struct.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/9379e4d8982c1ddea215a3f602f08a4055928c7c.1661346845.git.jani.nikula@intel.com
21 months agodrm/i915: move color_funcs to display.funcs
Jani Nikula [Wed, 24 Aug 2022 13:15:33 +0000 (16:15 +0300)]
drm/i915: move color_funcs to display.funcs

Move display color functions under drm_i915_private display sub-struct.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/36d6e9327582c94c1962c10ebd1581c3d15a5743.1661346845.git.jani.nikula@intel.com
21 months agodrm/i915: move fdi_funcs to display.funcs
Jani Nikula [Wed, 24 Aug 2022 13:15:32 +0000 (16:15 +0300)]
drm/i915: move fdi_funcs to display.funcs

Move display fdi functions under drm_i915_private display sub-struct.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/16ff8df6c08411c0e5aac3356dffe7f5120fcfeb.1661346845.git.jani.nikula@intel.com
21 months agodrm/i915: move wm_disp funcs to display.funcs
Jani Nikula [Wed, 24 Aug 2022 13:15:31 +0000 (16:15 +0300)]
drm/i915: move wm_disp funcs to display.funcs

Move display watermark functions under drm_i915_private display
sub-struct.

Rename struct drm_i915_wm_disp_funcs to intel_wm_funcs while at it.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/29d07c82ef7d33a59fc9c8e25ae2d2f900677a4c.1661346845.git.jani.nikula@intel.com
21 months agodrm/i915: move hotplug_funcs to display.funcs
Jani Nikula [Wed, 24 Aug 2022 13:15:30 +0000 (16:15 +0300)]
drm/i915: move hotplug_funcs to display.funcs

Move display hotplug functions under drm_i915_private display
sub-struct.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1cf677f1d02b8b621ec41ff77fe5de26d4f6954a.1661346845.git.jani.nikula@intel.com
21 months agodrm/i915: move dpll_funcs to display.funcs
Jani Nikula [Wed, 24 Aug 2022 13:15:29 +0000 (16:15 +0300)]
drm/i915: move dpll_funcs to display.funcs

Move display dpll functions under drm_i915_private display sub-struct.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/5bf7aada2c7f0500c5002fa089fb66a92019a301.1661346845.git.jani.nikula@intel.com
21 months agodrm/i915: move cdclk_funcs to display.funcs
Jani Nikula [Wed, 24 Aug 2022 13:15:28 +0000 (16:15 +0300)]
drm/i915: move cdclk_funcs to display.funcs

Move display cdclk functions under drm_i915_private display sub-struct.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/77e12e21bb9682a3c1d54f8d59eecc5945ef16d0.1661346845.git.jani.nikula@intel.com
21 months agodrm/i915: add display sub-struct to drm_i915_private
Jani Nikula [Wed, 24 Aug 2022 13:15:27 +0000 (16:15 +0300)]
drm/i915: add display sub-struct to drm_i915_private

In another long-overdue cleanup, add a display sub-struct to
drm_i915_private, and start moving display related members there. Start
with display funcs that need a rename anyway to not collide with the new
display member.

Add a new header under display/ for defining struct intel_display.

Rename struct drm_i915_display_funcs to intel_display_funcs while at it.

v2:
- Fix multi-line comment style (Arun)
- Use display as the member name

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/d44cae096b664f7015f8c797d6dfd4964226d4f8.1661346845.git.jani.nikula@intel.com
21 months agodrm/i915: Add new ADL-S pci id
José Roberto de Souza [Wed, 24 Aug 2022 13:39:35 +0000 (06:39 -0700)]
drm/i915: Add new ADL-S pci id

New PCI id recently added.

BSpec: 53655
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Madhumitha Tolakanahalli Pradeep <madhumitha.tolakanahalli.pradeep@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220824133935.51560-1-jose.souza@intel.com
21 months agodrm/i915: Skip wm/ddb readout for disabled pipes
Ville Syrjälä [Fri, 17 Jun 2022 19:59:48 +0000 (22:59 +0300)]
drm/i915: Skip wm/ddb readout for disabled pipes

The stuff programmed into the wm/ddb registers of planes
on disabled pipes doesn't matter. So during readout just
leave our software state tracking for those zeroed.

This should avoid us trying too hard to clean up after
whatever mess the VBIOS/GOP left in there. The actual
hardware state will get cleaned up if/when we enable
the pipe anyway.

Cc: stable@vger.kernel.org
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5711
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220617195948.24007-1-ville.syrjala@linux.intel.com
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
21 months agodrm/i915/display/mtl: Extend MBUS programming
José Roberto de Souza [Thu, 18 Aug 2022 23:42:00 +0000 (16:42 -0700)]
drm/i915/display/mtl: Extend MBUS programming

Display version 14 also supports MBUS joining just like ADL-P
and also it does not need MBUS initialization, so extending ADL-P
code paths to display version 14 and higher.

Bspec: 49213

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220818234202.451742-20-radhakrishna.sripada@intel.com
21 months agodrm/i915/mtl: Reuse adl-p DBUF calculations
Radhakrishna Sripada [Thu, 18 Aug 2022 23:41:59 +0000 (16:41 -0700)]
drm/i915/mtl: Reuse adl-p DBUF calculations

Meteorlake uses a similar DBUF calculations as ADL-P.
Reuse the call flow for meteorlake.

Bspec: 49255

Original Author: Caz Yokoyama
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220818234202.451742-19-radhakrishna.sripada@intel.com
21 months agodrm/i915/mtl: Update memory bandwidth parameters
Radhakrishna Sripada [Thu, 18 Aug 2022 23:41:57 +0000 (16:41 -0700)]
drm/i915/mtl: Update memory bandwidth parameters

Like ADL_P, Meteorlake has different memory characteristics from
past platforms. Update the values used by our memory bandwidth
calculations accordingly.

Bspec: 64631

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220818234202.451742-17-radhakrishna.sripada@intel.com
21 months agodrm/i915/mtl: memory latency data from LATENCY_LPX_LPY for WM
Radhakrishna Sripada [Thu, 18 Aug 2022 23:41:55 +0000 (16:41 -0700)]
drm/i915/mtl: memory latency data from LATENCY_LPX_LPY for WM

Since Xe LPD+, Memory latency data are in LATENCY_LPX_LPY registers
instead of GT driver mailbox.

v2: Use the extracted wm latency adjustment function(Matt)
v3: Use Odd/even for Latency fields(MattR)

Bspec: 64608

Cc: Matt Roper <matthew.d.roper@intel.com>
Original Author: Caz Yokoyama
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/<20220818234202.451742-15-radhakrishna.sripada@intel.com>
21 months agodrm/i915: Extract wm latency adjustment to its own function
Radhakrishna Sripada [Thu, 18 Aug 2022 23:41:54 +0000 (16:41 -0700)]
drm/i915: Extract wm latency adjustment to its own function

Watermark latency is adjusted in cases when latency is 0us for level
greater than 1, the subsequent levels are disabled. Extract this logic
into its own function.

v2: Pass dev_priv to the extracted function(MattR)

Suggested-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220818234202.451742-14-radhakrishna.sripada@intel.com
21 months agodrm/i915/mtl: Fix rawclk for Meteorlake PCH
Clint Taylor [Thu, 18 Aug 2022 23:41:53 +0000 (16:41 -0700)]
drm/i915/mtl: Fix rawclk for Meteorlake PCH

MTL has a fixed rawclk of 38400Khz. Register does not need to be
reprogrammed.

Bspec: 49304

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220818234202.451742-13-radhakrishna.sripada@intel.com
21 months agodrm/i915/mtl: Add support for MTL in Display Init sequences
Radhakrishna Sripada [Thu, 18 Aug 2022 23:41:50 +0000 (16:41 -0700)]
drm/i915/mtl: Add support for MTL in Display Init sequences

The initialization sequence for Meteorlake reuses the sequence for
icelake for most parts. Some changes viz. reset PICA handshake
are added.

Bspec: 49189

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220818234202.451742-10-radhakrishna.sripada@intel.com
21 months agodrm/i915/mtl: Add VBT port and AUX_CH mapping
Imre Deak [Thu, 18 Aug 2022 23:41:49 +0000 (16:41 -0700)]
drm/i915/mtl: Add VBT port and AUX_CH mapping

Add the proper VBT port,AUX_CH -> i915 port,AUX_CH mapping which just
follows the ADL_P one.

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220818234202.451742-9-radhakrishna.sripada@intel.com
21 months agodrm/i915/mtl: Add PCH support
Radhakrishna Sripada [Thu, 18 Aug 2022 23:41:47 +0000 (16:41 -0700)]
drm/i915/mtl: Add PCH support

Add support for Meteorpoint(MTP) PCH used with Meteorlake.

Cc: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220818234202.451742-7-radhakrishna.sripada@intel.com
21 months agodrm/i915/glk: ECS Liva Q2 needs GLK HDMI port timing quirk
Diego Santa Cruz [Thu, 16 Jun 2022 12:41:37 +0000 (15:41 +0300)]
drm/i915/glk: ECS Liva Q2 needs GLK HDMI port timing quirk

The quirk added in upstream commit 90c3e2198777 ("drm/i915/glk: Add
Quirk for GLK NUC HDMI port issues.") is also required on the ECS Liva
Q2.

Note: Would be nicer to figure out the extra delay required for the
retimer without quirks, however don't know how to check for that.

Cc: stable@vger.kernel.org
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1326
Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220616124137.3184371-1-jani.nikula@intel.com
21 months agodrm/i915: fix null pointer dereference
Łukasz Bartosik [Tue, 1 Feb 2022 15:33:54 +0000 (16:33 +0100)]
drm/i915: fix null pointer dereference

Asus chromebook CX550 crashes during boot on v5.17-rc1 kernel.
The root cause is null pointer defeference of bi_next
in tgl_get_bw_info() in drivers/gpu/drm/i915/display/intel_bw.c.

BUG: kernel NULL pointer dereference, address: 000000000000002e
PGD 0 P4D 0
Oops: 0002 [#1] PREEMPT SMP NOPTI
CPU: 0 PID: 1 Comm: swapper/0 Tainted: G     U            5.17.0-rc1
Hardware name: Google Delbin/Delbin, BIOS Google_Delbin.13672.156.3 05/14/2021
RIP: 0010:tgl_get_bw_info+0x2de/0x510
...
[    2.554467] Call Trace:
[    2.554467]  <TASK>
[    2.554467]  intel_bw_init_hw+0x14a/0x434
[    2.554467]  ? _printk+0x59/0x73
[    2.554467]  ? _dev_err+0x77/0x91
[    2.554467]  i915_driver_hw_probe+0x329/0x33e
[    2.554467]  i915_driver_probe+0x4c8/0x638
[    2.554467]  i915_pci_probe+0xf8/0x14e
[    2.554467]  ? _raw_spin_unlock_irqrestore+0x12/0x2c
[    2.554467]  pci_device_probe+0xaa/0x142
[    2.554467]  really_probe+0x13f/0x2f4
[    2.554467]  __driver_probe_device+0x9e/0xd3
[    2.554467]  driver_probe_device+0x24/0x7c
[    2.554467]  __driver_attach+0xba/0xcf
[    2.554467]  ? driver_attach+0x1f/0x1f
[    2.554467]  bus_for_each_dev+0x8c/0xc0
[    2.554467]  bus_add_driver+0x11b/0x1f7
[    2.554467]  driver_register+0x60/0xea
[    2.554467]  ? mipi_dsi_bus_init+0x16/0x16
[    2.554467]  i915_init+0x2c/0xb9
[    2.554467]  ? mipi_dsi_bus_init+0x16/0x16
[    2.554467]  do_one_initcall+0x12e/0x2b3
[    2.554467]  do_initcall_level+0xd6/0xf3
[    2.554467]  do_initcalls+0x4e/0x79
[    2.554467]  kernel_init_freeable+0xed/0x14d
[    2.554467]  ? rest_init+0xc1/0xc1
[    2.554467]  kernel_init+0x1a/0x120
[    2.554467]  ret_from_fork+0x1f/0x30
[    2.554467]  </TASK>
...
Kernel panic - not syncing: Fatal exception

Fixes: c64a9a7c05be ("drm/i915: Update memory bandwidth formulae")
Signed-off-by: Łukasz Bartosik <lb@semihalf.com>
Reviewed-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220201153354.11971-1-lukasz.bartosik@semihalf.com
21 months agodrm/i915/dg2: Add additional HDMI pixel clock frequencies
Taylor, Clinton A [Mon, 1 Aug 2022 23:48:56 +0000 (16:48 -0700)]
drm/i915/dg2: Add additional HDMI pixel clock frequencies

Using the BSPEC algorithm add addition HDMI pixel clocks to the existing
table.

v2: remove 297000 unused entry

Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Signed-off-by: Taylor, Clinton A <clinton.a.taylor@intel.com>
Reviewed-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
[mattrope: Fixed minor whitepsace issue flagged by checkpatch]
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220801234856.2832317-1-clinton.a.taylor@intel.com
21 months agodrm/i915: move has_dsc to runtime info
Jani Nikula [Fri, 19 Aug 2022 12:02:47 +0000 (15:02 +0300)]
drm/i915: move has_dsc to runtime info

If it's modified runtime, it's runtime info.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Maarten Lankhort <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/0e2646e5fdaad2785678b4f140091b3d91b97f7e.1660910433.git.jani.nikula@intel.com
21 months agodrm/i915: move has_dmc to runtime info
Jani Nikula [Fri, 19 Aug 2022 12:02:46 +0000 (15:02 +0300)]
drm/i915: move has_dmc to runtime info

If it's modified runtime, it's runtime info.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Maarten Lankhort <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/b8f69cd1b6114295826c1f88be27e867c91f7df4.1660910433.git.jani.nikula@intel.com
21 months agodrm/i915: move has_hdcp to runtime info
Jani Nikula [Fri, 19 Aug 2022 12:02:45 +0000 (15:02 +0300)]
drm/i915: move has_hdcp to runtime info

If it's modified runtime, it's runtime info.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Maarten Lankhort <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/b146250e02a4b2f086e7e587dd1742589e0e8fba.1660910433.git.jani.nikula@intel.com
21 months agodrm/i915: move pipe_mask and cpu_transcoder_mask to runtime info
Jani Nikula [Fri, 19 Aug 2022 12:02:44 +0000 (15:02 +0300)]
drm/i915: move pipe_mask and cpu_transcoder_mask to runtime info

If it's modified runtime, it's runtime info.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Maarten Lankhort <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/bff2ea209031063cec38085518508394b064df4a.1660910433.git.jani.nikula@intel.com
21 months agodrm/i915: move platform_engine_mask to runtime info
Jani Nikula [Fri, 19 Aug 2022 12:02:43 +0000 (15:02 +0300)]
drm/i915: move platform_engine_mask to runtime info

If it's modified runtime, it's runtime info.

mock_gem_device() is the only one that modifies it. If that could be
fixed, we wouldn't have to do this.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Maarten Lankhort <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1261406b373998c1a171ee9ed91f7f562826eba6.1660910433.git.jani.nikula@intel.com
21 months agodrm/i915: move memory_regions to runtime info
Jani Nikula [Fri, 19 Aug 2022 12:02:42 +0000 (15:02 +0300)]
drm/i915: move memory_regions to runtime info

If it's modified runtime, it's runtime info.

mock_gem_device() is the only one that modifies it. If that could be
fixed, we wouldn't have to do this.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Maarten Lankhort <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/12aace656c6a6380575767d7f6ccd73c12a627c3.1660910433.git.jani.nikula@intel.com
21 months agodrm/i915: move has_pooled_eu to runtime info
Jani Nikula [Fri, 19 Aug 2022 12:02:41 +0000 (15:02 +0300)]
drm/i915: move has_pooled_eu to runtime info

If it's modified runtime, it's runtime info.

Curiously, the flag was never initialized statically.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Maarten Lankhort <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/db6d47abd87c74ae5f5be1cda62af13518c896fb.1660910433.git.jani.nikula@intel.com
21 months agodrm/i915: move ppgtt_type and ppgtt_size to runtime info
Jani Nikula [Fri, 19 Aug 2022 12:02:40 +0000 (15:02 +0300)]
drm/i915: move ppgtt_type and ppgtt_size to runtime info

If it's modified runtime, it's runtime info.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Maarten Lankhort <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/9a9b94cb79a00229da5a564a16ea750a6d392ab6.1660910433.git.jani.nikula@intel.com
21 months agodrm/i915: move page_sizes to runtime info
Jani Nikula [Fri, 19 Aug 2022 12:02:39 +0000 (15:02 +0300)]
drm/i915: move page_sizes to runtime info

If it's modified runtime, it's runtime info.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Maarten Lankhort <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/f6825dd97d2ba63aa395c30131c4b9e6ef32b0c8.1660910433.git.jani.nikula@intel.com
21 months agodrm/i915: move fbc_mask to runtime info
Jani Nikula [Fri, 19 Aug 2022 12:02:38 +0000 (15:02 +0300)]
drm/i915: move fbc_mask to runtime info

If it's modified runtime, it's runtime info.

v2: Rebase on mtl fbc_mask

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Maarten Lankhort <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/dd1898084b732ba265b212ddbc0fcdd826c11820.1660910433.git.jani.nikula@intel.com
21 months agodrm/i915: move graphics.ver and graphics.rel to runtime info
Jani Nikula [Fri, 19 Aug 2022 12:02:37 +0000 (15:02 +0300)]
drm/i915: move graphics.ver and graphics.rel to runtime info

If it's modified runtime, it's runtime info.

mock_gem_device() is the only one that modifies them. If that could be
fixed, we wouldn't have to do this.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Maarten Lankhort <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/6bdf6cc0d67e3ed8042d2b92303351111147ba47.1660910433.git.jani.nikula@intel.com
21 months agodrm/i915: add initial runtime info into device info
Jani Nikula [Fri, 19 Aug 2022 12:02:36 +0000 (15:02 +0300)]
drm/i915: add initial runtime info into device info

Add initial runtime info that we can copy to runtime info at i915
creation time. This lets us define the initial values for runtime info
statically while making it possible to change them runtime. This will be
the new home for the current "const" device info members that are
modified runtime anyway.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Maarten Lankhort <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/a77c6db2da20d401f47a0a5e87356b9b3f6292df.1660910433.git.jani.nikula@intel.com
21 months agodrm/i915: combine device info printing into one
Jani Nikula [Fri, 19 Aug 2022 12:02:35 +0000 (15:02 +0300)]
drm/i915: combine device info printing into one

We'll be moving info between static and runtime info. Combine the
printing functions into one to keep the output sensible and (mostly)
unchanged in the process.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Maarten Lankhort <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/8579bfe0fcc5ee8390d4cded68a0167a618097f5.1660910433.git.jani.nikula@intel.com
21 months agodrm/i915/backlight: Disable pps power hook for aux based backlight
Jouni Högander [Mon, 22 Aug 2022 14:08:36 +0000 (17:08 +0300)]
drm/i915/backlight: Disable pps power hook for aux based backlight

Pps power hook seems to be problematic for backlight controlled via
aux channel. Disable it for such cases.

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/3657
Cc: stable@vger.kernel.org
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220822140836.534432-1-jouni.hogander@intel.com
21 months agodrm/i915/utils: remove unused KBps/MBps/GBps macros
Jani Nikula [Mon, 15 Aug 2022 08:09:07 +0000 (11:09 +0300)]
drm/i915/utils: remove unused KBps/MBps/GBps macros

Remove unused macros. If needed again, such macros belong in
<linux/units.h>.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220815080907.3229449-1-jani.nikula@intel.com
21 months agodrm/i915/dsc/mtl: Enable alternate ICH method
Vandita Kulkarni [Wed, 17 Aug 2022 12:45:16 +0000 (15:45 +0300)]
drm/i915/dsc/mtl: Enable alternate ICH method

DSC 1.2 is supported from MTL, hence program ICH accordingly.

Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220817124516.284456-2-jani.nikula@intel.com
21 months agodrm/i915/dsc/mtl: Update the DSC minor version
Vandita Kulkarni [Wed, 17 Aug 2022 12:45:15 +0000 (15:45 +0300)]
drm/i915/dsc/mtl: Update the DSC minor version

From MTL onwards we support DSC 1.2, since there is hardcoding to minor
version 1, update it.

Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220817124516.284456-1-jani.nikula@intel.com
21 months agodrm/i915/display: avoid warnings when registering dual panel backlight
Arun R Murthy [Mon, 8 Aug 2022 03:57:50 +0000 (09:27 +0530)]
drm/i915/display: avoid warnings when registering dual panel backlight

Commit 20f85ef89d94 ("drm/i915/backlight: use unique backlight device
names") added support for multiple backlight devices on dual panel
systems, but did so with error handling on -EEXIST from
backlight_device_register(). Unfortunately, that triggered a warning in
dmesg all the way down from sysfs_add_file_mode_ns() and
sysfs_warn_dup().

Instead of optimistically always attempting to register with the default
name ("intel_backlight", which we have to retain for backward
compatibility), check if a backlight device with the name exists first,
and, if so, use the card and connector based name.

v2: reworked on top of the patch commit 20f85ef89d94
("drm/i915/backlight: use unique backlight device names")
v3: fixed the ref count leak(Jani N)

Fixes: 20f85ef89d94 ("drm/i915/backlight: use unique backlight device names")
Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220808035750.3111046-1-arun.r.murthy@intel.com
21 months agodrm/i915/mtl: Introduce FBC B
Ville Syrjälä [Wed, 17 Aug 2022 12:26:24 +0000 (15:26 +0300)]
drm/i915/mtl: Introduce FBC B

MTL introduces a second FBC engine. The two FBC engines can
operate entirely independently, FBC A serving pipe A and
FBC B serving pipe B.

The one place where things might go a bit wrong is the CFB
allocation from stolen. We might have to consider some change
to the allocation strategy to have a better chance of both
engines being able to allocate its CFB. Maybe FBC A should
allocate bottom up and FBC B top down, or something? For the
moment the allocation strategy is DRM_MM_INSERT_BEST for both.

Cc: Mika Kahola <mika.kahola@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220817122624.213889-1-jani.nikula@intel.com
21 months agodrm/i915/mtl: Meteorlake and later support DP 2.0
Jani Nikula [Wed, 17 Aug 2022 12:19:48 +0000 (15:19 +0300)]
drm/i915/mtl: Meteorlake and later support DP 2.0

Meteorlake and newer platforms support DP 2.0.

Cc: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220817121948.180655-1-jani.nikula@intel.com
21 months agodrm/i915/dsi: use VBT backlight and CABC port definitions directly
Jani Nikula [Tue, 16 Aug 2022 15:37:22 +0000 (18:37 +0300)]
drm/i915/dsi: use VBT backlight and CABC port definitions directly

Drop the intermediate values stored in intel_dsi and use the VBT values
directly, now that they're conveniently stored in panel->vbt.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/8b3765f1e1dc4d436b312016f72647e03ba49f94.1660664162.git.jani.nikula@intel.com
21 months agodrm/i915/dsi: fix dual-link DSI backlight and CABC ports for display 11+
Jani Nikula [Tue, 16 Aug 2022 15:37:21 +0000 (18:37 +0300)]
drm/i915/dsi: fix dual-link DSI backlight and CABC ports for display 11+

The VBT dual-link DSI backlight and CABC still use ports A and C, both
in Bspec and code, while display 11+ DSI only supports ports A and
B. Assume port C actually means port B for display 11+ when parsing VBT.

Bspec: 20154
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6476
Cc: stable@vger.kernel.org
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/8c462718bcc7b36a83e09d0a5eef058b6bc8b1a2.1660664162.git.jani.nikula@intel.com
21 months agodrm/i915/dsi: filter invalid backlight and CABC ports
Jani Nikula [Tue, 16 Aug 2022 15:37:20 +0000 (18:37 +0300)]
drm/i915/dsi: filter invalid backlight and CABC ports

Avoid using ports that aren't initialized in case the VBT backlight or
CABC ports have invalid values. This fixes a NULL pointer dereference of
intel_dsi->dsi_hosts[port] in such cases.

Cc: stable@vger.kernel.org
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/b0f4f087866257d280eb97d6bcfcefd109cc5fa2.1660664162.git.jani.nikula@intel.com
21 months agodrm/i915/irq: Fix a "the the" typo
Bo Liu [Tue, 16 Aug 2022 09:49:19 +0000 (05:49 -0400)]
drm/i915/irq: Fix a "the the" typo

There is an unexpected word "the" in the file i915_irq.c,
fix it.

Signed-off-by: Bo Liu <liubo03@inspur.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220816094919.5419-1-liubo03@inspur.com
21 months agodrm/i915/backlight: split out backlight registers to a separate file
Jani Nikula [Mon, 15 Aug 2022 09:48:38 +0000 (12:48 +0300)]
drm/i915/backlight: split out backlight registers to a separate file

Declutter i915_reg.h by splitting backlight registers to a separate
file. Also include the utility pin definitions, even though they are
used for non-backlight things too.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220815094838.3511723-1-jani.nikula@intel.com
21 months agodrm/i915/tc: Fix PHY ownership programming in HDMI legacy mode
Imre Deak [Tue, 26 Jul 2022 13:43:13 +0000 (16:43 +0300)]
drm/i915/tc: Fix PHY ownership programming in HDMI legacy mode

Make sure the TypeC PHY ownership flag is not getting reset during
an HDMI modeset on the given port. Besides the WARN this triggered, it
didn't cause other issues, since for TypeC legacy mode setting the
PHY ownership flag is optional (there is no other user of the PHY
besides display).

Reported-and-tested-by: Shawn C Lee <shawn.c.lee@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220726134313.1484763-1-imre.deak@intel.com
21 months agodrm/i915/xelpd: Fix unclaimed accesses while loading PIPEDMC-C/D
Imre Deak [Mon, 8 Aug 2022 10:30:54 +0000 (13:30 +0300)]
drm/i915/xelpd: Fix unclaimed accesses while loading PIPEDMC-C/D

At the moment on DG2 at least loading the DMC firmware's PIPEDMC C and D
programs leads to sporadic unclaimed register accesses while programming
the initial state as described by the firmware's "MMIO init" table. This
will also lead to later unclaimed accesses for unrelated transcoder/pipe
registers backed by the pipe C and D display power wells.

Disabling the PIPEDMC clock gating during initialization - similarly to
Wa_16015201720 fixed this problem in my tests. While pipe A an B
requires the clock gating to be disabled all the time pipe C and D
requires this only while accessing the PIPEDMC registers.

Bspec: 49193
References: https://gitlab.freedesktop.org/drm/intel/-/issues/6526
References: https://gitlab.freedesktop.org/drm/intel/-/issues/6308
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220808103054.3586074-1-imre.deak@intel.com
22 months agodrm/i915: Sanitycheck PCI BARs
Piotr Piórkowski [Fri, 5 Aug 2022 15:59:59 +0000 (17:59 +0200)]
drm/i915: Sanitycheck PCI BARs

For proper operation of i915 we need usable PCI GTTMMADDR BAR 0
(1 for GEN2). In most cases we also need usable PCI GFXMEM BAR 2.
Let's add functions to check if BARs are set, and that it have
a size greater than 0.
In case GTTMMADDR BAR, let's validate at the beginning of i915
initialization.
For other BARs, let's validate before first use.

Signed-off-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220805155959.1983584-3-piotr.piorkowski@intel.com
22 months agodrm/i915: Use of BARs names instead of numbers
Piotr Piórkowski [Fri, 5 Aug 2022 15:59:58 +0000 (17:59 +0200)]
drm/i915: Use of BARs names instead of numbers

At the moment, when we refer to some PCI BAR we use the number of
this BAR in the code. The meaning of BARs between different platforms
may be different. Therefore, in order to organize the code,
let's start using defined names instead of numbers.

v2: Add lost header in cfg_space.c

Signed-off-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220805155959.1983584-2-piotr.piorkowski@intel.com
22 months agodrm/i915/hdcp: replace BIT() with REG_BIT() in register definitions
Jani Nikula [Thu, 4 Aug 2022 09:58:35 +0000 (12:58 +0300)]
drm/i915/hdcp: replace BIT() with REG_BIT() in register definitions

Registers contents are supposed to be defined using REG_BIT() to ensure
they're u32 and the shift is within bounds.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/d28b9b9fef4f496bdaaad5503dd8e0027f167518.1659607033.git.jani.nikula@intel.com
22 months agodrm/i915/hdcp: split out hdcp registers to a separate file
Jani Nikula [Thu, 4 Aug 2022 09:58:34 +0000 (12:58 +0300)]
drm/i915/hdcp: split out hdcp registers to a separate file

Reduce the bloat of i915_reg.h. The registers are also only needed in a
few places, no need to have them defined everywhere.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ce8334342e8bdf92c17c714aa13574e66cad93bb.1659607033.git.jani.nikula@intel.com
22 months agoMerge drm/drm-next into drm-intel-next
Rodrigo Vivi [Thu, 4 Aug 2022 14:19:24 +0000 (10:19 -0400)]
Merge drm/drm-next into drm-intel-next

Sync up. In special to get the drm-intel-gt-next stuff.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
22 months agoMerge tag 'amd-drm-next-5.20-2022-07-29' of https://gitlab.freedesktop.org/agd5f...
Dave Airlie [Wed, 3 Aug 2022 04:00:18 +0000 (14:00 +1000)]
Merge tag 'amd-drm-next-5.20-2022-07-29' of https://gitlab.freedesktop.org/agd5f/linux into drm-next

amd-drm-next-5.20-2022-07-29:

amdgpu:
- Misc spelling and grammar fixes
- DC whitespace cleanups
- ACP smatch fix
- GFX 11.0 updates
- PSP 13.0 updates
- VCN 4.0 updates
- DC FP fix for PPC64
- Misc bug fixes

amdkfd:
- SVM fixes

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220729202742.6636-1-alexander.deucher@amd.com
22 months agodrm/i915/dg2: Add support for DC5 state
Anusha Srivatsa [Thu, 28 Jul 2022 18:36:41 +0000 (11:36 -0700)]
drm/i915/dg2: Add support for DC5 state

With the latest DMC in place, enabling DC5 on DG2.

Cc: Imre Deak <imre.deak@intel.com>
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220728183641.55692-1-anusha.srivatsa@intel.com
22 months agodrm/amd/display: Fix a compilation failure on PowerPC caused by FPU code
Rodrigo Siqueira [Thu, 28 Jul 2022 20:33:47 +0000 (16:33 -0400)]
drm/amd/display: Fix a compilation failure on PowerPC caused by FPU code

We got a report from Stephen/Michael that the PowerPC build was failing
with the following error:

ld: drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.o uses hard float, drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.o uses soft float
ld: failed to merge target specific data of file drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.o

This error happened because of the function optc3_set_vrr_m_const. This
function expects a double as a parameter in a code that is not allowed
to have FPU operations. After further investigation, it became clear
that optc3_set_vrr_m_const was never invoked, so we can safely drop this
function and fix the ld issue.

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Melissa Wen <mwen@igalia.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: Michael Ellerman <mpe@ellerman.id.au>
Tested-by: Michael Ellerman <mpe@ellerman.id.au>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amdgpu: enable support for psp 13.0.4 block
Xiaojian Du [Wed, 27 Jul 2022 07:52:33 +0000 (15:52 +0800)]
drm/amdgpu: enable support for psp 13.0.4 block

This patch will enable support for psp 13.0.4 blcok.

Signed-off-by: Xiaojian Du <Xiaojian.Du@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amdgpu: add files for PSP 13.0.4
Xiaojian Du [Thu, 28 Jul 2022 05:25:26 +0000 (13:25 +0800)]
drm/amdgpu: add files for PSP 13.0.4

This patch will add files for PSP 13.0.4.

Signed-off-by: Xiaojian Du <Xiaojian.Du@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amdgpu: add header files for MP 13.0.4
Xiaojian Du [Thu, 28 Jul 2022 05:23:38 +0000 (13:23 +0800)]
drm/amdgpu: add header files for MP 13.0.4

This patch will add header files for MP 13.0.4.

Signed-off-by: Xiaojian Du <Xiaojian.Du@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amdgpu: correct RLC_RLCS_BOOTLOAD_STATUS offset and index
Yifan Zhang [Wed, 27 Jul 2022 06:53:47 +0000 (14:53 +0800)]
drm/amdgpu: correct RLC_RLCS_BOOTLOAD_STATUS offset and index

This patch corrects RLC_RLCS_BOOTLOAD_STATUS offset and index for
GC 11.0.1.

Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amdgpu: send msg to IMU for the front-door loading
Xiaojian Du [Wed, 27 Jul 2022 06:40:21 +0000 (14:40 +0800)]
drm/amdgpu: send msg to IMU for the front-door loading

This patch will make SMU send msg to IMU for the front-door loading, it is
required by some ASICs.

Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Signed-off-by: Xiaojian Du <Xiaojian.Du@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amdkfd: use time_is_before_jiffies(a + b) to replace "jiffies - a > b"
Yu Zhe [Thu, 28 Jul 2022 03:30:26 +0000 (11:30 +0800)]
drm/amdkfd: use time_is_before_jiffies(a + b) to replace "jiffies - a > b"

time_is_before_jiffies deals with timer wrapping correctly.

Signed-off-by: Yu Zhe <yuzhe@nfschina.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amdgpu: fix hive reference leak when reflecting psp topology info
Jonathan Kim [Thu, 28 Jul 2022 16:36:09 +0000 (12:36 -0400)]
drm/amdgpu: fix hive reference leak when reflecting psp topology info

Hives that require psp topology info to be reflected will leak hive
reference so fix it.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Reviewed-by: Shaoyun Liu <shaoyun.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amd/pm: enable GFX ULV feature support for SMU13.0.0
Evan Quan [Fri, 15 Jul 2022 03:03:01 +0000 (11:03 +0800)]
drm/amd/pm: enable GFX ULV feature support for SMU13.0.0

The feature is ready with latest firmwares.

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amd/pm: update driver if header for SMU 13.0.0
Evan Quan [Mon, 25 Jul 2022 03:45:43 +0000 (11:45 +0800)]
drm/amd/pm: update driver if header for SMU 13.0.0

And get the version bumped to 0x2C to match the latest PMFW.

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amdgpu: move mes self test after drm sched re-started
Jack Xiao [Wed, 20 Jul 2022 07:57:22 +0000 (15:57 +0800)]
drm/amdgpu: move mes self test after drm sched re-started

mes self test rely on vm mapping, move it after
drm sched re-started so that vm mapping can work
during gpu reset.

Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Acked-and-tested-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amdgpu: drop non-necessary call trace dump
Evan Quan [Wed, 20 Jul 2022 08:51:58 +0000 (16:51 +0800)]
drm/amdgpu: drop non-necessary call trace dump

This extra call trace dump comes out in every gpu reset.
And it gives people a wrong impression that something
went wrong. Although actually there was not.

Signed-off-by: Evan Quan <evan.quan@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amdgpu: enable VCN cg and JPEG cg/pg
Sonny Jiang [Thu, 21 Jul 2022 17:27:12 +0000 (13:27 -0400)]
drm/amdgpu: enable VCN cg and JPEG cg/pg

Not enable VCN pg because encode issue

Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amdgpu: vcn_4_0_2 video codec query
Sonny Jiang [Thu, 21 Jul 2022 17:27:11 +0000 (13:27 -0400)]
drm/amdgpu: vcn_4_0_2 video codec query

Enable support for vcn_4_0_2 video codec

Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amdgpu: add VCN_4_0_2 firmware support
Sonny Jiang [Thu, 21 Jul 2022 17:27:10 +0000 (13:27 -0400)]
drm/amdgpu: add VCN_4_0_2 firmware support

Add VCN_4_0_2 firmware support

Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amdgpu: add VCN function in NBIO v7.7
Sonny Jiang [Thu, 21 Jul 2022 17:27:09 +0000 (13:27 -0400)]
drm/amdgpu: add VCN function in NBIO v7.7

Add function to support VCN_4_0_2 doorbell

Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amdgpu: fix a vcn4 boot poll bug in emulation mode
Sonny Jiang [Thu, 21 Jul 2022 17:27:08 +0000 (13:27 -0400)]
drm/amdgpu: fix a vcn4 boot poll bug in emulation mode

The return value should be set in vcn4 boot poll.

Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amd/amdgpu: add memory training support for PSP_V13
Chengming Gui [Thu, 28 Jul 2022 01:15:43 +0000 (09:15 +0800)]
drm/amd/amdgpu: add memory training support for PSP_V13

Add PSP_V13 memory training support funcs.

v2: replace DRM_{DEBUG/ERROR} with dev_{dbg/err}. (Hawking)
v3: fix checkpatch error (Alex)

Signed-off-by: Chengming Gui <Jack.Gui@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amdkfd: remove an unnecessary amdgpu_bo_ref
Lang Yu [Mon, 25 Jul 2022 07:06:55 +0000 (15:06 +0800)]
drm/amdkfd: remove an unnecessary amdgpu_bo_ref

No need to reference the BO here, dmabuf framework will handle that.

Signed-off-by: Lang Yu <Lang.Yu@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amd/pm: Add get_gfx_off_status interface for yellow carp
Shikai Guo [Wed, 20 Jul 2022 11:38:24 +0000 (19:38 +0800)]
drm/amd/pm: Add get_gfx_off_status interface for yellow carp

add get_gfx_off_status interface to yellow_carp_ppt_funcs structure.

Signed-off-by: Shikai Guo <shikai.guo@amd.com>
Reviewed-by: Aaron Liu <aaron.liu@amd.com>
Reviewed-by: Prike Liang <prike.liang@amd.com>
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amd/display: Remove unused struct freesync_context
Maíra Canal [Wed, 27 Jul 2022 17:50:33 +0000 (14:50 -0300)]
drm/amd/display: Remove unused struct freesync_context

All references to struct freesync_context were removed, so remove the
struct freesync_context itself and its entry on struct dc_stream_state.

Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Maíra Canal <mairacanal@riseup.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amd/amdgpu: add additional page fault settings for gfx11
Chengming Gui [Mon, 20 Jun 2022 07:52:29 +0000 (15:52 +0800)]
drm/amd/amdgpu: add additional page fault settings for gfx11

Add three additional page fault settings.

V2: move reg offset definition to header file. (Alex)
V3: add all shift/mask definitions of used reg. (Hawking)

Signed-off-by: Chengming Gui <Jack.Gui@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amd/display: remove unneeded semicolon
Yang Li [Tue, 26 Jul 2022 22:28:09 +0000 (06:28 +0800)]
drm/amd/display: remove unneeded semicolon

Eliminate the following coccicheck warning:
./drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c:2344:67-68: Unneeded semicolon

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amdgpu: fix i2s_pdata out of bound array access
Vijendar Mukunda [Wed, 27 Jul 2022 10:45:43 +0000 (16:15 +0530)]
drm/amdgpu: fix i2s_pdata out of bound array access

Fixed following Smatch static checker warning:

    drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:393 acp_hw_init()
    error: buffer overflow 'i2s_pdata' 3 <= 3
    drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:396 acp_hw_init()
    error: buffer overflow 'i2s_pdata' 3 <= 3

Fixes: 4c33e5179ff1 ("drm/amdgpu: create I2S platform devices for Jadeite platform")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amdkfd: fix kgd_mem memory leak when importing dmabuf
Lang Yu [Tue, 26 Jul 2022 05:32:39 +0000 (13:32 +0800)]
drm/amdkfd: fix kgd_mem memory leak when importing dmabuf

The kgd_mem memory allocated in amdgpu_amdkfd_gpuvm_import_dmabuf()
is not freed properly.

Explicitly free it in amdgpu_amdkfd_gpuvm_free_memory_of_gpu()
under condition "mem->bo->kfd_bo != mem".

Suggested-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Lang Yu <Lang.Yu@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amdgpu: add debugfs for kfd system and ttm mem used
Alex Sierra [Mon, 13 Jun 2022 18:31:41 +0000 (13:31 -0500)]
drm/amdgpu: add debugfs for kfd system and ttm mem used

This keeps track of kfd system mem used and kfd ttm mem used.

Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Reviewed-by: Philip Yang <Philip.Yang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amdkfd: track unified memory reservation with xnack off
Alex Sierra [Tue, 17 May 2022 22:43:06 +0000 (17:43 -0500)]
drm/amdkfd: track unified memory reservation with xnack off

[WHY]
Unified memory with xnack off should be tracked, as userptr mappings
and legacy allocations do. To avoid oversuscribe system memory when
xnack off.
[How]
Exposing functions reserve_mem_limit and unreserve_mem_limit to SVM
API and call them on every prange creation and free.

Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amd/display: fix signedness bug in execute_synaptics_rc_command()
Dan Carpenter [Tue, 26 Jul 2022 15:15:31 +0000 (18:15 +0300)]
drm/amd/display: fix signedness bug in execute_synaptics_rc_command()

The "ret" variable needs to be signed for the error handling to work.

Fixes: 2ca97adccdc9 ("drm/amd/display: Add Synaptics Fifo Reset Workaround")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amd/display: Clean up some inconsistent indenting
Jiapeng Chong [Tue, 26 Jul 2022 07:25:55 +0000 (15:25 +0800)]
drm/amd/display: Clean up some inconsistent indenting

No functional modification involved.

smatch warnings:

drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1372 dp_dsc_clock_en_read() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1478 dp_dsc_clock_en_write() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1563 dp_dsc_slice_width_read() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1667 dp_dsc_slice_width_write() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1752 dp_dsc_slice_height_read() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1856 dp_dsc_slice_height_write() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1937 dp_dsc_bits_per_pixel_read() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:2038 dp_dsc_bits_per_pixel_write() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:2117 dp_dsc_pic_width_read() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:2178 dp_dsc_pic_height_read() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:2254 dp_dsc_chunk_size_read() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:2330 dp_dsc_slice_bpg_offset_read() warn: inconsistent indenting.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amd/display: Clean up some inconsistent indenting
Jiapeng Chong [Tue, 26 Jul 2022 07:25:54 +0000 (15:25 +0800)]
drm/amd/display: Clean up some inconsistent indenting

Clean up some inconsistent indenting, replace sizeof(x) / sizeof((x)[0]))
with ARRAY_SIZE(x).

smatch warnings:

drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn30/dcn30_fpu.c:185 optc3_fpu_set_vrr_m_const() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn30/dcn30_fpu.c:355 dcn30_fpu_set_mcif_arb_params() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn30/dcn30_fpu.c:384 dcn30_fpu_calculate_wm_and_dlg() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn30/dcn30_fpu.c:390 dcn30_fpu_calculate_wm_and_dlg() warn: inconsistent indenting.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amd/display: Clean up some inconsistent indenting
Jiapeng Chong [Tue, 26 Jul 2022 07:25:53 +0000 (15:25 +0800)]
drm/amd/display: Clean up some inconsistent indenting

No functional modification involved.

smatch warnings:

drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn303/dcn303_fpu.c:205 dcn303_fpu_update_bw_bounding_box() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn303/dcn303_fpu.c:355 dcn303_fpu_init_soc_bounding_box() warn: inconsistent indenting.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amd/display: Clean up some inconsistent indenting
Jiapeng Chong [Tue, 26 Jul 2022 07:25:52 +0000 (15:25 +0800)]
drm/amd/display: Clean up some inconsistent indenting

No functional modification involved.

smatch warning:

drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_util_32.c:713 dml32_CalculateSwathWidth() warn: inconsistent indenting.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amd/display: Clean up some inconsistent indenting
Jiapeng Chong [Tue, 26 Jul 2022 07:25:51 +0000 (15:25 +0800)]
drm/amd/display: Clean up some inconsistent indenting

No functional modification involved.

smatch warnings:

drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_rq_dlg_calc_32.c:51 dml32_rq_dlg_get_rq_reg() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_rq_dlg_calc_32.c:68 dml32_rq_dlg_get_rq_reg() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_rq_dlg_calc_32.c:220 dml32_rq_dlg_get_dlg_reg() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_rq_dlg_calc_32.c:224 dml32_rq_dlg_get_dlg_reg() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_rq_dlg_calc_32.c:235 dml32_rq_dlg_get_dlg_reg() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_rq_dlg_calc_32.c:240 dml32_rq_dlg_get_dlg_reg() warn: inconsistent indenting.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amd/display: Clean up some inconsistent indenting
Jiapeng Chong [Tue, 26 Jul 2022 07:25:50 +0000 (15:25 +0800)]
drm/amd/display: Clean up some inconsistent indenting

No functional modification involved.

smatch warning:

drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_hwseq.c:1728 dcn20_program_front_end_for_ctx() warn: inconsistent indenting.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amd/display: Clean up some inconsistent indenting
Jiapeng Chong [Tue, 26 Jul 2022 07:25:49 +0000 (15:25 +0800)]
drm/amd/display: Clean up some inconsistent indenting

No functional modification involved.

smatch warnings:

drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp_cm.c:450 dpp20_get_blndgam_current() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp_cm.c:543 dpp20_get_shaper_current() warn: inconsistent indenting.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amd/display: Clean up some inconsistent indenting
Jiapeng Chong [Tue, 26 Jul 2022 07:25:48 +0000 (15:25 +0800)]
drm/amd/display: Clean up some inconsistent indenting

No functional modification involved.

smatch warnings:

drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_mpc.c:305 mpc20_get_ogam_current() warn: inconsistent indenting.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amd/display: Clean up some inconsistent indenting
Jiapeng Chong [Tue, 26 Jul 2022 07:25:47 +0000 (15:25 +0800)]
drm/amd/display: Clean up some inconsistent indenting

No functional modification involved.

smatch warning:

drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dwb.c:104 dwb2_enable() warn: inconsistent indenting.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 months agodrm/amd/display: Clean up some inconsistent indenting
Jiapeng Chong [Tue, 26 Jul 2022 07:25:46 +0000 (15:25 +0800)]
drm/amd/display: Clean up some inconsistent indenting

No functional modification involved.

smatch warning:

drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_optc.c:186 optc3_set_dsc_config() warn: inconsistent indenting.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>