Dave Stevenson
00aedfa459
dt-bindings: Add compatible for BCM2711 DSI1
...
DSI1 on BCM2711 doesn't require the DMA workaround that is used
on BCM2835/6/7, therefore it needs a new compatible string.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://patchwork.freedesktop.org/patch/msgid/20201203132543.861591-7-maxime@cerno.tech
2020-12-07 10:33:30 +01:00
Dave Stevenson
4b265fe11f
drm/vc4: dsi: Add support for DSI0
...
DSI0 was partially supported, but didn't register with the main
driver, and the code was inconsistent as to whether it checked
port == 0 or port == 1.
Add compatible string and other support to make it consistent.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://patchwork.freedesktop.org/patch/msgid/20201203132543.861591-6-maxime@cerno.tech
2020-12-07 10:33:28 +01:00
Maxime Ripard
d1d195ce26
drm/vc4: dsi: Introduce a variant structure
...
Most of the differences between DSI0 and DSI1 are handled through the
ID. However, the BCM2711 DSI is going to introduce one more variable to
the mix and will break some expectations of the earlier, simpler, test.
Let's add a variant structure that will address most of the differences
between those three controllers.
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://patchwork.freedesktop.org/patch/msgid/20201203132543.861591-5-maxime@cerno.tech
2020-12-07 10:33:25 +01:00
Maxime Ripard
dc0bf36401
drm/vc4: dsi: Use snprintf for the PHY clocks instead of an array
...
The DSI clocks setup function has been using an array to store the clock
name of either the DSI0 or DSI1 blocks, using the port ID to choose the
proper one.
Let's switch to an snprintf call to do the same thing and simplify the
array a bit.
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://patchwork.freedesktop.org/patch/msgid/20201203132543.861591-4-maxime@cerno.tech
2020-12-07 10:33:22 +01:00
Dave Stevenson
e02d5c43f2
drm/vc4: dsi: Correct DSI register definition
...
The DSI1_PHY_AFEC0_PD_DLANE1 and DSI1_PHY_AFEC0_PD_DLANE3 register
definitions were swapped, so trying to use more than a single data
lane failed as lane 1 would get powered down.
(In theory a 4 lane device would work as all lanes would remain
powered).
Correct the definitions.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://patchwork.freedesktop.org/patch/msgid/20201203132543.861591-3-maxime@cerno.tech
2020-12-07 10:33:20 +01:00
Maxime Ripard
51f4fcd9c4
drm/vc4: drv: Remove the DSI pointer in vc4_drv
...
That pointer isn't used anywhere, so there's no point in keeping it.
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://patchwork.freedesktop.org/patch/msgid/20201203132543.861591-2-maxime@cerno.tech
2020-12-07 10:33:01 +01:00
Maxime Ripard
e2f9b2edf7
drm/vc4: hdmi: Don't poll for the infoframes status on setup
...
The infoframes are sent at a regular interval as a data island packet,
so we don't need to wait for them to be sent when we're setting them up.
However, we do need to poll when we're enabling since the we can't
update the packet RAM until it has been sent.
Let's add a boolean flag to tell whether we want to poll or not to
support both cases.
Suggested-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201203074624.721559-1-maxime@cerno.tech
2020-12-07 10:30:47 +01:00
Linus Walleij
47b1adc1d2
drm/panel: s6e63m0: Fix init sequence again
...
The DSI version of the panel behaved instable and close
scrutiny of the vendor driver from the Samsung
GT-S8190 shows a different initialization sequence for
the DSI mode panel than the DPI mode panel.
Make the initialization depend on whether we are in
DSI or DPI mode and handle the differences.
After this the panel on the GT-I8190 becomes much more
stable.
Also spell out some more custom DCS commands found in
the vendor source code to cut down a bit on magic
where we can.
Fixes: f0aee45ffc ("drm/panel: s6e63m0: Fix init sequence")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Cc: Stephan Gerhold <stephan@gerhold.net >
Link: https://patchwork.freedesktop.org/patch/msgid/20201205122229.1952980-1-linus.walleij@linaro.org
2020-12-06 00:58:45 +01:00
Linus Walleij
2abb0b994d
dt-bindings: display: mcde: Convert to YAML schema
...
This moves the MCDE bindings over to using the YAML schema
to describe the ST-Ericsson MCDE display controller,
making use of the generic DSI controller schema.
In the process we correct an error in the old text bindings:
the clocks for the SDI host controllers were specified as
part of the main MCDE component while they should be
specified in the DSI host controller subnodes. This was
a leftover from an earlier iteration of the first patch
series adding the MCDE.
We also add the "port" node, we will use this when adding
LCD panels using the direct parallel interface DPI instead
of DSI.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Reviewed-by: Rob Herring <robh@kernel.org >
Cc: devicetree@vger.kernel.org
Link: https://patchwork.freedesktop.org/patch/msgid/20201115185145.566772-1-linus.walleij@linaro.org
2020-12-06 00:46:26 +01:00
Sam Ravnborg
630a159a0b
video: fbdev: cirrusfb: Fix kernel-doc and set but not used warnings
...
Fix warnings:
- drop kernel-doc for the two debug functions to avoid the warnings
- delete unused code
v2:
- Updated subject (Lee)
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Thomas Zimemrmann <tzimmermann@suse.de >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Saeed Mirzamohammadi <saeed.mirzamohammadi@oracle.com >
Cc: Jani Nikula <jani.nikula@intel.com >
Cc: Mike Rapoport <rppt@kernel.org >
Cc: Lee Jones <lee.jones@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201128224114.1033617-28-sam@ravnborg.org
2020-12-05 21:16:02 +01:00
Sam Ravnborg
5a15468b72
video: fbdev: uvesafb: Fix string related warnings
...
Two W=1 string related warnings.
- Using strncpy to copy string without null-termination generates a
warning. Use memcpy to copy only the relevant chars
- Fix a potential bug with a very long string, subtract one from the
length to make room for the termination null.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Michal Januszewski <spock@gentoo.org >
Cc: linux-fbdev@vger.kernel.org
Link: https://patchwork.freedesktop.org/patch/msgid/20201128224114.1033617-27-sam@ravnborg.org
2020-12-05 21:01:36 +01:00
Sam Ravnborg
ab2b29e64e
video: fbdev: s3c-fb: Fix kernel-doc and set but not used warnings
...
Fix several W=1 warnings
- Updated kernel-doc as needed
- Deleted unused local variable, it was assigned but never used
v2:
- Updated subject (Lee)
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Jingoo Han <jingoohan1@gmail.com >
Cc: linux-fbdev@vger.kernel.org
Cc: Lee Jones <lee.jones@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201128224114.1033617-25-sam@ravnborg.org
2020-12-05 21:01:04 +01:00
Sam Ravnborg
c96da175ba
video: fbdev: omapfb: Fix set but not used warnings in dsi
...
Fix several W=1 warnings.
This removes unused code and avoids an assignment by moving
the use inside the conditional block.
The register read FLD_GET(r, 15, 8) could be dropped as it was done a
few lines before too.
v2:
- Updated subject (Lee)
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Aditya Pakki <pakki001@umn.edu >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com >
Cc: Lee Jones <lee.jones@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201128224114.1033617-23-sam@ravnborg.org
2020-12-05 21:00:09 +01:00
Arnd Bergmann
98fdd0042c
drm/kmb: fix array bounds warning
...
gcc warns about an out-of-bounds access when the using nonzero
values for 'plane_id' on kmb->plane_status:
drivers/gpu/drm/kmb/kmb_plane.c: In function 'kmb_plane_atomic_disable':
drivers/gpu/drm/kmb/kmb_plane.c:128:20: warning: array subscript 3 is above array bounds of 'struct layer_status[1]' [-Warray-bounds]
128 | kmb->plane_status[plane_id].ctrl = LCD_CTRL_GL2_ENABLE;
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~
drivers/gpu/drm/kmb/kmb_plane.c:125:20: warning: array subscript 2 is above array bounds of 'struct layer_status[1]' [-Warray-bounds]
125 | kmb->plane_status[plane_id].ctrl = LCD_CTRL_GL1_ENABLE;
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~
drivers/gpu/drm/kmb/kmb_plane.c:122:20: warning: array subscript 1 is above array bounds of 'struct layer_status[1]' [-Warray-bounds]
122 | kmb->plane_status[plane_id].ctrl = LCD_CTRL_VL2_ENABLE;
Having the array truncated to one entry seems intentional, so add
a range check before indexing it to make it clearer what is going
on and shut up the warning.
I received the warning from the kernel test robot after a private
patch that turns on Warray-bounds unconditionally.
Fixes: 7f7b96a8a0 ("drm/kmb: Add support for KeemBay Display")
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: Arnd Bergmann <arnd@arndb.de >
Reviewed-by: Anitha Chrisanthus <anitha.chrisanthus@intel.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201129200927.1854104-1-arnd@kernel.org
2020-12-05 20:57:50 +01:00
Douglas Anderson
9dbf1a4516
drm: panel: add flags to BOE NV110WTM-N61
...
I forgot to add these when posting up the support for BOE
NV110WTM-N61. Add them now.
Fixes: a96ee0f6b5 ("drm: panel: simple: Add BOE NV110WTM-N61")
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Cc: Douglas Anderson <dianders@chromium.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: Thierry Reding <thierry.reding@gmail.com >
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201201125554.v2.1.I8a7bfc0966e803ab91001c9e6d01a736950c4981@changeid
2020-12-05 20:25:14 +01:00
Douglas Anderson
a00fa42858
drm: panel: Fully transition panel_desc kerneldoc to inline style
...
In commit 131f909ad5 ("drm: panel: simple: Fixup the struct
panel_desc kernel doc") I transitioned the more deeply nested
kerneldoc comments into the inline style. Apparently it is desirable
to continue the job and move _everything_ in this struct to inline.
Let's do it.
While doing this, we also add a short summary for the whole struct to
fix a warning when we run with extra warnings, AKA:
scripts/kernel-doc -v -rst drivers/gpu/drm/panel/panel-simple.c
The warning was:
drivers/gpu/drm/panel/panel-simple.c:42: warning: missing initial short description on line:
* struct panel_desc
Suggested-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Cc: Douglas Anderson <dianders@chromium.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: Thierry Reding <thierry.reding@gmail.com >
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201201125822.1.I3c4191336014bd57364309439e56f600c94bb12b@changeid
2020-12-05 20:23:38 +01:00
Laurent Pinchart
1cdd3f739f
drm: Remove drmm_add_final_kfree() declaration from public headers
...
The drmm_add_final_kfree() function is declared in the
include/drm/drm_managed.h public header, but has become an internal API
not exposed to drivers. Drop it from drm_managed.h as it's already
declared in drm_internal.h.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201204092932.21636-1-laurent.pinchart+renesas@ideasonboard.com
2020-12-05 20:01:12 +01:00
Tian Tao
552a77bab3
drm/hisilicon: Delete the entire file hibmc_ttm.c
...
Delete the entire file hibmc_ttm.c. drmm_vram_helper_init() can be
called directly from hibmc_load(). hibmc_dumb_create() and
hibmc_mode_funcs can go to hibmc_drm_drv.c
v2:
change Deletted to Delete
Signed-off-by: Tian Tao <tiantao6@hisilicon.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/1607044999-47666-13-git-send-email-tiantao6@hisilicon.com
2020-12-04 06:02:22 -05:00
Tian Tao
717ea76add
drm/hisilicon: Use managed VRAM-helper initialization
...
updated to use drmm_vram_helper_init()
Signed-off-by: Tian Tao <tiantao6@hisilicon.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/1606964953-24309-1-git-send-email-tiantao6@hisilicon.com
2020-12-04 06:01:37 -05:00
Krzysztof Kozlowski
9f941375aa
drm/ingenic: depend on COMMON_CLK to fix compile tests
...
The Ingenic DRM uses Common Clock Framework thus it cannot be built on
platforms without it (e.g. compile test on MIPS with RALINK and
SOC_RT305X):
/usr/bin/mips-linux-gnu-ld: drivers/gpu/drm/ingenic/ingenic-drm-drv.o: in function `ingenic_drm_bind.isra.0':
ingenic-drm-drv.c:(.text+0x1600): undefined reference to `clk_get_parent'
/usr/bin/mips-linux-gnu-ld: ingenic-drm-drv.c:(.text+0x16b0): undefined reference to `clk_get_parent'
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org >
Signed-off-by: Paul Cercueil <paul@crapouillou.net >
Link: https://patchwork.freedesktop.org/patch/msgid/20201116175301.402787-2-krzk@kernel.org
2020-12-04 10:05:25 +00:00
Chuhong Yuan
0a260e731d
drm/fb-helper: Add missed unlocks in setcmap_legacy()
...
setcmap_legacy() does not call drm_modeset_unlock_all() in some exits,
add the missed unlocks with goto to fix it.
Fixes: 964c60063b ("drm/fb-helper: separate the fb_setcmap helper into atomic and legacy paths")
Signed-off-by: Chuhong Yuan <hslester96@gmail.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20201203144248.418281-1-hslester96@gmail.com
2020-12-03 16:25:37 +01:00
Dan Carpenter
15ccc39b3a
gma500: clean up error handling in init
...
The main problem with this error handling was that it didn't clean up if
i2c_add_numbered_adapter() failed. This code is pretty old, and doesn't
match with today's checkpatch.pl standards so I took the opportunity to
tidy it up a bit. I changed the NULL comparison, and removed the
WARNING message if kzalloc() fails and updated the label names.
Fixes: 1b082ccf59 ("gma500: Add Oaktrail support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/X8ikkAqZfnDO2lu6@mwanda
2020-12-03 10:50:57 +01:00
Tian Tao
e440124707
drm/hisilicon: Use the new api devm_drm_irq_install
...
Use devm_drm_irq_install to register interrupts so that
drm_irq_uninstall is not called when hibmc is removed.
Signed-off-by: Tian Tao <tiantao6@hisilicon.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/1606901212-8214-4-git-send-email-tiantao6@hisilicon.com
2020-12-03 03:57:49 -05:00
Tian Tao
d96bc380a5
drm/irq: Add the new api to install irq
...
Add new api devm_drm_irq_install() to register interrupts,
no need to call drm_irq_uninstall() when the drm module is removed.
Signed-off-by: Tian Tao <tiantao6@hisilicon.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/1606901212-8214-3-git-send-email-tiantao6@hisilicon.com
2020-12-03 03:57:15 -05:00
Tian Tao
770729f77d
drm/hisilicon: Code refactoring for hibmc_drm_drv
...
Use the devm_drm_dev_alloc provided by the drm framework to alloc
a structure hibmc_drm_private.
Signed-off-by: Tian Tao <tiantao6@hisilicon.com >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/1606901212-8214-2-git-send-email-tiantao6@hisilicon.com
2020-12-03 03:55:15 -05:00
Simon Ser
a7e2e1c504
drm: document that user-space should force-probe connectors
...
It seems like we can't have nice things, so let's just document the
disappointing behaviour instead.
The previous version assumed the kernel would perform the probing work
when appropriate, however this is not the case today. Update the
documentation to reflect reality.
v2:
- Improve commit message to explain why this change is made (Pekka)
- Keep the bit about flickering (Daniel)
- Explain when user-space should force-probe, and when it shouldn't (Daniel)
Signed-off-by: Simon Ser <contact@emersion.fr >
Fixes: 2ac5ef3b23 ("drm: document drm_mode_get_connector")
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com >
Cc: Ville Syrjala <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/AxqLnTAsFCRishOVB5CLsqIesmrMrm7oytnOVB7oPA@cp7-web-043.plabs.ch
2020-12-02 14:37:03 +01:00
Gurchetan Singh
36549848ed
drm/virtio: consider dma-fence context when signaling
...
This an incremental refactor towards multiple dma-fence contexts
in virtio-gpu. Since all fences are still allocated using
&virtio_gpu_fence_driver.context, nothing should break and every
processed fence will be signaled.
The overall idea is every 3D context can allocate a number of
dma-fence contexts. Each dma-fence context refers to it's own
timeline.
For example, consider the following case where virgl submits
commands to the GPU (fence ids 1, 3) and does a metadata query with
the CPU (fence id 5). In a different process, gfxstream submits
commands to the GPU (fence ids 2, 4).
fence_id (&dma_fence.seqno) | 1 2 3 4 5
----------------------------------|-----------
fence_ctx 0 (virgl gpu) | 1 3
fence_ctx 1 (virgl metadata query)| 5
fence_ctx 2 (gfxstream gpu) | 2 4
With multiple fence contexts, we can wait for the metadata query
to finish without waiting for the virgl gpu to finish. virgl gpu
does not have to wait for gfxstream gpu. The fence id still is the
monotonically increasing sequence number, but it's only revelant to
the specific dma-fence context.
To fully enable this feature, we'll need to:
- have each 3d context allocate a number of fence contexts. Not
too hard with explicit context initialization on the horizon.
- have guest userspace specify fence context when performing
ioctls.
- tag each fence emitted to the host with the fence context
information. virtio_gpu_ctrl_hdr has padding + flags available,
so that should be easy.
This change goes in the direction specified above, by:
- looking up the virtgpu_fence given a fence_id
- signalling all prior fences in a given context
- signalling current fence
v2: fix grammar in comment
v3: add r-b tags
Reviewed-by: Anthoine Bourgeois <anthoine.bourgeois@gmail.com >
Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20201201021623.619-3-gurchetansingh@chromium.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
2020-12-02 11:48:14 +01:00
Gurchetan Singh
b9662c3a54
drm/virtio: rework virtio_fence_signaled
...
virtio_gpu_fence_event_process sets the last_fence_id and
subsequently calls dma_fence_signal_locked(..).
dma_fence_signal_locked(..) sets DMA_FENCE_FLAG_SIGNALED_BIT,
which is actually checked before &dma_fence_ops.(*signaled) is
called.
The check for last_fence_id is therefore a bit redundant, and
it will not be sufficient to check the last_fence_id for multiple
synchronization timelines. Remove it.
v3: add r-b tags
Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org >
Reviewed-by: Anthoine Bourgeois <anthoine.bourgeois@gmail.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20201201021623.619-2-gurchetansingh@chromium.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
2020-12-02 11:48:14 +01:00
Gurchetan Singh
41a90202cd
drm/virtio: virtio_{blah} --> virtio_gpu_{blah}
...
virtio_gpu typically uses the prefix virtio_gpu, but there are
a few places where the virtio prefix is used. Modify this for
consistency.
v3: add r-b tags
Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org >
Reviewed-by: Anthoine Bourgeois <anthoine.bourgeois@gmail.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20201201021623.619-1-gurchetansingh@chromium.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
2020-12-02 11:48:14 +01:00
Christian König
b73cd1e2eb
drm/ttm: stop destroying pinned ghost object
...
Daniel added a warning for this, but we were abusing that behavior here.
Signed-off-by: Christian König <christian.koenig@amd.com >
Fixes: 57fcd550eb ("drm/ttm: Warn on pinning without holding a reference")
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/series/84456/
2020-12-01 20:23:18 +01:00
Daniel Vetter
551620f2a3
drm/nouveau: Drop mutex_lock_nested for atomic
...
Purely conjecture, but I think the original locking inversion with the
legacy page flip code between flipping and ttm's bo move function
shoudn't exist anymore with atomic: With atomic the bo pinning and
actual modeset commit is completely separated in the code patsh.
This annotation was originally added in
commit 060810d7ab
Author: Ben Skeggs <bskeggs@redhat.com >
Date: Mon Jul 8 14:15:51 2013 +1000
drm/nouveau: fix locking issues in page flipping paths
due to
commit b580c9e2b7
Author: Maarten Lankhorst <m.b.lankhorst@gmail.com >
Date: Thu Jun 27 13:48:18 2013 +0200
drm/nouveau: make flipping lockdep safe
Acked-by: Ben Skeggs <bskeggs@redhat.com >
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Cc: Maarten Lankhorst <m.b.lankhorst@gmail.com >
Cc: Ben Skeggs <bskeggs@redhat.com >
Cc: Dave Airlie <airlied@gmail.com >
Cc: nouveau@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20201127163528.2221671-1-daniel.vetter@ffwll.ch
2020-12-01 18:27:23 +01:00
Jialin Zhang
6926872ae2
drm/gma500: Fix error return code in psb_driver_load()
...
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.
Fixes: 5c49fd3aa0 ("gma500: Add the core DRM files and headers")
Reported-by: Hulk Robot <hulkci@huawei.com >
Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20201130020216.1906141-1-zhangjialin11@huawei.com
2020-12-01 18:25:46 +01:00
Christian König
5cf8290426
drm/ttm/drivers: remove unecessary ttm_module.h include v2
...
ttm_module.h deals with internals of TTM and should never
be include outside of it.
v2: also move the file around
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/404885/
2020-12-01 17:43:46 +01:00
Sam Ravnborg
025ae8255d
video: fbdev: nvidia: Fix set but not used warnings
...
Fix warnings by deleting unused code. The register reads are
kept as it is unknown if there are any hidden side-effects.
v2:
- Update subject (Lee)
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Antonino Daplas <adaplas@gmail.com >
Cc: linux-fbdev@vger.kernel.org
Cc: Lee Jones <lee.jones@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201128224114.1033617-21-sam@ravnborg.org
2020-11-30 20:21:54 +01:00
Sam Ravnborg
4e4b1d92e2
video: fbdev: neofb: Fix set but not used warning for CursorMem
...
Fix W=1 warnings by removing unused code
v2:
- Updated subject (Lee)
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: Andrew Morton <akpm@linux-foundation.org >
Cc: Evgeny Novikov <novikov@ispras.ru >
Cc: Jani Nikula <jani.nikula@intel.com >
Cc: Mike Rapoport <rppt@kernel.org >
Cc: Lee Jones <lee.jones@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201128224114.1033617-16-sam@ravnborg.org
2020-11-30 20:21:08 +01:00
Sam Ravnborg
57e4bc8a48
video: fbdev: sstfb: Updated logging to fix set but not used warnings
...
Fix set but not used warnings by introducing no_printk variants
for the internal logging system for this driver.
Fix a new warning that popped up now that logging was checked for
correct printf format strings.
A more invasive fix had been to replace all the internal logging with
standard logging primitives - thats for another day.
v2:
- Update subject (Lee)
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com >
Cc: Alex Dewar <alex.dewar90@gmail.com >
Cc: Jani Nikula <jani.nikula@intel.com >
Cc: linux-fbdev@vger.kernel.org
Cc: Lee Jones <lee.jones@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201128224114.1033617-20-sam@ravnborg.org
2020-11-30 20:04:59 +01:00
Sam Ravnborg
9b028f48e7
video: fbdev: mx3fb: Fix kernel-doc, set but not used and string warnings
...
Fix W=1 warnings:
- Fix kernel-doc
- Drop unused code/variables
- Use memcpy to copy a string without zero-termination
strncpy() generates a warning
v2:
- Updated subject (Lee)
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: Jani Nikula <jani.nikula@intel.com >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Xiaofei Tan <tanxiaofei@huawei.com >
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Lee Jones <lee.jones@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201128224114.1033617-19-sam@ravnborg.org
2020-11-30 20:04:56 +01:00
Sam Ravnborg
2f71315eaa
video: fbdev: tgafb: Fix kernel-doc and set but not used warnings
...
Fix W=1 warnings:
- Fix kernel-doc
- Drop unused code
v2:
- Updated subject (Lee)
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: Jani Nikula <jani.nikula@intel.com >
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Joe Perches <joe@perches.com >
Cc: Lee Jones <lee.jones@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201128224114.1033617-18-sam@ravnborg.org
2020-11-30 20:04:50 +01:00
Sam Ravnborg
b47e6ca3c0
video: fbdev: pm2fb: Fix kernel-doc warnings
...
Fixed a few kernel-doc issues to fix the warnings.
v2:
- Updated subject (Lee)
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org >
Cc: Randy Dunlap <rdunlap@infradead.org >
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com >
Cc: Jani Nikula <jani.nikula@intel.com >
Cc: Lee Jones <lee.jones@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201128224114.1033617-15-sam@ravnborg.org
2020-11-30 20:04:43 +01:00
Sam Ravnborg
5c7ddcc801
video: fbdev: riva: Fix kernel-doc and set but not used warnings
...
Fix W=1 warnings:
- Fix kernel-doc
- Drop unused variables/code
v2:
- Updated subject (Lee)
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Antonino Daplas <adaplas@gmail.com >
Cc: linux-fbdev@vger.kernel.org
Cc: Lee Jones <lee.jones@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201128224114.1033617-14-sam@ravnborg.org
2020-11-30 20:04:36 +01:00
Sam Ravnborg
f686b34c93
video: fbdev: tdfx: Fix set but not used warning in att_outb()
...
The tmp variable was assigned but the result was never used,
so delete the tmp variable.
v2:
- Update subject (Lee)
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: Jani Nikula <jani.nikula@intel.com >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Lee Jones <lee.jones@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201128224114.1033617-13-sam@ravnborg.org
2020-11-30 20:04:30 +01:00
Sam Ravnborg
9403c18953
video: fbdev: via: Fix set but not used warning for mode_crt_table
...
Fix warning by deleting the variable. The function call
viafb_get_best_mode() was verified to have no side-effects,
and thus could be dropped too.
v2:
- Update subject (Lee)
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de >
Cc: linux-fbdev@vger.kernel.org
Cc: Lee Jones <lee.jones@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201128224114.1033617-12-sam@ravnborg.org
2020-11-30 20:04:24 +01:00
Sam Ravnborg
1a608758df
video: fbdev: sis: Fix set but not used warnings in sis_main
...
Fix warnings by dropping unused variable and the
unused assignments.
v2:
- Update subject (Lee)
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Thomas Winischhofer <thomas@winischhofer.net >
Cc: Lee Jones <lee.jones@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201128224114.1033617-11-sam@ravnborg.org
2020-11-30 20:04:17 +01:00
Sam Ravnborg
2a74e8682a
video: fbdev: sis: Fix set but not used warnings in init.c
...
Fix "set but not used" warnings by removing the code the assign the
variables and the definition of the variables.
A register read is kept as it may have unknown side-effects.
This removes a lot of unused code - which is always a good thing to do.
v2:
- Updated subject (Lee)
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Thomas Winischhofer <thomas@winischhofer.net >
Cc: Lee Jones <lee.jones@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201128224114.1033617-10-sam@ravnborg.org
2020-11-30 20:04:08 +01:00
Sam Ravnborg
e8a254362d
video: fbdev: sis: Fix defined but not used warning of SiS_TVDelay
...
Fix W=1 warning by commenting unused SiS_TVDelay* variables.
The SiS_TVDelay* variables seem to contain some magic numbers
so looks like data worth keeping around but not as code we build.
v2:
- Update subject (Lee)
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Thomas Winischhofer <thomas@winischhofer.net >
Cc: Lee Jones <lee.jones@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201128224114.1033617-9-sam@ravnborg.org
2020-11-30 20:02:50 +01:00
Sam Ravnborg
50b82a2d69
video: fbdev: sis: Fix defined but not used warnings
...
init.h defines static symbols, so it should only be included
once. Drop the include from sis.h as it is not needed.
This fixes a lot of warnings seen with a W=1 build.
v2:
- Update subject (Lee)
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Thomas Winischhofer <thomas@winischhofer.net >
Cc: Lee Jones <lee.jones@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201128224114.1033617-8-sam@ravnborg.org
2020-11-30 19:29:40 +01:00
Sam Ravnborg
0556461376
video: fbdev: aty: Fix set but not used warnings in mach64_ct
...
Fix W=1 warnings about variables assigned but never used.
- One variable is only used when CONFIG_FB_ATY_GENERIC_LCD is defined
Fix so variable is only defined with CONFIG_FB_ATY_GENERIC_LCD
- Several variables was only assigned by a call to aty_ld_le32().
Drop the variables but keep the call to aty_ld_le32() as it may
have unexpected side-effects.
v2:
- Updated subject (Lee)
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Lee Jones <lee.jones@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201128224114.1033617-7-sam@ravnborg.org
2020-11-30 19:29:19 +01:00
Sam Ravnborg
5800545626
video: fbdev: aty: Fix set but not used warnings
...
Fix W=1 warnings about variables assigned but never used.
- Drop variables that were set but never used
- Make variable definition conditional on ATARI
v2:
- Fix m68k build error (kernel test robot)
- Improve subject (Lee Jones)
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Reported-by: kernel test robot <lkp@intel.com > # m68k build fix
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Lee Jones <lee.jones@linaro.org >
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Joe Perches <joe@perches.com >
Cc: Vaibhav Gupta <vaibhavgupta40@gmail.com >
Cc: Jason Yan <yanaijie@huawei.com >
Cc: Randy Dunlap <rdunlap@infradead.org >
Cc: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201128224114.1033617-6-sam@ravnborg.org
2020-11-30 19:28:35 +01:00
Sam Ravnborg
288b23719c
video: fbdev: aty: Delete unused variable in radeon_monitor
...
Fix warning about variable that is asssigned a value but never used.
The variable was indeed never used so delete it.
Keep the call to radeon_probe_i2c_connector() as it may have
side-effects. It is unlikely but I could not verify that is was safe to
drop the call.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org >
Cc: linux-fbdev@vger.kernel.org
Link: https://patchwork.freedesktop.org/patch/msgid/20201128224114.1033617-5-sam@ravnborg.org
2020-11-30 19:28:09 +01:00
Christian König
c67e62790f
drm/prime: split array import functions v4
...
Mapping the imported pages of a DMA-buf into an userspace process
doesn't work as expected.
But we have reoccurring requests on this approach, so split the
functions for this and document that dma_buf_mmap() needs to be used
instead.
v2: split it into two functions
v3: rebased on latest changes
v4: update commit message a bit
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/403838/
2020-11-30 15:00:45 +01:00