Dave Airlie
cbc2e82932
Merge tag 'drm-misc-next-2020-08-27' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
...
drm-misc-next for 5.10:
UAPI Changes:
Cross-subsystem Changes:
Core Changes:
- ttm: various cleanups and reworks of the API
Driver Changes:
- ast: various cleanups
- gma500: A few fixes, conversion to GPIOd API
- hisilicon: Change of maintainer, various reworks
- ingenic: Clock handling and formats support improvements
- mcde: improvements to the DSI support
- mgag200: Support G200 desktop cards
- mxsfb: Support the i.MX7 and i.MX8M and the alpha plane
- panfrost: support devfreq
- ps8640: Retrieve the EDID from eDP control, misc improvements
- tidss: Add a workaround for AM65xx YUV formats handling
- virtio: a few cleanups, support for virtio-gpu exported resources
- bridges: Support the chained bridges on more drivers,
new bridges: Toshiba TC358762, Toshiba TC358775, Lontium LT9611
- panels: Convert to dev_ based logging, read orientation from the DT,
various fixes, new panels: Mantix MLAF057WE51-X, Chefree CH101OLHLWH-002,
Powertip PH800480T013, KingDisplay KD116N21-30NV-A010
Signed-off-by: Dave Airlie <airlied@redhat.com >
From: Maxime Ripard <maxime@cerno.tech >
Link: https://patchwork.freedesktop.org/patch/msgid/20200827155517.do6emeacetpturli@gilmour.lan
2020-08-28 12:38:06 +10:00
Colin Ian King
cd6da0b113
drm/mgag200: fix spelling mistake "expeced" -> "expected"
...
There is a spelling mistake in a drm_warn message. Fix it.
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20200826084727.42703-1-colin.king@canonical.com
2020-08-27 11:17:52 +02:00
Enric Balletbo i Serra
94d4c13233
drm/bridge: ps8640: Print an error if VDO control fails
...
Print an error message inside ps8640_bridge_vdo_control() function when
it fails so we can simplify a bit the callers, they will only need to
check the error code.
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Reviewed-by: Bilal Wasim <bwasim.lkml@gmail.com >
Tested-by: Bilal Wasim <bwasim.lkml@gmail.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200826081526.674866-5-enric.balletbo@collabora.com
2020-08-26 19:13:37 +02:00
Enric Balletbo i Serra
812a65ba94
drm/bridge: ps8640: Return an error for incorrect attach flags
...
Bridge drivers that implement the new model only shall return an error
from their attach() handler when the DRM_BRIDGE_ATTACH_NO_CONNECTOR flag
is not set. So make sure we return an error because only the new
drm_bridge model is supported.
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Reviewed-by: Bilal Wasim <bwasim.lkml@gmail.com >
Tested-by: Bilal Wasim <bwasim.lkml@gmail.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200826081526.674866-4-enric.balletbo@collabora.com
2020-08-26 19:12:59 +02:00
Enric Balletbo i Serra
d82c12ab16
drm/bridge: ps8640: Get the EDID from eDP control
...
The PS8640 DSI-to-eDP bridge can retrieve the EDID, so implement the
.get_edid callback and set the flag to indicate the core to use it.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200826081526.674866-3-enric.balletbo@collabora.com
2020-08-26 19:12:20 +02:00
Enric Balletbo i Serra
c5589b3954
drm/bridge_connector: Set default status connected for eDP connectors
...
In an eDP application, HPD is not required and on most bridge chips
useless. If HPD is not used, we need to set initial status as connected,
otherwise the connector created by the drm_bridge_connector API remains
in an unknown state.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Reviewed-by: Bilal Wasim <bwasim.lkml@gmail.com >
Tested-by: Bilal Wasim <bwasim.lkml@gmail.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200826081526.674866-2-enric.balletbo@collabora.com
2020-08-26 19:11:41 +02:00
Tian Tao
389be50063
drm/hisilicon: Use drm_err instead of DRM_ERROR in hibmc_drm_drv
...
Use drm_err instead of DRM_ERROR in hibmc_drm_drv
Signed-off-by: Tian Tao <tiantao6@hisilicon.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/1597829014-39942-5-git-send-email-tiantao6@hisilicon.com
2020-08-25 20:49:06 -04:00
Tian Tao
e7187bab29
drm/hisilicon: Use drm_err instead of DRM_ERROR in hibmc_drm_de
...
Use drm_err instead of DRM_ERROR in hibmc_drm_de
Signed-off-by: Tian Tao <tiantao6@hisilicon.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/1597829014-39942-4-git-send-email-tiantao6@hisilicon.com
2020-08-25 20:48:33 -04:00
Tian Tao
ae34c15be6
drm/hisilicon: Use drm_err instead of DRM_ERROR in hibmc_drm_vdac
...
Use drm_err instead of DRM_ERROR in hibmc_drm_vdac
Signed-off-by: Tian Tao <tiantao6@hisilicon.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/1597829014-39942-3-git-send-email-tiantao6@hisilicon.com
2020-08-25 20:48:00 -04:00
Tian Tao
274d77648e
drm/hisilicon: Use drm_err instead of DRM_ERROR in hibmc_ttm
...
Use drm_err instead of DRM_ERROR in hibmc_ttm.
Signed-off-by: Tian Tao <tiantao6@hisilicon.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/1597829014-39942-2-git-send-email-tiantao6@hisilicon.com
2020-08-25 20:47:01 -04:00
Dave Airlie
ebb21aa188
drm/ttm: drop bus.size from bus placement.
...
This is always calculated the same, and only used in a couple of places.
Signed-off-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200811074658.58309-2-airlied@gmail.com
2020-08-24 17:06:08 +10:00
Dave Airlie
098754fe3c
drm/ttm: init mem->bus in common code.
...
The drivers all do the same thing here.
Reviewed-by: Christian König <christian.koenig@amd.com > for both.
Signed-off-by: Dave Airlie <airlied@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200811074658.58309-1-airlied@gmail.com
2020-08-24 17:00:48 +10:00
Nadezda Lutovinova
f688a345f0
drm/brige/megachips: Add checking if ge_b850v3_lvds_init() is working correctly
...
If ge_b850v3_lvds_init() does not allocate memory for ge_b850v3_lvds_ptr,
then a null pointer dereference is accessed.
The patch adds checking of the return value of ge_b850v3_lvds_init().
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Nadezda Lutovinova <lutovinova@ispras.ru >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200819143756.30626-1-lutovinova@ispras.ru
2020-08-23 17:08:51 +02:00
Vinay Simha BN
7f7fb53f62
drm/bridge/tc358775: Fix for PTR_ERR
...
passing zero to 'PTR_ERR'
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: Vinay Simha BN <simhavcs@gmail.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/1597557042-5154-1-git-send-email-simhavcs@gmail.com
2020-08-23 17:04:16 +02:00
Douglas Anderson
fc26a3758b
drm: panel: simple: Add KD116N21-30NV-A010
...
Values come from the vendor and have been tested on hardware.
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200821083454.2.Idf25356dff4b36c62704188c3e3d39a2010d6f6a@changeid
2020-08-21 19:14:28 +02:00
Tomi Valkeinen
8b87014f23
drm/tidss: implement WA for AM65xx erratum i2000
...
This patch implements WA for AM65xx erratum i2000, which causes YUV
formats to show wrong colors.
An earlier patch removed a partial WA:
a8d9d7da15 ("drm/tidss: remove AM65x PG1 YUV erratum code")
The patch explains the reasoning for removal. The change in plans has
been that it has become clear that there are and will be users for PG1
SoCs and as such it's good to implement the WA for PG1s.
This patch adds the WA back so that it is only used on SR1.0 (which is
the new name for PG1). The previous WA code didn't check the SoC
revision, which this patch does.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200812112625.59897-1-tomi.valkeinen@ti.com
Reviewed-by: Jyri Sarha <jsarha@ti.com >
2020-08-21 15:17:05 +03:00
Colin Ian King
227c6d109c
drm/omap: fix spelling mistake "propert" -> "property"
...
There is a spelling mistake in a pr_err message. Fix it.
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200805102015.14891-1-colin.king@canonical.com
2020-08-21 15:15:11 +03:00
Linus Walleij
35201cc1f8
drm: omapdrm: Delete surplus GPIO includes
...
The OMAP DRM driver includes <linux/gpio.h> into the two
hdmi4.c and hdmi5.c files but does not use any symbols from
these files. Drop the includes.
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Tony Lindgren <tony@atomide.com >
Cc: Jyri Sarha <jsarha@ti.com >
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200626220606.340937-1-linus.walleij@linaro.org
2020-08-21 15:15:08 +03:00
Dave Airlie
0790e63f58
Merge tag 'drm-intel-fixes-2020-08-20' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
...
drm/i915 fixes for v5.9-rc2:
- GVT fixes
- Fix device parameter usage for selftest mock i915 device
- Fix LPSP capability debugfs NULL dereference
- Fix buddy register pagemask table
- Fix intel_atomic_check() non-negative return value
- Fix selftests passing a random 0 into ilog2()
- Fix TGL power well enable/disable ordering
- Switch to PMU module refcounting
Signed-off-by: Dave Airlie <airlied@redhat.com >
From: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/87a6yp7jp3.fsf@intel.com
2020-08-21 11:03:52 +10:00
Dave Airlie
ba9086a6df
Merge tag 'amd-drm-fixes-5.9-2020-08-20' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
...
amd-drm-fixes-5.9-2020-08-20:
amdgpu:
- Fixes for Navy Flounder
- Misc display fixes
- RAS fix
amdkfd:
- SDMA fix for renoir
Signed-off-by: Dave Airlie <airlied@redhat.com >
From: Alex Deucher <alexdeucher@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200820041938.3928-1-alexander.deucher@amd.com
2020-08-21 10:17:52 +10:00
Paul Cercueil
d738005da9
drm/panel: novatek,nt39016: Remove 'dev' field in priv struct
...
There is already a 'struct device' pointer in the drm_panel structure,
that we can access easily from our priv structure, so there's no need
for a separate 'dev' field there.
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Paul Cercueil <paul@crapouillou.net >
Link: https://patchwork.freedesktop.org/patch/msgid/20200820121256.32037-3-paul@crapouillou.net
2020-08-20 18:34:42 +02:00
Paul Cercueil
2f4b769e4d
drm/panel: novatek,nt39016: Reorder calls in probe
...
The drm_panel_of_backlight() function must be called after
drm_panel_init(), according to the function's documentation; otherwise
the backlight won't be properly initialized.
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Paul Cercueil <paul@crapouillou.net >
Link: https://patchwork.freedesktop.org/patch/msgid/20200820121256.32037-2-paul@crapouillou.net
2020-08-20 18:34:28 +02:00
Christian König
0b06286579
drm/ttm: fix broken merge between drm-next and drm-misc-next
...
drm-next reverted the changes to ttm_tt_create() to do the
NULL check inside the function, but drm-misc-next adds new
users of this approach.
Re-apply the NULL check change inside the function to fix this.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Link: https://patchwork.freedesktop.org/patch/386628/
2020-08-20 14:03:10 +02:00
Jiansong Chen
da2446b66b
Revert "drm/amdgpu: disable gfxoff for navy_flounder"
...
This reverts commit 9c9b17a7d1 .
Newly released sdma fw (51.52) provides a fix for the issue.
Signed-off-by: Jiansong Chen <Jiansong.Chen@amd.com >
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-08-19 23:55:04 -04:00
Tom Rix
cdd296cdae
drm/gma500: fix error check
...
Reviewing this block of code in cdv_intel_dp_init()
ret = cdv_intel_dp_aux_native_read(gma_encoder, DP_DPCD_REV, ...
cdv_intel_edp_panel_vdd_off(gma_encoder);
if (ret == 0) {
/* if this fails, presume the device is a ghost */
DRM_INFO("failed to retrieve link info, disabling eDP\n");
drm_encoder_cleanup(encoder);
cdv_intel_dp_destroy(connector);
goto err_priv;
} else {
The (ret == 0) is not strict enough.
cdv_intel_dp_aux_native_read() returns > 0 on success
otherwise it is failure.
So change to <=
Fixes: d112a8163f ("gma500/cdv: Add eDP support")
Signed-off-by: Tom Rix <trix@redhat.com >
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200805205911.20927-1-trix@redhat.com
2020-08-19 15:49:10 +02:00
Linus Walleij
172c1e8572
drm: gma500: Convert to GPIO descriptors
...
Finalize he conversion of GMA500 to use only GPIO descriptors.
The GPIO look-up-table is associated with the device directly
in the GMA500 Medfield chip driver since no explicit platform
type device (such as in x86/platform/intel-mid) exists: the
GMA500 probes directly from the PCI device. Apparently GPIOs
128 and 34 are used on all of these so just go ahead and
register those for resetting the DSI pipes.
Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com >
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200703125901.513476-1-linus.walleij@linaro.org
2020-08-19 15:48:09 +02:00
Imre Deak
4a4064ad79
drm/i915/tgl: Make sure TC-cold is blocked before enabling TC AUX power wells
...
The dependency between power wells is determined by the ordering of the
power well list: when enabling the power wells for a domain, this
happens walking the power well list forward, while disabling them
happens in the reverse direction. Accordingly a power well on the list
must follow any other power well it depends on.
Since the TC AUX power wells depend on TC-cold being blocked, move the
TC-cold off power well before all AUX power wells.
Fixes: 3c02934b24 ("drm/i915/tc/tgl: Implement TC cold sequences")
Cc: José Roberto de Souza <jose.souza@intel.com >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Reviewed-by: José Roberto de Souza <jose.souza@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200720232952.16228-1-imre.deak@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
(cherry picked from commit b302a2e688 )
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2020-08-19 15:23:43 +03:00
George Spelvin
c43a87f537
drm/i915/selftests: Avoid passing a random 0 into ilog2
...
igt_mm_config() calls ilog2() on the (pseudo)random 21-bit number
s>>12. Once in 2 million seeds, this is zero and ilog2 summons
the nasal demons.
There was an attempt to handle this case with a max(), but that's
too late; ms could already be something bizarre.
Given that the low 12 bits of s and ms are always zero, it's a lot
simpler just to divide them by 4096, then everything fits into 32
bits, and we can easily generate a random number 1 <= s <= 0x1fffff.
Fixes: 14d1b9a624 ("drm/i915: buddy allocator")
Signed-off-by: George Spelvin <lkml@sdf.org >
Cc: Matthew Auld <matthew.auld@intel.com >
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Cc: intel-gfx@lists.freedesktop.org
Reviewed-by: Matthew Auld <matthew.auld@intel.com >
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: https://patchwork.freedesktop.org/patch/msgid/20200325192429.GA8865@SDF.ORG
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
(cherry picked from commit 21118e8e56 )
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2020-08-19 15:23:36 +03:00
Tianjia Zhang
c67f0c2831
drm/i915: Fix wrong return value in intel_atomic_check()
...
In the case of calling check_digital_port_conflicts() failed, a
negative error code -EINVAL should be returned.
Fixes: bf5da83e4b ("drm/i915: Move check_digital_port_conflicts() earier")
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com >
Reviewed-by: José Roberto de Souza <jose.souza@intel.com >
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200802111535.5200-1-tianjia.zhang@linux.alibaba.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
(cherry picked from commit 66b51b801d )
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2020-08-19 15:23:27 +03:00
Matt Roper
5fd73c5370
drm/i915: Update bw_buddy pagemask table
...
A recent bspec update removed the LPDDR4 single channel entry from the
buddy register table, but added a new four-channel entry.
Workaround 1409767108 hasn't been updated with any guidance for four
channel configurations, so we leave that alternate table unchanged for
now.
Bspec 49218
Fixes: 3fa01d642f ("drm/i915/tgl: Program BW_BUDDY registers during display init")
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200612204734.3674650-1-matthew.d.roper@intel.com
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
(cherry picked from commit ecb40d0826 )
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2020-08-19 15:23:20 +03:00
Chris Wilson
b7c6646117
drm/i915/display: Check for an LPSP encoder before dereferencing
...
Avoid a GPF at
<1>[ 20.177320] BUG: kernel NULL pointer dereference, address: 000000000000007c
<1>[ 20.177322] #PF: supervisor read access in kernel mode
<1>[ 20.177323] #PF: error_code(0x0000) - not-present page
<6>[ 20.177324] PGD 0 P4D 0
<4>[ 20.177327] Oops: 0000 [#1 ] PREEMPT SMP PTI
<4>[ 20.177328] CPU: 1 PID: 944 Comm: debugfs_test Not tainted 5.8.0-rc7-CI-CI_DRM_8814+ #1
<4>[ 20.177330] Hardware name: Dell Inc. XPS 13 9360/0823VW, BIOS 2.9.0 07/09/2018
<4>[ 20.177372] RIP: 0010:i915_lpsp_capability_show+0x44/0xc0 [i915]
<4>[ 20.177374] Code: 0f b6 81 ca 0d 00 00 3c 0b 74 77 76 19 3c 0c 75 44 83 7e 7c 01 7e 2f 48 c7 c6 d7 b9 47 a0 e8 43 df 06 e1 31 c0 c3 3c 09 72 2b <8b> 46 7c 85 c0 75 e6 8b 82 e4 00 00 00 89 c2 83 e2 fb 83 fa 0a 74
<4>[ 20.177376] RSP: 0018:ffffc90000cebe38 EFLAGS: 00010246
<4>[ 20.177377] RAX: 0000000000000009 RBX: ffff888267fe6a58 RCX: ffff888252d10000
<4>[ 20.177378] RDX: ffff88824a9a4000 RSI: 0000000000000000 RDI: ffff888267fe6a30
<4>[ 20.177379] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001
<4>[ 20.177380] R10: 0000000000000001 R11: 0000000000000000 R12: ffffc90000cebf08
<4>[ 20.177381] R13: 00000000ffffffff R14: 0000000000000001 R15: ffff888267fe6a30
<4>[ 20.177383] FS: 00007f6f9c6b5e40(0000) GS:ffff888276480000(0000) knlGS:0000000000000000
<4>[ 20.177384] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
<4>[ 20.177385] CR2: 000000000000007c CR3: 0000000255f04006 CR4: 00000000003606e0
<4>[ 20.177386] Call Trace:
<4>[ 20.177390] seq_read+0xcb/0x420
which is presumably from having no encoder attached at that time.
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2175
Fixes: 8806211fe7 ("drm/i915: Add i915_lpsp_capability debugfs")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Animesh Manna <animesh.manna@intel.com >
Cc: Anshuman Gupta <anshuman.gupta@intel.com >
Cc: Uma Shankar <uma.shankar@intel.com >
Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com >
Reviewed-by: Anshuman Gupta <anshuman.gupta@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200729130912.30093-1-chris@chris-wilson.co.uk
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
(cherry picked from commit a22b1a9bb0 )
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2020-08-19 15:23:13 +03:00
Chris Wilson
c499f6cb5e
drm/i915: Copy default modparams to mock i915_device
...
Since we use the module parameters stored inside the drm_i915_device
itself, we need to ensure the mock i915_device also sets up the right
defaults.
Fixes: 8a25c4be58 ("drm/i915/params: switch to device specific parameters")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200728150600.4509-1-chris@chris-wilson.co.uk
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
(cherry picked from commit 98ef067453 )
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2020-08-19 15:23:07 +03:00
Chris Wilson
df3ab3cb7e
drm/i915: Provide the perf pmu.module
...
Rather than manually implement our own module reference counting for perf
pmu events, finally realise that there is a module parameter to struct
pmu for this very purpose.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Cc: stable@vger.kernel.org
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200716094643.31410-1-chris@chris-wilson.co.uk
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
(cherry picked from commit 27e897beec )
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2020-08-19 15:23:00 +03:00
Jani Nikula
e9e3086b3d
Merge tag 'gvt-next-fixes-2020-08-05' of https://github.com/intel/gvt-linux into drm-intel-fixes
...
gvt-next-fixes-2020-08-05
- Fix guest suspend/resume low performance handling of shadow ppgtt (Colin)
- Fix PV notifier handling for guest suspend/resume (Colin)
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
From: Zhenyu Wang <zhenyuw@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200805080207.GY27035@zhen-hp.sh.intel.com
2020-08-19 13:03:54 +03:00
Randy Dunlap
9c6b876c91
drm: ast: fix double __iomem sparse warning
...
sparse complains about having 2 "__iomem" attributes on the same line
where only one is needed since the first one applies to everything
up to the ending ';'.
However, to make it clear(er) that both of these pointers are
"__iomem", use separate lines for them.
../drivers/gpu/drm/ast/ast_cursor.c:256:26: CK: warning: duplicate [noderef]
../drivers/gpu/drm/ast/ast_cursor.c:256:26: CK: error: multiple address space given: __iomem & __iomem
Signed-off-by: Randy Dunlap <rdunlap@infradead.org >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Dave Airlie <airlied@redhat.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/a8185578-a69a-16b0-6fdf-f4e46bc4f61f@infradead.org
2020-08-19 09:14:40 +02:00
David Stevens
9fe2f89749
virtio: fix build for configs without dma-bufs
...
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: David Stevens <stevensd@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20200819031011.310180-1-stevensd@chromium.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
2020-08-19 06:43:28 +02:00
Dave Airlie
485d41b092
Merge tag 'amd-drm-fixes-5.9-2020-08-12' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
...
amd-drm-fixes-5.9-2020-08-12:
amdgpu:
- Fix allocation size
- SR-IOV fixes
- Vega20 SMU feature state caching fix
- Fix custom pptable handling
- Arcturus golden settings update
- Several display fixes
Signed-off-by: Dave Airlie <airlied@redhat.com >
From: Alex Deucher <alexdeucher@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200813033610.4008-1-alexander.deucher@amd.com
2020-08-19 13:56:28 +10:00
Dave Airlie
f2ea2578df
Merge tag 'drm-misc-fixes-2020-08-12' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes
...
drm-misc-fixes for v5.9-rc1:
- Add missing dma_fence_put() in virtio_gpu_execbuffer_ioctl().
- Fix memory leak in virtio_gpu_cleanup_object().
Signed-off-by: Dave Airlie <airlied@redhat.com >
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/d50eb2e0-75c8-b724-006f-5e7b391961ff@linux.intel.com
2020-08-19 13:54:42 +10:00
Krunoslav Kovac
d2e59d0ff4
drm/amd/display: fix pow() crashing when given base 0
...
[Why&How]
pow(a,x) is implemented as exp(x*log(a)). log(0) will crash.
So return 0^x = 0, unless x=0, convention seems to be 0^0 = 1.
Cc: stable@vger.kernel.org
Signed-off-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com >
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com >
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-08-18 18:01:21 -04:00
Chris Park
db0473f624
drm/amd/display: Reset scrambling on Test Pattern
...
[Why]
Programming is missing the sequence where for eDP the scrambling is
reset when testing for eye diagram test pattern.
[How]
Include the required register in the definition
Signed-off-by: Chris Park <Chris.Park@amd.com >
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com >
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-08-18 18:00:51 -04:00
Dmytro Laktyushkin
5ec37c089e
drm/amd/display: fix dcn3 wide timing dsc validation
...
Wide timing DSC requires odm. Since spreadsheet is missing this dsc
validation we have to modify DML vba code ourselves.
Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com >
Reviewed-by: Wesley Chalmers <Wesley.Chalmers@amd.com >
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-08-18 17:58:19 -04:00
Paul Hsieh
8e80d48260
drm/amd/display: Fix DFPstate hang due to view port changed
...
[Why]
Place the cursor in the center of screen between two pipes then
adjusting the viewport but cursour doesn't update cause DFPstate hang.
[How]
If viewport changed, update cursor as well.
Cc: stable@vger.kernel.org
Signed-off-by: Paul Hsieh <paul.hsieh@amd.com >
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com >
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-08-18 17:57:06 -04:00
Chris Park
42f8c41652
drm/amd/display: Assign correct left shift
...
[Why]
Reading for DP alt registers return incorrect values due to LE_SF
definition missing.
[How]
Define correct LE_SF or DP alt registers.
Signed-off-by: Chris Park <Chris.Park@amd.com >
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com >
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-08-18 17:56:36 -04:00
Chris Park
5dea2142a8
drm/amd/display: Call DMUB for eDP power control
...
[Why]
If DMUB is used, LVTMA VBIOS call can be used to control eDP instead of
tranditional transmitter control. Interface is agreed with VBIOS for
eDP to use this new path to program LVTMA registers.
[How]
Create DAL interface to send DMUB command for LVTMA as currently
implemented in VBIOS.
Signed-off-by: Chris Park <Chris.Park@amd.com >
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com >
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-08-18 17:55:36 -04:00
Huang Rui
34174b89bf
drm/amdkfd: fix the wrong sdma instance query for renoir
...
Renoir only has one sdma instance, it will get failed once query the
sdma1 registers. So use switch-case instead of static register array.
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-08-18 17:54:12 -04:00
Bhawanpreet Lakha
0a668aee0a
drm/amdgpu: parse ta firmware for navy_flounder
...
Use the same case as sienna_cichlid
Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-08-18 17:53:50 -04:00
Guchun Chen
1a68d96f81
drm/amdgpu: fix NULL pointer access issue when unloading driver
...
When unloading driver by "modprobe -r amdgpu", one NULL pointer
dereference bug occurs in ras debugfs releasing. The cause is the
duplicated debugfs_remove, as drm debugfs_root dir has been cleaned
up already by drm_minor_unregister.
BUG: kernel NULL pointer dereference, address: 00000000000000a0
PGD 0 P4D 0
Oops: 0002 [#1 ] SMP PTI
CPU: 11 PID: 1526 Comm: modprobe Tainted: G OE 5.6.0-guchchen #1
Hardware name: System manufacturer System Product Name/TUF Z370-PLUS GAMING II, BIOS 0411 09/21/2018
RIP: 0010:down_write+0x15/0x40
Code: eb de e8 7e 17 72 ff cc cc cc cc cc cc cc cc cc cc cc cc cc cc 0f 1f 44 00 00 53 48 89 fb e8 92
d8 ff ff 31 c0 ba 01 00 00 00 <f0> 48 0f b1 13 75 0f 65 48 8b 04 25 c0 8b 01 00 48 89 43 08 5b c3
RSP: 0018:ffffb1590386fcd0 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 00000000000000a0 RCX: 0000000000000000
RDX: 0000000000000001 RSI: ffffffff85b2fcc2 RDI: 00000000000000a0
RBP: ffffb1590386fd30 R08: ffffffff85b2fcc2 R09: 000000000002b3c0
R10: ffff97a330618c40 R11: 00000000000005f6 R12: ffff97a3481beb40
R13: 00000000000000a0 R14: ffff97a3481beb40 R15: 0000000000000000
FS: 00007fb11a717540(0000) GS:ffff97a376cc0000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000000000a0 CR3: 00000004066d6006 CR4: 00000000003606e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
simple_recursive_removal+0x63/0x370
? debugfs_remove+0x60/0x60
debugfs_remove+0x40/0x60
amdgpu_ras_fini+0x82/0x230 [amdgpu]
? __kernfs_remove.part.17+0x101/0x1f0
? kernfs_name_hash+0x12/0x80
amdgpu_device_fini+0x1c0/0x580 [amdgpu]
amdgpu_driver_unload_kms+0x3e/0x70 [amdgpu]
amdgpu_pci_remove+0x36/0x60 [amdgpu]
pci_device_remove+0x3b/0xb0
device_release_driver_internal+0xe5/0x1c0
driver_detach+0x46/0x90
bus_remove_driver+0x58/0xd0
pci_unregister_driver+0x29/0x90
amdgpu_exit+0x11/0x25 [amdgpu]
__x64_sys_delete_module+0x13d/0x210
do_syscall_64+0x5f/0x250
entry_SYSCALL_64_after_hwframe+0x44/0xa9
Signed-off-by: Guchun Chen <guchun.chen@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-08-18 17:00:46 -04:00
Kevin Wang
f5261bec20
drm/amdgpu: fix uninit-value in arcturus_log_thermal_throttling_event()
...
when function arcturus_get_smu_metrics_data() call failed,
it will cause the variable "throttler_status" isn't initialized before use.
warning:
powerplay/arcturus_ppt.c:2268:24: warning: ‘throttler_status’ may be used uninitialized in this function [-Wmaybe-uninitialized]
2268 | if (throttler_status & logging_label[throttler_idx].feature_mask) {
Signed-off-by: Kevin Wang <kevin1.wang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-08-18 16:59:26 -04:00
Jiansong Chen
9c9b17a7d1
drm/amdgpu: disable gfxoff for navy_flounder
...
gfxoff is temporarily disabled for navy_flounder,
since at present the feature has broken some basic
amdgpu test.
Signed-off-by: Jiansong Chen <Jiansong.Chen@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-08-18 16:58:59 -04:00
Sam Ravnborg
a25b6b273f
drm/panel: Use dev_ based logging
...
Standardize on the dev_ based logging and drop the include of drm_print.h.
Fix a few cases where "x@" was used when printing the mode.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Reviewed-by: Guido Günther <agx@sigxcpu.org >
Cc: Jerry Han <hanxu5@huaqin.corp-partner.google.com >
Cc: Thierry Reding <thierry.reding@gmail.com >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: Icenowy Zheng <icenowy@aosc.io >
Cc: Jagan Teki <jagan@amarulasolutions.com >
Cc: Linus Walleij <linus.walleij@linaro.org >
Cc: Guido Günther <agx@sigxcpu.org >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200815125406.1153224-6-sam@ravnborg.org
2020-08-18 22:32:37 +02:00