Xu YiPing
d606dc9a63
drm: kirin: Add register connect helper functions in drm init
...
As part of refactoring the kirin driver to better support
different hardware revisions, this patch adds a flag to the
device specific driver data so that we can conditionally
register the connectors at init.
Cc: Rongrong Zou <zourongrong@gmail.com >
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: dri-devel <dri-devel@lists.freedesktop.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Xinliang Liu <z.liuxinliang@hisilicon.com >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Xu YiPing <xuyiping@hisilicon.com >
[jstultz: reworded commit message]
Signed-off-by: John Stultz <john.stultz@linaro.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20190820230626.23253-20-john.stultz@linaro.org
2019-08-21 19:15:42 +02:00
Xu YiPing
1053d01864
drm: kirin: Move drm driver to driver data
...
As part of refactoring the kirin driver to better support
different hardware revisions, this patch moves the drm_driver
structure to be under device specific driver data.
This will allow us to more easily add support for kirin960
hardware with later patches.
Cc: Rongrong Zou <zourongrong@gmail.com >
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: dri-devel <dri-devel@lists.freedesktop.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Xinliang Liu <z.liuxinliang@hisilicon.com >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Xu YiPing <xuyiping@hisilicon.com >
[jstultz: Reworded commit message]
Signed-off-by: John Stultz <john.stultz@linaro.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20190820230626.23253-19-john.stultz@linaro.org
2019-08-21 19:15:42 +02:00
Xu YiPing
49af461139
drm: kirin: Move config max_width and max_height to driver data
...
As part of refactoring the kirin driver to better support
different hardware revisions, this patch moves the max_width
and max_height values used in kirin_drm_mode_config_inita to
hardware specific driver data.
This will make it easier to add support for new devices
via a new kirin_drm_data structure.
Cc: Rongrong Zou <zourongrong@gmail.com >
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: dri-devel <dri-devel@lists.freedesktop.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Xinliang Liu <z.liuxinliang@hisilicon.com >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Xu YiPing <xuyiping@hisilicon.com >
[jstultz: reworded commit message]
Signed-off-by: John Stultz <john.stultz@linaro.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20190820230626.23253-18-john.stultz@linaro.org
2019-08-21 19:15:41 +02:00
Xu YiPing
48fa7c17d1
drm: kirin: Move plane number and primay plane in driver data
...
As part of refactoring the kirin driver to better support
different hardware revisions, this patch moves the number of
planes and the primary plane value to the kirin_drm_data
structure
This will make it easier to add support for new devices
via a new kirin_drm_data structure.
Cc: Rongrong Zou <zourongrong@gmail.com >
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: dri-devel <dri-devel@lists.freedesktop.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Xinliang Liu <z.liuxinliang@hisilicon.com >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Xu YiPing <xuyiping@hisilicon.com >
Signed-off-by: John Stultz <john.stultz@linaro.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20190820230626.23253-17-john.stultz@linaro.org
2019-08-21 19:15:40 +02:00
Xu YiPing
bdaf419efe
drm: kirin: Move mode config function to driver_data
...
As part of refactoring the kirin driver to better support
different hardware revisions, this patch moves the mode config
initialization values into the kirin_drm_data structure.
This will make it easier to add support for new devices
via a new kirin_drm_data structure.
Cc: Rongrong Zou <zourongrong@gmail.com >
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: dri-devel <dri-devel@lists.freedesktop.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Xinliang Liu <z.liuxinliang@hisilicon.com >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Xu YiPing <xuyiping@hisilicon.com >
Signed-off-by: John Stultz <john.stultz@linaro.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20190820230626.23253-16-john.stultz@linaro.org
2019-08-21 19:15:40 +02:00
Xu YiPing
e200d8eb39
drm: kirin: Move channel formats to driver data
...
As part of refactoring the kirin driver to better support
different hardware revisions, this patch moves the channel
format arrays into the kirin_drm_data structure.
This will make it easier to add support for new devices
via a new kirin_drm_data structure.
Cc: Rongrong Zou <zourongrong@gmail.com >
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: dri-devel <dri-devel@lists.freedesktop.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Xinliang Liu <z.liuxinliang@hisilicon.com >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Xu YiPing <xuyiping@hisilicon.com >
[jstultz: reworded commit message]
Signed-off-by: John Stultz <john.stultz@linaro.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20190820230626.23253-15-john.stultz@linaro.org
2019-08-21 19:15:39 +02:00
Xu YiPing
5fb2e411be
drm: kirin: Move ade crtc/plane help functions to driver_data
...
As part of refactoring the kirin driver to better support
different hardware revisions, this patch moves the crtc
and plane funcs/helper_funcs to the struct kirin_drm_data.
This will make it easier to add support for new devices
via a new kirin_drm_data structure.
Cc: Rongrong Zou <zourongrong@gmail.com >
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: dri-devel <dri-devel@lists.freedesktop.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Xinliang Liu <z.liuxinliang@hisilicon.com >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Xu YiPing <xuyiping@hisilicon.com >
[jstultz: reworded commit message]
Signed-off-by: John Stultz <john.stultz@linaro.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20190820230626.23253-14-john.stultz@linaro.org
2019-08-21 19:15:39 +02:00
Xu YiPing
7903ba41e9
drm: kirin: Reanme dc_ops to kirin_drm_data
...
As part of refactoring the kirin driver to better support
different hardware revisions, this patch renames the
struct kirin_dc_ops to struct kirin_drm_data and cleans
up the related variable names.
Cc: Rongrong Zou <zourongrong@gmail.com >
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: dri-devel <dri-devel@lists.freedesktop.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Xinliang Liu <z.liuxinliang@hisilicon.com >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Xu YiPing <xuyiping@hisilicon.com >
[jstultz: reworded commit message]
Signed-off-by: John Stultz <john.stultz@linaro.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20190820230626.23253-13-john.stultz@linaro.org
2019-08-21 19:15:38 +02:00
Xu YiPing
c11a03f6eb
drm: kirin: Move kirin_crtc, kirin_plane, kirin_format to kirin_drm_drv.h
...
As part of refactoring the kirin driver to better support
different hardware revisions, this patch moves some shared
structures and helpers to the common kirin_drm_drv.h
These structures will later used by both kirin620 and
future kirin960 driver
Cc: Rongrong Zou <zourongrong@gmail.com >
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: dri-devel <dri-devel@lists.freedesktop.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Xinliang Liu <z.liuxinliang@hisilicon.com >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Xu YiPing <xuyiping@hisilicon.com >
[jstultz: reworded commit message]
Signed-off-by: John Stultz <john.stultz@linaro.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20190820230626.23253-12-john.stultz@linaro.org
2019-08-21 19:15:37 +02:00
John Stultz
529277121b
drm: kirin: Move workqueue to ade_hw_ctx structure
...
The workqueue used to reset the display when we hit an LDI
underflow error is ADE specific, so since this patch series
works to make the kirin_crtc structure more generic, move the
workqueue to the ade_hw_ctx structure instead.
Cc: Rongrong Zou <zourongrong@gmail.com >
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: dri-devel <dri-devel@lists.freedesktop.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Xinliang Liu <z.liuxinliang@hisilicon.com >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: John Stultz <john.stultz@linaro.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20190820230626.23253-11-john.stultz@linaro.org
2019-08-21 19:15:36 +02:00
Xu YiPing
36f8d22dbc
drm: kirin: Move request irq handle in ade hw ctx alloc
...
As part of refactoring the kirin driver to better support
different hardware revisions, this patch modifies the
initialization routines so the devm_request_irq() function
is called as part of the allocation function.
This will be needed in the future when we will have different
allocation functions to allocate hardware specific hw_ctx
structures, which will setup the vblank irq differently.
Cc: Rongrong Zou <zourongrong@gmail.com >
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: dri-devel <dri-devel@lists.freedesktop.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Xinliang Liu <z.liuxinliang@hisilicon.com >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Xu YiPing <xuyiping@hisilicon.com >
[jstultz: reworded commit message]
Signed-off-by: John Stultz <john.stultz@linaro.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20190820230626.23253-10-john.stultz@linaro.org
2019-08-21 19:15:36 +02:00
Xu YiPing
43774b0eed
drm: kirin: Dynamically allocate the hw_ctx
...
As part of refactoring the kirin driver to better support
different hardware revisions, this patch modifies the
initialization function to dynamically allocate the ade_hw_ctx
structure previously kept as part of struct ade_data.
This is done so that later we can have the hw_ctx point to
hardware revision specific ctx structures.
Cc: Rongrong Zou <zourongrong@gmail.com >
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: dri-devel <dri-devel@lists.freedesktop.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Xinliang Liu <z.liuxinliang@hisilicon.com >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Xu YiPing <xuyiping@hisilicon.com >
[jstultz: reworded commit message]
Signed-off-by: John Stultz <john.stultz@linaro.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20190820230626.23253-9-john.stultz@linaro.org
2019-08-21 19:15:36 +02:00
Xu YiPing
ada7f67da9
drm: kirin: Rename ade_crtc to kirin_crtc
...
As part of refactoring the kirin driver to better support
different hardware revisions, this patch renames the
struct ade_crtc to kirin_crtc.
The struct kirin_crtc will later used by both kirin620 and
future kirin960 driver, and will be moved to a common
kirin_drm_drv.h in a future patch
Cc: Rongrong Zou <zourongrong@gmail.com >
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: dri-devel <dri-devel@lists.freedesktop.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Xinliang Liu <z.liuxinliang@hisilicon.com >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Xu YiPing <xuyiping@hisilicon.com >
[jstultz: reworded commit message]
Signed-off-by: John Stultz <john.stultz@linaro.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20190820230626.23253-8-john.stultz@linaro.org
2019-08-21 19:15:35 +02:00
Xu YiPing
0ae622c532
drm: kirin: Rename ade_plane to kirin_plane
...
As part of refactoring the kirin driver to better support
different hardware revisions, this patch renames the
struct ade_plane to kirin_plane.
The struct kirin_plane will later used by both kirin620 and
future kirin960 driver, and will be moved to a common
kirin_drm_drv.h in a future patch
Cc: Rongrong Zou <zourongrong@gmail.com >
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: dri-devel <dri-devel@lists.freedesktop.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Xinliang Liu <z.liuxinliang@hisilicon.com >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Xu YiPing <xuyiping@hisilicon.com >
[jstultz: reworded commit message]
Signed-off-by: John Stultz <john.stultz@linaro.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20190820230626.23253-7-john.stultz@linaro.org
2019-08-21 19:15:35 +02:00
Xu YiPing
a202da1643
drm: kirin: Remove out_format from ade_crtc
...
As part of refactoring the kirin driver to better support
different hardware revisions, this patch removes the out_format
field in the struct ade_crtc, which was only ever set to
LDI_OUT_RGB_888.
Thus this patch removes the field and instead directly uses
LDI_OUT_RGB_888.
Cc: Rongrong Zou <zourongrong@gmail.com >
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: dri-devel <dri-devel@lists.freedesktop.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Xinliang Liu <z.liuxinliang@hisilicon.com >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Xu YiPing <xuyiping@hisilicon.com >
[jstultz: reworded commit message]
Signed-off-by: John Stultz <john.stultz@linaro.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20190820230626.23253-6-john.stultz@linaro.org
2019-08-21 19:15:34 +02:00
Xu YiPing
e0d8eba5dd
drm: kirin: Remove uncessary parameter indirection
...
In a few functions, we pass in a struct ade_crtc, which we only
use to get to the underlying struct ade_hw_ctx.
Thus this patch refactors the functions to just take the
struct ade_hw_ctx directly.
Cc: Rongrong Zou <zourongrong@gmail.com >
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: dri-devel <dri-devel@lists.freedesktop.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Xinliang Liu <z.liuxinliang@hisilicon.com >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Xu YiPing <xuyiping@hisilicon.com >
[jstultz: reworded commit message]
Signed-off-by: John Stultz <john.stultz@linaro.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20190820230626.23253-5-john.stultz@linaro.org
2019-08-21 19:15:34 +02:00
John Stultz
9ec16cee89
drm: kirin: Remove unreachable return
...
The 'return 0' in kirin_drm_platform_probe() is unreachable
code, so remove it.
Cc: Rongrong Zou <zourongrong@gmail.com >
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: dri-devel <dri-devel@lists.freedesktop.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Xinliang Liu <z.liuxinliang@hisilicon.com >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Suggested by: Xu YiPing <xuyiping@hisilicon.com >
Signed-off-by: John Stultz <john.stultz@linaro.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20190820230626.23253-4-john.stultz@linaro.org
2019-08-21 19:15:33 +02:00
John Stultz
46aa549fd1
drm: kirin: Remove HISI_KIRIN_DW_DSI config option
...
The CONFIG_HISI_KIRIN_DW_DSI option is only used w/ kirin
driver, so cut out the middleman and condense the config
logic down.
Cc: Rongrong Zou <zourongrong@gmail.com >
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: dri-devel <dri-devel@lists.freedesktop.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Xinliang Liu <z.liuxinliang@hisilicon.com >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: John Stultz <john.stultz@linaro.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20190820230626.23253-3-john.stultz@linaro.org
2019-08-21 19:15:32 +02:00
Da Lv
ff57c65138
drm: kirin: Fix for hikey620 display offset problem
...
The original HiKey (620) board has had a long running issue
where when using a 1080p montior, the display would occasionally
blink and come come back with a horizontal offset (usually also
shifting the colors, depending on the value of the offset%4).
After lots of analysis by HiSi developers, they found the issue
was due to when running at 1080p, it was possible to hit the
device memory bandwidth limits, which could cause the DSI signal
to get out of sync.
Unfortunately the DSI logic doesn't have the ability to
automatically recover from this situation, but we can get a an
LDI underflow interrupt when it happens.
To then correct the issue, when we get an LDI underflow irq, we
we can simply suspend and resume the display, which resets the
hardware.
Thus, this patch enables the ldi underflow interrupt, and
initializes a workqueue that is used to suspend/resume the
display to recover. Then when the irq occurs we clear it and
schedule the workqueue to reset display engine.
Cc: Rongrong Zou <zourongrong@gmail.com >
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: dri-devel <dri-devel@lists.freedesktop.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Xinliang Liu <z.liuxinliang@hisilicon.com >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Da Lv <lvda3@hisilicon.com >
Signed-off-by: Yidong Lin <linyidong@huawei.com >
[jstultz: Reworded the commit message, checkpatch cleanups]
Signed-off-by: John Stultz <john.stultz@linaro.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20190820230626.23253-2-john.stultz@linaro.org
2019-08-21 19:15:32 +02:00
Xiong Zhang
4776f3529d
drm/i915: Don't deballoon unused ggtt drm_mm_node in linux guest
...
The following call trace may exist in linux guest dmesg when guest i915
driver is unloaded.
[ 90.776610] [drm:vgt_deballoon_space.isra.0 [i915]] deballoon space: range [0x0 - 0x0] 0 KiB.
[ 90.776621] BUG: unable to handle kernel NULL pointer dereference at 00000000000000c0
[ 90.776691] IP: drm_mm_remove_node+0x4d/0x320 [drm]
[ 90.776718] PGD 800000012c7d0067 P4D 800000012c7d0067 PUD 138e4c067 PMD 0
[ 90.777091] task: ffff9adab60f2f00 task.stack: ffffaf39c0fe0000
[ 90.777142] RIP: 0010:drm_mm_remove_node+0x4d/0x320 [drm]
[ 90.777573] Call Trace:
[ 90.777653] intel_vgt_deballoon+0x4c/0x60 [i915]
[ 90.777729] i915_ggtt_cleanup_hw+0x121/0x190 [i915]
[ 90.777792] i915_driver_unload+0x145/0x180 [i915]
[ 90.777856] i915_pci_remove+0x15/0x20 [i915]
[ 90.777890] pci_device_remove+0x3b/0xc0
[ 90.777916] device_release_driver_internal+0x157/0x220
[ 90.777945] driver_detach+0x39/0x70
[ 90.777967] bus_remove_driver+0x51/0xd0
[ 90.777990] pci_unregister_driver+0x23/0x90
[ 90.778019] SyS_delete_module+0x1da/0x240
[ 90.778045] entry_SYSCALL_64_fastpath+0x24/0x87
[ 90.778072] RIP: 0033:0x7f34312af067
[ 90.778092] RSP: 002b:00007ffdea3da0d8 EFLAGS: 00000206
[ 90.778297] RIP: drm_mm_remove_node+0x4d/0x320 [drm] RSP: ffffaf39c0fe3dc0
[ 90.778344] ---[ end trace f4b1bc8305fc59dd ]---
Four drm_mm_node are used to reserve guest ggtt space, but some of them
may be skipped and not initialised due to space constraints in
intel_vgt_balloon(). If drm_mm_remove_node() is called with
uninitialized drm_mm_node, the above call trace occurs.
This patch check drm_mm_node's validity before calling
drm_mm_remove_node().
Fixes: ff8f797557c7("drm/i915: return the correct usable aperture size under gvt environment")
Cc: stable@vger.kernel.org
Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com >
Acked-by: Zhenyu Wang <zhenyuw@linux.intel.com >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: https://patchwork.freedesktop.org/patch/msgid/1566279978-9659-1-git-send-email-xiong.y.zhang@intel.com
2019-08-21 18:03:03 +01:00
Chris Wilson
c71ccbe263
drm/i915/gtt: Add some range asserts
...
These should have been validated in the upper layers, but for sanity's
sake, repeat them.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190821155728.2839-2-chris@chris-wilson.co.uk
2019-08-21 17:58:54 +01:00
Ville Syrjälä
1b9bd09630
drm/i915: Do not create a new max_bpc prop for MST connectors
...
We're not allowed to create new properties after device registration
so for MST connectors we need to either create the max_bpc property
earlier, or we reuse one we already have. Let's do the latter apporach
since the corresponding SST connector already has the prop and its
min/max are correct also for the MST connector.
The problem was highlighted by commit 4f5368b554
("drm/kms:
Catch mode_object lifetime errors") which results in the following
spew:
[ 1330.878941] WARNING: CPU: 2 PID: 1554 at drivers/gpu/drm/drm_mode_object.c:45 __drm_mode_object_add+0xa0/0xb0 [drm]
...
[ 1330.879008] Call Trace:
[ 1330.879023] drm_property_create+0xba/0x180 [drm]
[ 1330.879036] drm_property_create_range+0x15/0x30 [drm]
[ 1330.879048] drm_connector_attach_max_bpc_property+0x62/0x80 [drm]
[ 1330.879086] intel_dp_add_mst_connector+0x11f/0x140 [i915]
[ 1330.879094] drm_dp_add_port.isra.20+0x20b/0x440 [drm_kms_helper]
...
Cc: stable@vger.kernel.org
Cc: Lyude Paul <lyude@redhat.com >
Cc: sunpeng.li@amd.com
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Sean Paul <sean@poorly.run >
Fixes: 5ca0ef8a56
("drm/i915: Add max_bpc property for DP MST")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190820161657.9658-1-ville.syrjala@linux.intel.com
Reviewed-by: José Roberto de Souza <jose.souza@intel.com >
Reviewed-by: Lyude Paul <lyude@redhat.com >
2019-08-21 19:40:55 +03:00
Chris Wilson
a20ab592d1
drm/i915/execlists: Set priority hint prior to submission
...
Since we now run process_csb() outside of the engine->active.lock, we
can process a CS-event immediately upon our ELSP write. As we currently
inspect the pending queue *after* the ELSP write, there is an
opportunity for a CS-event to update the pending queue before we can
read it, making ourselves chases an invalid pointer.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111427
Fixes: df40306902
("drm/i915/execlists: Lift process_csb() out of the irq-off spinlock")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com >
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190821142336.21609-1-chris@chris-wilson.co.uk
2019-08-21 17:32:27 +01:00
Chris Wilson
6846895fde
drm/i915: Replace PIN_NONFAULT with calls to PIN_NOEVICT
...
When under severe stress for GTT mappable space, the LRU eviction model
falls off a cliff. We spend all our time scanning the much larger
non-mappable area searching for something within the mappable zone we can
evict. Turn this on its head by only using the full vma for the object if
it is already pinned in the mappable zone or there is sufficient *free*
space to accommodate it (prioritizing speedy reuse). If there is not,
immediately fall back to using small chunks (tilerow for GTT mmap, single
pages for pwrite/relocation) and using random eviction before doing a full
search.
Testcase: igt/gem_concurrent_blt
References: https://bugs.freedesktop.org/show_bug.cgi?id=110848
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Matthew Auld <matthew.auld@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190821123234.19194-1-chris@chris-wilson.co.uk
2019-08-21 14:07:54 +01:00
Thierry Reding
019cbd4a4f
drm/nouveau: Initialize GEM object before TTM object
...
TTM assumes that drivers initialize the embedded GEM object before
calling the ttm_bo_init() function. This is not currently the case
in the Nouveau driver. Fix this by splitting up nouveau_bo_new()
into nouveau_bo_alloc() and nouveau_bo_init() so that the GEM can
be initialized before TTM BO initialization when necessary.
Fixes: b96f3e7c80
("drm/ttm: use gem vma_node")
Acked-by: Gerd Hoffmann <kraxel@redhat.com >
Acked-by: Ben Skeggs <bskeggs@redhat.com >
Signed-off-by: Thierry Reding <treding@nvidia.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190814093524.GA31345@ulmo
2019-08-21 13:38:28 +02:00
Chris Wilson
783877458f
drm/i915/gtt: Include asm/smp.h
...
We need asm/smp.h for wbinvd_on_all_cpus()
Reported-by: kbuild-all@01.org
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Matthew Auld <matthew.auld@intel.com >
Reviewed-by: Matthew Auld <matthew.auld@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190821093905.7693-1-chris@chris-wilson.co.uk
2019-08-21 11:31:24 +01:00
Jani Nikula
e63eacf768
drm/i915/hdmi: make hdcp2_msg_data const
...
It's static const data, make it so.
Cc: Ramalingam C <ramalingam.c@intel.com >
Reviewed-by: Ramalingam C <ramalingam.c@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190820134019.13229-5-jani.nikula@intel.com
2019-08-21 13:12:02 +03:00
Jani Nikula
032048db14
drm/i915/hdmi: stylistic cleanup around hdcp2_msg_data
...
Split struct declaration and array definition. Fix indents and
whitespace. No functional changes.
Cc: Ramalingam C <ramalingam.c@intel.com >
Reviewed-by: Ramalingam C <ramalingam.c@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190820134019.13229-4-jani.nikula@intel.com
2019-08-21 13:11:58 +03:00
Jani Nikula
e8465e1c6e
drm/i915/dp: make hdcp2_dp_msg_data const
...
It's static const data, make it so.
Cc: Ramalingam C <ramalingam.c@intel.com >
Reviewed-by: Ramalingam C <ramalingam.c@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190820134019.13229-3-jani.nikula@intel.com
2019-08-21 13:11:54 +03:00
Jani Nikula
3be3a877cc
drm/i915/dp: avoid shadowing variables
...
Everything seems to be all right, but shadowing is to be avoided.
Cc: Ramalingam C <ramalingam.c@intel.com >
Reviewed-by: Ramalingam C <ramalingam.c@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190820134019.13229-2-jani.nikula@intel.com
2019-08-21 13:11:50 +03:00
Jani Nikula
57bf7f43ba
drm/i915/dp: stylistic cleanup around hdcp2_msg_data
...
Split struct declaration and array definition. Fix indents and
whitespace. No functional changes.
Cc: Ramalingam C <ramalingam.c@intel.com >
Reviewed-by: Ramalingam C <ramalingam.c@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190820134019.13229-1-jani.nikula@intel.com
2019-08-21 13:11:34 +03:00
Imre Deak
ed19e3035c
drm/i915: Fix HW readout for crtc_clock in HDMI mode
...
The conversion during HDMI HW readout from port_clock to crtc_clock was
missed when HDMI 10bpc support was added, so fix that.
v2:
- Unscrew the non-HDMI case.
Fixes: cd9e11a8bf
("drm/i915/icl: Add 10-bit support for hdmi")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109593
Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com >
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190808162547.7009-1-imre.deak@intel.com
(cherry picked from commit 2969a78aea
)
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2019-08-21 12:30:48 +03:00
Chris Wilson
ff17501013
drm/i915/gtt: Relax assertion for pt_used
...
When inserting the final level PTE, we check that we are not overflowing
the page table (checking that pt_used does not exceed the size of the
table). However, we have to allow for every other PTE to be pinned by a
simultaneous removal thread (as on remove we bump the pt_used counter
before adjusting the table).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com >
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190821042044.7354-1-chris@chris-wilson.co.uk
2019-08-21 09:17:11 +01:00
Dave Airlie
5f680625d9
Merge tag 'drm-misc-next-2019-08-19' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
...
drm-misc-next for 5.4:
UAPI Changes:
Cross-subsystem Changes:
Core Changes:
- dma-buf: add reservation_object_fences helper, relax
reservation_object_add_shared_fence, remove
reservation_object seq number (and then
restored)
- dma-fence: Shrinkage of the dma_fence structure,
Merge dma_fence_signal and dma_fence_signal_locked,
Store the timestamp in struct dma_fence in a union with
cb_list
Driver Changes:
- More dt-bindings YAML conversions
- More removal of drmP.h includes
- dw-hdmi: Support get_eld and various i2s improvements
- gm12u320: Few fixes
- meson: Global cleanup
- panfrost: Few refactors, Support for GPU heap allocations
- sun4i: Support for DDC enable GPIO
- New panels: TI nspire, NEC NL8048HL11, LG Philips LB035Q02,
Sharp LS037V7DW01, Sony ACX565AKM, Toppoly TD028TTEC1
Toppoly TD043MTEA1
Signed-off-by: Dave Airlie <airlied@redhat.com >
[airlied: fixup dma_resv rename fallout]
From: Maxime Ripard <maxime.ripard@bootlin.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190819141923.7l2adietcr2pioct@flea
2019-08-21 16:44:41 +10:00
Gustavo A. R. Silva
5334653d4f
drm/sun4i: tcon: Mark expected switch fall-through
...
Mark switch cases where we are expecting to fall through.
Fix the following warning (Building: sunxi_defconfig arm):
drivers/gpu/drm/sun4i/sun4i_tcon.c: In function ‘sun4i_tcon0_mode_set_dithering’:
drivers/gpu/drm/sun4i/sun4i_tcon.c:318:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
val |= SUN4I_TCON0_FRM_CTL_MODE_B;
drivers/gpu/drm/sun4i/sun4i_tcon.c:319:2: note: here
case MEDIA_BUS_FMT_RGB666_1X18:
^~~~
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com >
2019-08-20 19:43:08 -05:00
Gustavo A. R. Silva
edf6a05976
drm/sun4i: sun6i_mipi_dsi: Mark expected switch fall-through
...
Mark switch cases where we are expecting to fall through.
Fix the following warning (Building: multi_v7_defconfig arm):
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c: In function ‘sun6i_dsi_transfer’:
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c:993:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (msg->rx_len == 1) {
^
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c:998:2: note: here
default:
^~~~~~~
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com >
2019-08-20 19:43:05 -05:00
Ville Syrjälä
4eaceea3a0
drm/i915: Fix DP-MST crtc_mask
...
Each fake MST encoder is tied to a specific pipe. Fix the encoder's
crtc_mask to reflect that fact.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190817093902.2171-16-lucas.demarchi@intel.com
2019-08-20 12:53:13 -07:00
Lucas De Marchi
d318cedf81
drm/i915/tgl: update DMC firmware to 2.04
...
2 important fixes:
- vblank counter is now working
- PSR1 is working
Cc: Jose Souza <jose.souza@intel.com >
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Reviewed-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190817093902.2171-5-lucas.demarchi@intel.com
2019-08-20 12:49:29 -07:00
José Roberto de Souza
9288d74f3f
drm/i915/tgl: Move transcoders to pipes' powerwells
...
When trying to read registers from transcoder C and D while PG3 is ON it
causes unclaimed access warnings. Adding the powerwells for the pipes
fixes the issue, but doesn't match the spec.
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Reviewed-by: Imre Deak <imre.deak@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190817093902.2171-4-lucas.demarchi@intel.com
2019-08-20 12:49:17 -07:00
Michel Thierry
465242ee36
drm/i915/tgl: add support for reading the timestamp frequency
...
There are no changes with respect to GEN11, which Paulo wrote.
This gets rid of the "Missing switch case in read_timestamp_frequency"
message at boot for Tiger Lake.
[ Lucas: BSpec: 10742 and 9024, but there's a mismatch on the values.
Let's say a glitch in the spec. Tested locally and it works. ]
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com >
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Signed-off-by: Michel Thierry <michel.thierry@intel.com >
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190817093902.2171-3-lucas.demarchi@intel.com
2019-08-20 12:48:57 -07:00
Lucas De Marchi
ea6591b4da
drm/i915/tgl: disable DDIC
...
The current SKUs added for Tiger Lake don't have DDIC hooked up, even
though it is supported by the SoC. The current state for these SKUs is
problematic since while enabling the combo phy, PORT_COMP_DW* return
0xFFFFFFFF, which is invalid per register definition.
During initialization we check what phys are not yet enabled by reading
PHY_MISC_C and try to enable it by toggling the "DE to IO Comp Pwr Down"
bit. But after that any read to the PORT_COMP_DW* returns invalid
results. This removes the following warning
[56997.634353] Missing case (val == 4294967295)
[56997.639241] WARNING: CPU: 5 PID: 768 at drivers/gpu/drm/i915/display/intel_combo_phy.c:54 cnl_get_procmon_ref_values+0xc9/0xf0 [i915]
[56997.639808] Modules linked in: i915(+) prime_numbers x86_pkg_temp_thermal coretemp kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel e1000e [last unloaded: prime_numbers]
[56997.639808] CPU: 5 PID: 768 Comm: insmod Tainted: G U W 5.2.0-demarchi+ #65
[56997.639808] Hardware name: Intel Corporation Tiger Lake Client Platform/TigerLake U DDR4 SODIMM RVP, BIOS TGLSFWI1.R00.2252.A03.1906270154 06/27/2019
[56997.639808] RIP: 0010:cnl_get_procmon_ref_values+0xc9/0xf0 [i915]
[56997.639808] Code: 2c a0 85 c9 74 e0 81 f9 00 00 00 01 75 09 48 c7 c0 0c a4 2c a0 eb cf 48 c7 c6 3c 3a 31 a0 48 c7 c7 40 3a 31 a0 e8 6b 4d ea e0 <0f> 0b 48 c7 c0 00 a4 2c a0 eb b1 48 c7 c0 24 a4 2
c a0 eb a8 e8 be
[56997.639808] RSP: 0018:ffffc9000068f8a8 EFLAGS: 00010286
[56997.639808] RAX: 0000000000000000 RBX: ffff88848fa90000 RCX: 0000000000000000
[56997.639808] RDX: ffff8884a08b5ef8 RSI: ffff8884a08a6658 RDI: 00000000ffffffff
[56997.639808] RBP: 0000000000000002 R08: 0000000000000000 R09: 0000000000000000
[56997.639808] R10: 0000000000000000 R11: 0000000000000000 R12: ffff88848fa90000
[56997.639808] R13: 0000000000000000 R14: 0000000000000002 R15: 0006c00000162000
[56997.639808] FS: 00007f61ca3d12c0(0000) GS:ffff8884a0880000(0000) knlGS:0000000000000000
[56997.639808] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[56997.639808] CR2: 00007f71be6a92c0 CR3: 0000000494750006 CR4: 0000000000760ee0
[56997.639808] PKRU: 55555554
[56997.639808] Call Trace:
[56997.639808] cnl_verify_procmon_ref_values+0x36/0xf0 [i915]
[56997.639808] ? rcu_read_lock_sched_held+0x6f/0x80
[56997.639808] ? gen11_fwtable_read32+0x257/0x290 [i915]
[56997.639808] icl_combo_phy_verify_state.part.0+0x22/0xa0 [i915]
[56997.639808] intel_combo_phy_init+0x17e/0x3e0 [i915]
[56997.639808] ? icl_display_core_init+0x2c/0x1a0 [i915]
[56997.639808] ? _raw_spin_unlock_irqrestore+0x4c/0x60
[56997.639808] icl_display_core_init+0x34/0x1a0 [i915]
[56997.639808] intel_power_domains_init_hw+0x200/0x570 [i915]
[56997.639808] i915_driver_probe+0x103b/0x17e0 [i915]
[56997.639808] ? printk+0x53/0x6a
[56997.639808] i915_pci_probe+0x3b/0x190 [i915]
We may or may not need to change the implementation to account for DDIC
being available on other SKUs. For now I think the best thing to do is
to just disable the port.
Cc: José Roberto de Souza <jose.souza@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Reviewed-by: Uma Shankar <uma.shankar@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190814235517.10032-1-lucas.demarchi@intel.com
2019-08-20 12:33:57 -07:00
Rodrigo Vivi
d70898e4ea
drm/i915: Update DRIVER_DATE to 20190820
...
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2019-08-20 09:55:48 -07:00
Chris Wilson
6acbe9f630
drm/i915/gtt: Relax pd_used assertion
...
The current assertion tries to make sure that we do not over count the
number of used PDE inside a page directory -- that is with an array of
512 pde, we do not expect more than 512 elements used! However, our
assertion has to take into account that as we pin an element into the
page directory, the caller first pins the page directory so the usage
count is one higher. However, this should be one extra pin per thread,
and the upper bound is that we may have one thread for each entry.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com >
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190820141218.14714-1-chris@chris-wilson.co.uk
2019-08-20 15:32:39 +01:00
Daniele Ceraolo Spurio
1bcd8688bd
drm/i915: Dynamically allocate s0ix struct for VLV
...
This is only required for a single platform so no need to reserve the
memory on all of them.
This removes the last direct dependency of i915_drv.h on i915_reg.h
(apart from the i915_reg_t definition).
v2: drop unneeded diff, keep the vlv prefix, call functions
unconditionally (Jani), fwd declaration of the struct (Chris)
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com >
Cc: Imre Deak <imre.deak@intel.com >
Cc: Jani Nikula <jani.nikula@intel.com >
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: https://patchwork.freedesktop.org/patch/msgid/20190820020147.5667-1-daniele.ceraolospurio@intel.com
2019-08-20 15:23:33 +01:00
Daniele Ceraolo Spurio
0aa5427a7f
drm/i915/tgl: Gen12 render context size
...
Re-use Gen11 context size for now.
[ Lucas: this is a temporary enabling patch that needs to be confirmed:
we need to check BSpec 46255 and recompute ]
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Acked-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: https://patchwork.freedesktop.org/patch/msgid/20190817093902.2171-27-lucas.demarchi@intel.com
2019-08-20 15:23:33 +01:00
Michel Thierry
b41e63d881
drm/i915/tgl: Updated Private PAT programming
...
Gen12 removes the target-cache and age fields from the private PAT
because MOCS now have the capability to set these itself. Only memory-type
field should be programmed in the ppat, the reminded bits are reserved.
Since now there are only 4 possible combinations, we could set only 4
PPAT and leave the reminded 4 as UC, but I left them as WB as we used
to have before.
Also these registers have been relocated to the 0x4800-0x481c range.
HSDES: 1406402661
BSpec: 31654
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com >
Signed-off-by: Michel Thierry <michel.thierry@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: https://patchwork.freedesktop.org/patch/msgid/20190817093902.2171-33-lucas.demarchi@intel.com
2019-08-20 15:23:33 +01:00
Lucas De Marchi
13e53c5c53
drm/i915/tgl: Introduce initial Tiger Lake workarounds
...
Add empty workaround hooks for Tiger Lake. The workarounds will be added
on separate patches. We were already applying
WaRsForcewakeAddDelayForAck, which is indeed still valid, so also update
the comment.
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Reviewed-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com >
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: https://patchwork.freedesktop.org/patch/msgid/20190817093902.2171-21-lucas.demarchi@intel.com
2019-08-20 15:23:33 +01:00
Daniele Ceraolo Spurio
f4785682c9
drm/i915/tgl: Gen12 csb support
...
The CSB format has been reworked for Gen12 to include information on
both the context we're switching away from and the context we're
switching to. After the change, some of the events don't have their
own bit anymore and need to be inferred from other values in the csb.
One of the context IDs (0x7FF) has also been reserved to indicate
the invalid ctx, i.e. engine idle.
Note that the full context ID includes the SW counter as well, but since
we currently only care if the context is valid or not we can ignore that
part.
v2: fix mask size, fix and expand comments (Tvrtko),
use if-ladder (Chris)
Bspec: 45555, 46144
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com >
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com >
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com >
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com >
Acked-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: https://patchwork.freedesktop.org/patch/msgid/20190820102201.29849-1-chris@chris-wilson.co.uk
2019-08-20 15:23:24 +01:00
Daniele Ceraolo Spurio
6d26d9bbf5
drm/i915/tgl: add GEN12_MAX_CONTEXT_HW_ID
...
Like Gen11, Gen12 has 11 available bits for the ctx id field. However,
the last value (0x7FF) is reserved to indicate engine idle, so we
need to reduce the maximum number of contexts by 1 compared to Gen11.
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Acked-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: https://patchwork.freedesktop.org/patch/msgid/20190817093902.2171-29-lucas.demarchi@intel.com
2019-08-20 14:23:45 +01:00
Daniele Ceraolo Spurio
487f471da3
drm/i915/tgl: add Gen12 default indirect ctx offset
...
Gen12 uses a new indirect ctx offset.
Bspec: 11740
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com >
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com >
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: https://patchwork.freedesktop.org/patch/msgid/20190817093902.2171-28-lucas.demarchi@intel.com
2019-08-20 14:23:45 +01:00