Ville Syrjälä
267ea759b2
drm: Constify topology id
...
Make the topology id const since we don't want to change it.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200313162054.16009-2-ville.syrjala@linux.intel.com
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2020-03-18 17:52:36 +02:00
Wambui Karuga
e196e140f9
drm: make various debugfs_init() functions return 0
...
Since commit 987d65d013 (drm: debugfs: make
drm_debugfs_create_files() never fail), drm_debugfs_create_files() never
fails and should return void. Therefore, remove its use as the
return value of various debugfs_init() functions in drm, and have these
functions return 0 directly.
v2: convert debugfs_init() functions to return 0 instead of void to
avoid build breakage.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com >
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20200310133121.27913-16-wambui.karugax@gmail.com
2020-03-18 16:45:22 +01:00
Wambui Karuga
f06b2052f7
drm/i915: have *_debugfs_init() functions return void.
...
Since commit 987d65d013 (drm: debugfs: make
drm_debugfs_create_files() never fail), drm_debugfs_create_files() never
fails and should return void. Therefore, remove its use as the
return value of debugfs_init() functions and have the functions return
void.
v2: convert intel_display_debugfs_register() stub to return void too.
Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com >
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20200310133121.27913-15-wambui.karugax@gmail.com
2020-03-18 16:27:22 +01:00
Wambui Karuga
68f73a1bef
drm/omap: remove checks for return value of drm_debugfs functions
...
Since 987d65d013 (drm: debugfs: make
drm_debugfs_create_files() never fail), there is no need to ever check
the return value for drm_debugfs_create_files(). Therefore remove the
checks for the return value and subsequent error handling in
omap_debugfs_init().
These changes also enables the changing of omap_debugfs_init() to return
0 directly.
v2: convert omap_debugfs_init() to return 0 instead of void to avoid
introduction of build issues and enable individual driver compilation.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com >
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20200310133121.27913-14-wambui.karugax@gmail.com
2020-03-18 16:27:14 +01:00
Wambui Karuga
b4441251e5
drm/pl111: make pl111_debugfs_init return 0
...
Since 987d65d013 (drm: debugfs: make
drm_debugfs_create_files() never fail) drm_debugfs_create_files()
should return void. Therefore, remove its use as the return value in
pl111_debugfs_init(), and have the function return 0 directly.
v2: have pl111_debugfs_init() return 0 instead of void to avoid build
breakage for individual compilation.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com >
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20200310133121.27913-13-wambui.karugax@gmail.com
2020-03-18 16:27:06 +01:00
Wambui Karuga
0567776b69
drm/nouveau: make nouveau_drm_debugfs_init() return 0
...
Since 987d65d013 (drm: debugfs: make
drm_debugfs_create_files() never fail), there is no need to ever check
for the the return value of debugfs_create_file() and
drm_debugfs_create_files(). Therefore, remove unnecessary checks and
error handling in nouveau_drm_debugfs_init() and have the function
return 0 directly.
v2: have nouveau_drm_debugfs_init() return 0 instead of void so as not
to introduce any build warnings to enable individual patch compilation.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com >
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20200310133121.27913-12-wambui.karugax@gmail.com
2020-03-18 16:26:58 +01:00
Wambui Karuga
3a748157f2
drm/vram-helper: make drm_vram_mm_debugfs_init() return 0
...
Since 987d65d013 (drm: debugfs: make
drm_debugfs_create_files() never fail), drm_debugfs_create_files() never
fails and should return void. Therefore, remove its use as the
return value of drm_vram_mm_debugfs_init(), and have the function
return 0 directly.
v2: have drm_vram_mm_debugfs_init() return 0 instead of void to avoid
introducing build issues and build breakage.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20200310133121.27913-11-wambui.karugax@gmail.com
2020-03-18 16:24:48 +01:00
Wambui Karuga
54ac836b16
drm/sti: remove use of drm_debugfs functions as return values
...
Since commit 987d65d013 (drm: debugfs: make
drm_debugfs_create_files() never fail), drm_debugfs_create_files() never
fails, and should return void. This change therefore removes it uses as
a return value in various functions across drm/sti.
With these changes, the affected functions have been changed to use a void
return value.
v2: convert sti_mixer_debugfs_init() and sti_compositor_debugfs_init()
to return void too. Also have sti_drm_dbg_init() to return 0 to avoid
build issues.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com >
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20200310133121.27913-10-wambui.karugax@gmail.com
2020-03-18 16:24:08 +01:00
Wambui Karuga
9e2fd463ec
drm/msm: remove checks for return value of drm_debugfs_create_files()
...
Since commit 987d65d013 (drm: debugfs: make
drm_debugfs_create_files() never fail), drm_debugfs_create_files never
fails and only returns 0. Therefore, the unnecessary checks for its
return value and error handling in various debugfs_init() functions in
drm/msm and have the functions return 0 directly.
v2: have debug functions return 0 instead of void to avoid build
breakage and ensure standalone compilation.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com >
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20200310133121.27913-9-wambui.karugax@gmail.com
2020-03-18 16:23:57 +01:00
Wambui Karuga
14b461950c
drm/etnaviv: remove check for return value of drm_debugfs_create_files()
...
Since commit 987d65d013 (drm: debugfs: make
drm_debugfs_create_files() never fail), drm_debugfs_create_files() never
fails and only returns 0. Therefore, remove the unnecessary check of its
return value and error handling in etnaviv_debugfs_init() and have the
function return 0 directly.
v2: have etnaviv_debugfs_init() return 0 instead of void to ensure
individual compilation and avoid build breakage.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com >
Acked-by: Lucas Stach <l.stach@pengutronix.de >
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20200310133121.27913-8-wambui.karugax@gmail.com
2020-03-18 16:23:37 +01:00
Wambui Karuga
0bc40e1860
drm/arm: make hdlcd_debugfs_init() return 0
...
Since commit 987d65d013 (drm: debugfs: make
drm_debugfs_create_files() never fail), drm_debugfs_create_files() never
fails and should return void. Therefore, remove its use as the
return value of hdlcd_debugfs_init() and have the latter function return
0 directly.
v2: make hdlcd_debugfs_init() return 0 instead of void to ensure that
each patch compiles individually.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com >
Acked-by: Liviu Dudau <liviu.dudau@arm.com >
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20200310133121.27913-7-wambui.karugax@gmail.com
2020-03-18 16:23:20 +01:00
Wambui Karuga
2fb9c8a02f
drm/arc: make arcgpu_debugfs_init() return 0.
...
Since commit 987d65d013 (drm: debugfs: make
drm_debugfs_create_files() never fail), drm_debugfs_create_files() never
fails and should return void. Therefore, remove its use as the
return value of arcpgu_debugfs_init() and have the latter function return
0 directly.
v2: convert the function to return 0 instead of void to avoid breaking
the build and ensure that this individual patch compiles properly.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com >
Acked-by: Alexey Brodkin <abrodkin@synopsys.com >
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20200310133121.27913-6-wambui.karugax@gmail.com
2020-03-18 16:22:47 +01:00
Wambui Karuga
b9c82f593f
drm/vc4: remove check of return value of drm_debugfs functions
...
Since 987d65d013 (drm: debugfs: make
drm_debugfs_create_files() never fail), drm_debugfs_create_files() never
fails and should return void. Therefore, remove unnecessary check and
error handling for the return value of drm_debugfs_create_files()
in vc4_debugfs_init().
v2: remove conversion of vc4_debugfs_init() to void to enable individual
compilation and avoid build issues and breakage.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com >
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20200310133121.27913-5-wambui.karugax@gmail.com
2020-03-18 16:22:20 +01:00
Wambui Karuga
19660e8903
drm/v3d: make v3d_debugfs_init() return 0
...
Since commit 987d65d013 (drm: debugfs: make
drm_debugfs_create_files() never fail), drm_debugfs_create_files() never
fails and should return void. Therefore, remove its use as the
return value of v3d_debugfs_init() and have the function return 0
directly instead.
v2: remove conversion of v3d_debugfs_init() to void to avoid build
breakage and enable individual compilation.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com >
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20200310133121.27913-4-wambui.karugax@gmail.com
2020-03-18 16:22:12 +01:00
Wambui Karuga
f1c1a1f38d
drm/tilcdc: remove check for return value of debugfs functions.
...
Since 987d65d013 (drm: debugfs: make
drm_debugfs_create_files() never fail), drm_debugfs_create_files() never
fails. Therefore, remove the check and error handling of the return
value of drm_debugfs_create_files() as it is not needed in
tilcdc_debugfs_init().
Also remove local variables that are not used after the changes.
v2: remove conversion of tilcdc_debugfs_init() to void to avoid build
breakage and enable individual compilation.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com >
Acked-by: Jyri Sarha <jsarha@ti.com >
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20200310133121.27913-3-wambui.karugax@gmail.com
2020-03-18 16:21:41 +01:00
Wambui Karuga
ad6d94f24f
drm/tegra: remove checks for debugfs functions return value
...
Since 987d65d013 (drm: debugfs: make
drm_debugfs_create_files() never fail) there is no need to check the
return value of drm_debugfs_create_files(). Therefore, remove the
return checks and error handling of the drm_debugfs_create_files()
function from various debugfs init functions in drm/tegra and have
them return 0 directly.
v2: remove conversion of tegra_debugfs_init() to void to avoid build
breakage.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com >
Acked-by: Thierry Reding <treding@nvidia.com >
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20200310133121.27913-2-wambui.karugax@gmail.com
2020-03-18 16:20:28 +01:00
Igor Matheus Andrade Torrente
82c0ef94b9
drm: Correct a typo in a function comment
...
Replace "pionter" with "pointer" in the drm_gem_handle_create description.
Changes in v2:
- Change subject text
Signed-off-by: Igor Matheus Andrade Torrente <igormtorrente@gmail.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20200317210339.2669-1-igormtorrente@gmail.com
2020-03-18 14:50:08 +01:00
Joe Perches
84551afa31
drm: drm_vm: Use fallthrough;
...
Convert /* fallthrough */ style comments to fallthrough;
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe@perches.com/
And by hand:
This file has a fallthrough comment outside of an #ifdef block
that causes gcc to emit a warning if converted in-place.
So move the new fallthrough; inside the containing #ifdef/#endif too.
Signed-off-by: Joe Perches <joe@perches.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/398db73cdc8a584fd7f34f5013c04df13ba90f64.1584040050.git.joe@perches.com
2020-03-18 14:48:34 +01:00
Daniel Vetter
6e66dbfaaf
drm/hisilicon: Drop unused #include
...
drm_encoder_slave is really not something anyone should be using,
the last real user is only nouveau.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Boris Brezillon <boris.brezillon@collabora.com >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: Allison Randal <allison@lohutok.net >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200318073122.1032945-1-daniel.vetter@ffwll.ch
2020-03-18 14:28:11 +01:00
Andrzej Pietrasiewicz
55f7f72753
drm/core: Add drm_afbc_framebuffer and a corresponding helper
...
The new struct contains afbc-specific data.
The new function can be used by drivers which support afbc to complete
the preparation of struct drm_afbc_framebuffer. It must be called after
allocating the said struct and calling drm_gem_fb_init_with_funcs().
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Reviewed-by: James Qian Wang <james.qian.wang@arm.com >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20200311145541.29186-3-andrzej.p@collabora.com
2020-03-18 11:22:05 +01:00
Andrzej Pietrasiewicz
f2b816d78a
drm/core: Allow drivers allocate a subclass of struct drm_framebuffer
...
Allow allocating a specialized version of struct drm_framebuffer
by moving the actual fb allocation out of drm_gem_fb_create_with_funcs();
the respective functions names are adjusted to reflect that fact.
Please note, though, that standard size checks are performed on buffers,
so the drm_gem_fb_init_with_funcs() is useful for cases where those
standard size checks are appropriate or at least don't conflict the
checks to be performed in the specialized case.
Thanks to this change the drivers can call drm_gem_fb_init_with_funcs()
having allocated their special version of struct drm_framebuffer, exactly
the way the new version of drm_gem_fb_create_with_funcs() does.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Reviewed-by: James Qian Wang <james.qian.wang@arm.com >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20200311145541.29186-2-andrzej.p@collabora.com
2020-03-18 11:21:32 +01:00
Ville Syrjälä
e2ed135564
drm/exynos: Use mode->clock instead of reverse calculating it from the vrefresh
...
htotal*vtotal*vrefresh ~= clock. So just use say "clock" when we mean it.
Cc: Inki Dae <inki.dae@samsung.com >
Cc: Joonyoung Shim <jy0922.shim@samsung.com >
Cc: Seung-Woo Kim <sw0312.kim@samsung.com >
Cc: Kyungmin Park <kyungmin.park@samsung.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Signed-off-by: Inki Dae <inki.dae@samsung.com >
2020-03-18 12:11:44 +09:00
Ville Syrjälä
2d6bf60d14
drm/exynos: Use drm_encoder_mask()
...
Replace the hand rolled encoder bitmask thing with drm_encoder_mask()
Cc: Inki Dae <inki.dae@samsung.com >
Cc: Joonyoung Shim <jy0922.shim@samsung.com >
Cc: Seung-Woo Kim <sw0312.kim@samsung.com >
Cc: Kyungmin Park <kyungmin.park@samsung.com >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Inki Dae <inki.dae@samsung.com >
2020-03-18 12:11:41 +09:00
Maxime Ripard
51b8479ab2
Merge drm/drm-next into drm-misc-next
...
Jernej needs some patches that got merged in -rc5.
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
2020-03-17 09:29:11 +01:00
Nirmoy Das
4ff7d8ba4c
drm/amdgpu: disable gpu_sched load balancer for vcn jobs
...
VCN HW doesn't support dynamic load balance on multiple instances
for a context. This patch initializes VNC entities with only one
drm_gpu_scheduler picked by drm_sched_pick_best(). Picking a
drm_gpu_scheduler using drm_sched_pick_best() ensures that we
do load balance among multiple contexts but not among multiple
jobs in a context.
Signed-off-by: Nirmoy Das <nirmoy.das@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-03-16 16:21:32 -04:00
Nirmoy Das
ec2edcc279
drm/sched: implement and export drm_sched_pick_best
...
Remove drm_sched_entity_get_free_sched() and use the logic of picking
the least loaded drm scheduler from a drm scheduler list to implement
drm_sched_pick_best(). This patch also exports drm_sched_pick_best() so
that it can be utilized by other drm drivers.
Signed-off-by: Nirmoy Das <nirmoy.das@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-03-16 16:21:32 -04:00
changzhu
d164bebb95
Revert "drm/scheduler: improve job distribution with multiple queues"
...
It needs to revert this patch to avoid amdgpu_test compute hang problem
on picasso.
This reverts commit 56822db194 .
Signed-off-by: changzhu <Changfeng.Zhu@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-03-16 16:21:32 -04:00
Andrey Grodzovsky
9015d60c9e
drm/amdgpu: Move EEPROM I2C adapter to amdgpu_device
...
Puts the i2c adapter in common place for sharing by RAS
and upcoming data read from FRU EEPROM feature.
v2:
Move i2c adapter to amdgpu_pm and rename it.
v3: Move i2c adapter init to ASIC specific code and get rid
of the switch case in amdgpu_device
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-03-16 16:21:32 -04:00
xinhui pan
57210c19e4
drm_amdgpu: Add job fence to resv conditionally
...
Job fence on page table should be a shared one, so add it to the root
page talbe bo resv.
last_delayed field is not needed anymore. so remove it.
Cc: Christian König <christian.koenig@amd.com >
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: Felix Kuehling <Felix.Kuehling@amd.com >
Suggested-by: Christian König <christian.koenig@amd.com >
Signed-off-by: xinhui pan <xinhui.pan@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-03-16 16:21:32 -04:00
Nirmoy Das
79cb2719be
drm/amdgpu: fix switch-case indentation
...
Fix switch-case indentation in amdgpu_ctx_init_entity()
Signed-off-by: Nirmoy Das <nirmoy.das@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-03-16 16:18:14 -04:00
Monk Liu
2e0cc4d48b
drm/amdgpu: revise RLCG access path
...
what changed:
1)provide new implementation interface for the rlcg access path
2)put SQ_CMD/SQ_IND_INDEX to GFX9 RLCG path to let debugfs's reg_op
function can access reg that need RLCG path help
now even debugfs's reg_op can used to dump wave.
tested-by: Monk Liu <monk.liu@amd.com >
tested-by: Zhou pengju <pengju.zhou@amd.com >
Signed-off-by: Zhou pengju <pengju.zhou@amd.com >
Signed-off-by: Monk Liu <Monk.Liu@amd.com >
Reviewed-by: Emily Deng <Emily.Deng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-03-16 16:17:55 -04:00
Chris Wilson
6afe692996
drm: Mark up racy check of drm_gem_object.handle_count
...
[ 1715.899800] BUG: KCSAN: data-race in drm_gem_handle_create_tail / drm_gem_object_handle_put_unlocked
[ 1715.899838]
[ 1715.899861] write to 0xffff8881830f3604 of 4 bytes by task 7834 on cpu 1:
[ 1715.899896] drm_gem_handle_create_tail+0x62/0x250
[ 1715.899927] drm_gem_open_ioctl+0xc1/0x160
[ 1715.899956] drm_ioctl_kernel+0xe4/0x120
[ 1715.899981] drm_ioctl+0x297/0x4c7
[ 1715.900003] ksys_ioctl+0x89/0xb0
[ 1715.900027] __x64_sys_ioctl+0x42/0x60
[ 1715.900052] do_syscall_64+0x6e/0x2c0
[ 1715.900079] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1715.900100]
[ 1715.900119] read to 0xffff8881830f3604 of 4 bytes by task 8137 on cpu 0:
[ 1715.900149] drm_gem_object_handle_put_unlocked+0x31/0x130
[ 1715.900180] drm_gem_object_release_handle+0x93/0xe0
[ 1715.900208] drm_gem_handle_delete+0x7b/0xe0
[ 1715.900235] drm_gem_close_ioctl+0x61/0x80
[ 1715.900264] drm_ioctl_kernel+0xe4/0x120
[ 1715.900291] drm_ioctl+0x297/0x4c7
[ 1715.900316] ksys_ioctl+0x89/0xb0
[ 1715.900340] __x64_sys_ioctl+0x42/0x60
[ 1715.900363] do_syscall_64+0x6e/0x2c0
[ 1715.900388] entry_SYSCALL_64_after_hwframe+0x44/0xa9
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20200309120151.7675-1-chris@chris-wilson.co.uk
2020-03-16 10:31:35 +00:00
Kees Cook
deec222e09
drm/edid: Distribute switch variables for initialization
...
Variables declared in a switch statement before any case statements
cannot be automatically initialized with compiler instrumentation (as
they are not part of any execution flow). With GCC's proposed automatic
stack variable initialization feature, this triggers a warning (and they
don't get initialized). Clang's automatic stack variable initialization
(via CONFIG_INIT_STACK_ALL=y) doesn't throw a warning, but it also
doesn't initialize such variables[1]. Note that these warnings (or silent
skipping) happen before the dead-store elimination optimization phase,
so even when the automatic initializations are later elided in favor of
direct initializations, the warnings remain.
To avoid these problems, lift such variables up into the next code
block.
drivers/gpu/drm/drm_edid.c: In function ‘drm_edid_to_eld’:
drivers/gpu/drm/drm_edid.c:4395:9: warning: statement will never be
executed [-Wswitch-unreachable]
4395 | int sad_count;
| ^~~~~~~~~
[1] https://bugs.llvm.org/show_bug.cgi?id=44916
v2: move into function block instead being switch-local (Ville Syrjälä)
Signed-off-by: Kees Cook <keescook@chromium.org >
[danvet: keep the changelog]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/202003060930.DDCCB6659@keescook
2020-03-16 10:54:08 +01:00
Gustavo A. R. Silva
6b65675542
drm/vmwgfx: Replace zero-length array with flexible-array member
...
The current codebase makes use of the zero-length array language
extension to the C90 standard, but the preferred mechanism to declare
variable-length types such as these ones is a flexible array member[1][2],
introduced in C99:
struct foo {
int stuff;
struct boo array[];
};
By making use of the mechanism above, we will get a compiler warning
in case the flexible array does not occur last in the structure, which
will help us prevent some kind of undefined behavior bugs from being
inadvertently introduced[3] to the codebase from now on.
Also, notice that, dynamic memory allocations won't be affected by
this change:
"Flexible array members have incomplete type, and so the sizeof operator
may not be applied. As a quirk of the original implementation of
zero-length arrays, sizeof evaluates to zero."[1]
This issue was found with the help of Coccinelle.
[1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
[2] https://github.com/KSPP/linux/issues/21
[3] commit 7649773293 ("cxgb3/l2t: Fix undefined behaviour")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com >
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com >
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com >
2020-03-16 10:42:01 +01:00
Benjamin Gaignard
bd50d4a216
drm: lock: Clean up documentation
...
Fix kernel doc comments to avoid warnings when compiling with W=1.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20200306102937.4932-2-benjamin.gaignard@st.com
2020-03-16 09:27:09 +01:00
Benjamin Gaignard
abee5491db
drm: bufs: Clean up documentation
...
Fix kernel doc comments to avoid warnings when compiling with W=1.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20200306102937.4932-3-benjamin.gaignard@st.com
2020-03-16 09:26:18 +01:00
Benjamin Gaignard
40e5f35306
drm: vm: Clean up documentation
...
Fix kernel doc comments to avoid warnings when compiling with W=1.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20200306102937.4932-1-benjamin.gaignard@st.com
2020-03-16 09:25:22 +01:00
Benjamin Gaignard
cc99482527
drm: context: Clean up documentation
...
Fix kernel doc comments to avoid warnings when compiling with W=1.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20200306102937.4932-4-benjamin.gaignard@st.com
2020-03-16 09:23:55 +01:00
Kamlesh Gurudasani
fdcf7bb69b
drm/tiny: fix sparse warning: incorrect type in assignment (different base types)
...
This fixes the following sparse warning:
drivers/gpu/drm/tiny/ili9486.c:61:16: sparse: sparse: incorrect type in assignment (different base types)
drivers/gpu/drm/tiny/ili9486.c:61:16: sparse: expected unsigned short [usertype]
drivers/gpu/drm/tiny/ili9486.c:61:16: sparse: got restricted __be16 [usertype]
drivers/gpu/drm/tiny/ili9486.c:71:32: sparse: sparse: incorrect type in assignment (different base types)
drivers/gpu/drm/tiny/ili9486.c:71:32: sparse: expected unsigned short [usertype]
drivers/gpu/drm/tiny/ili9486.c:71:32: sparse: got restricted __be16 [usertype]
Reported-by: kbuild test robot <lkp@intel.com >
Signed-off-by: Kamlesh Gurudasani <kamlesh.gurudasani@gmail.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/1583684084-4694-1-git-send-email-kamlesh.gurudasani@gmail.com
2020-03-14 08:31:30 +01:00
Rodrigo Vivi
217a485c83
drm/i915: Update DRIVER_DATE to 20200313
...
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2020-03-13 17:09:52 -07:00
José Roberto de Souza
3492d17051
drm/i915/tgl: Remove require_force_probe protection
...
We have a few TGL machines in our CI and it is mostly green with
failures in tests that will not impact future Linux installations.
Also there is no warnings, errors, flickering or any visual defects
while doing ordinary tasks like browsing and editing documents in a
dual monitor setup.
As a reminder i915.require_force_probe was created to protect
future Linux installation's iso images that might contain a
kernel from the enabling time of the new platform. Without this
protection most of linux installation was recommending
nomodeset option during installation that was getting stick
there after installation.
Reference: https://intel-gfx-ci.01.org/tree/drm-tip/fi-tgl-u.html
Reference: https://intel-gfx-ci.01.org/tree/drm-tip/shard-tglb.html
Cc: James Ausmus <james.ausmus@intel.com >
Cc: Jani Saarinen <jani.saarinen@intel.com >
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Cc: Jani Nikula <jani.nikula@intel.com >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200218230822.66801-1-jose.souza@intel.com
2020-03-13 14:26:09 -07:00
Dmitry Osipenko
e32c8c2a5f
drm/tegra: hdmi: Silence deferred-probe error
...
Driver fails to probe with -EPROBE_DEFER, which produces a bit noisy error
message in KMSG during kernel's boot up. This happens because voltage
regulators tend to be probed later than the DRM driver.
Signed-off-by: Dmitry Osipenko <digetx@gmail.com >
Signed-off-by: Thierry Reding <treding@nvidia.com >
2020-03-13 18:03:06 +01:00
Dmitry Osipenko
8f839fb6b3
drm/tegra: dc: Silence RGB output deferred-probe error
...
Driver fails to probe with -EPROBE_DEFER if display output isn't ready
yet. This produces a bit noisy error message in KMSG during kernel's boot
up on Tegra20 and Tegra30 because RGB output tends to be probed earlier
than a corresponding voltage regulator driver.
Signed-off-by: Dmitry Osipenko <digetx@gmail.com >
Signed-off-by: Thierry Reding <treding@nvidia.com >
2020-03-13 18:03:06 +01:00
Matt Roper
34a77b0b7b
drm/i915: Add Wa_1605460711 / Wa_1408767742 to ICL and EHL
...
This workaround appears under two different numbers (and with somewhat
confused stepping applicability on ICL). Ultimately it appears we
should just implement this for all stepping of ICL and EHL.
Note that this is identical to Wa_1407928979:tgl that already exists in
our driver too...yet another number referencing the same actual
workaround.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200311162300.1838847-7-matthew.d.roper@intel.com
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com >
2020-03-13 09:03:17 -07:00
Matt Roper
fb899dd8ea
drm/i915: Apply Wa_1406680159:icl,ehl as an engine workaround
...
The register this workaround updates is a render engine register in the
MCR range, so we should initialize this in rcs_engine_wa_init() rather
than gt_wa_init().
Closes: https://gitlab.freedesktop.org/drm/intel/issues/1222
Fixes: 36204d80ba ("drm/i915/icl: Wa_1406680159")
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200311162300.1838847-6-matthew.d.roper@intel.com
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com >
2020-03-13 09:02:54 -07:00
Matt Roper
14f49be483
drm/i915: Add Wa_1406306137:icl,ehl
...
v2:
- Move to context workarounds. ROW_CHICKEN4 is part of the context
image on gen11 (although it isn't on gen12).
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200311162300.1838847-5-matthew.d.roper@intel.com
Reviewed-by: José Roberto de Souza <jose.souza@intel.com >
2020-03-13 09:02:21 -07:00
Matt Roper
d0ed510a8e
drm/i915: Add Wa_1604278689:icl,ehl
...
The bspec description for this workaround tells us to program
0xFFFF_FFFF into both FBC_RT_BASE_ADDR_REGISTER_* registers, but we've
previously found that this leads to failures in CI. Our suspicion is
that the failures are caused by this valid turning on the "address valid
bit" even though we're intentionally supplying an invalid address.
Experimentation has shown that setting all bits _except_ for the
RT_VALID bit seems to avoid these failures.
v2:
- Mask off the RT_VALID bit. Experimentation with CI trybot indicates
that this is necessary to avoid reset failures on BCS.
v3:
- Program RT_BASE before RT_BASE_UPPER so that the valid bit is turned
off by the first write. (Chris)
Bspec: 11388
Bspec: 33451
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Link: https://patchwork.freedesktop.org/patch/msgid/20200311162300.1838847-4-matthew.d.roper@intel.com
Reviewed-by: José Roberto de Souza <jose.souza@intel.com >
2020-03-13 09:01:44 -07:00
Matt Roper
aa64f8e1cf
drm/i915: Add Wa_1209644611:icl,ehl
...
On gen11 the XY_FAST_COPY_BLT command has some size restrictions on its
usage. Although this instruction is mainly used by userspace, i915 also
uses it to copy object contents during some selftests, so let's ensure
the restrictions are followed.
Bspec: 6544
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200311162300.1838847-3-matthew.d.roper@intel.com
Reviewed-by: José Roberto de Souza <jose.souza@intel.com >
2020-03-13 08:59:01 -07:00
Matt Roper
415d126997
drm/i915: Handle all MCR ranges
...
The bspec documents multiple MCR ranges; make sure they're all captured
by the driver.
Bspec: 13991, 52079
Fixes: 592a7c5e08 ("drm/i915: Extend non readable mcr range")
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200311162300.1838847-2-matthew.d.roper@intel.com
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com >
2020-03-13 08:58:11 -07:00
Lucas Stach
a7fbb630c5
drm/scheduler: fix inconsistent locking of job_list_lock
...
1db8c142b6 (drm/scheduler: Add drm_sched_suspend/resume_timeout()) made
the job_list_lock IRQ safe in as the suspend/resume calls were expected to
be called from IRQ context. This usage never materialized in upstream.
Instead amdgpu started locking the job_list_lock in an IRQ unsafe way in
amdgpu_ib_preempt_mark_partial_job() and amdgpu_ib_preempt_job_recovery(),
which leads to potential deadlock if one would actually start to call the
drm_sched_suspend/resume_timeout functions from IRQ context.
As no current user needs the locking to be IRQ safe, the local IRQ
disable/enable is pure overhead. Fix the inconsistent locking by changing
all uses of job_list_lock to use the IRQ unsafe locking primitives.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-03-13 11:52:36 -04:00