Sam Ravnborg
ac4f24c213
drm: drm_device.h: update comments to kernel-doc style
...
Updated comment style to kernel-doc format in drm_device.h
In struct drm_device there are 12 struct members without doc:
- registered
- filelist_mutex
- filelist
- irq
- vbl_lock
- event_lock
- hose
- sigdata
- sigdata.context
- sigdata.lock
- agp_buffer_map
- agp_buffer_token
They all need proper documentation, a task left for someone
that knows their usage.
drm_device is not plugged into Documentation/gpu/drm-internals.rst
as this would create a new load of warnings.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Maxime Ripard <maxime.ripard@bootlin.com >
Cc: Sean Paul <sean@poorly.run >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: Jonathan Corbet <corbet@lwn.net >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20190108192939.15255-2-sam@ravnborg.org
2019-01-09 22:11:02 +01:00
Shayenne Moura
4fb6bb8924
drm: i915: Cleanup drm_display_mode print str
...
This patch adjust the print string of drm_display_mode object
to remove drm_mode_object dependency in i915 files.
It modifies the print style to standardize the use of DRM_MODE_FMT.
Signed-off-by: Shayenne Moura <shayenneluzmoura@gmail.com >
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/087e07a388c7c65b6d0ec50db069640e4eb32fdf.1545308167.git.shayenneluzmoura@gmail.com
2019-01-09 22:07:43 +01:00
Shayenne Moura
5e8345a01f
drm: sti: Cleanup drm_display_mode print str
...
This patch adjust the print string of drm_display_mode object
to remove drm_mode_object dependency in sti files.
Signed-off-by: Shayenne Moura <shayenneluzmoura@gmail.com >
Acked-by: Benjamin Gaignard <benjamin;gaignard@linaro.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/c079f461575aece9d598784da25aaadc711a2729.1545308167.git.shayenneluzmoura@gmail.com
2019-01-09 22:07:21 +01:00
Shayenne Moura
e343c12348
drm: meson: Cleanup on drm_display_mode print str
...
This patch adjust the print string of drm_display_mode object
to remove drm_mode_object dependency in meson files.
Signed-off-by: Shayenne Moura <shayenneluzmoura@gmail.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/7017942bbbb3e0e6c1e2bd854ea5a5f461784ac4.1545308167.git.shayenneluzmoura@gmail.com
2019-01-09 22:07:15 +01:00
Shayenne Moura
c39ff7ea78
drm: omapdrm: Cleanup drm_display_mode print str
...
This patch adjust the print string of drm_display_mode object
to remove drm_mode_object dependency in omapdrm files.
Signed-off-by: Shayenne Moura <shayenneluzmoura@gmail.com >
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/cb6079fa6de6fda8d865a1d2a61d7cf10019ae88.1545308167.git.shayenneluzmoura@gmail.com
2019-01-09 22:07:15 +01:00
Gustavo A. R. Silva
d4b9dd5007
qxl: Use struct_size() in kzalloc()
...
One of the more common cases of allocation size calculations is finding the
size of a structure that has a zero-sized array at the end, along with memory
for some number of elements for that array. For example:
struct foo {
int stuff;
void *entry[];
};
instance = kzalloc(sizeof(struct foo) + sizeof(void *) * count, GFP_KERNEL);
Instead of leaving these open-coded and prone to type mistakes, we can now
use the new struct_size() helper:
instance = kzalloc(struct_size(instance, entry, count), GFP_KERNEL);
This code was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20190108162152.GA25361@embeddedor
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
2019-01-09 09:38:49 +01:00
Ezequiel Garcia
d516e75c71
drm/virtio: Drop deprecated load/unload initialization
...
Move the code around so the driver is probed the bus
.probe and removed from the bus .remove callbacks.
This commit is just a cleanup and shouldn't affect
functionality.
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20190108145930.15080-1-ezequiel@collabora.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
2019-01-09 09:38:49 +01:00
Peter Wu
00eb5b0da8
drm/fb-helper: fix leaks in error path of drm_fb_helper_fbdev_setup
...
After drm_fb_helper_fbdev_setup calls drm_fb_helper_init,
"dev->fb_helper" will be initialized (and thus drm_fb_helper_fini will
have some effect). After that, drm_fb_helper_initial_config is called
which may call the "fb_probe" driver callback.
This driver callback may call drm_fb_helper_defio_init (as is done by
drm_fb_helper_generic_probe) or set a framebuffer (as is done by bochs)
as documented. These are normally cleaned up on exit by
drm_fb_helper_fbdev_teardown which also calls drm_fb_helper_fini.
If an error occurs after "fb_probe", but before setup is complete, then
calling just drm_fb_helper_fini will leak resources. This was triggered
by df2052cc92 ("bochs: convert to drm_fb_helper_fbdev_setup/teardown"):
[ 50.008030] bochsdrmfb: enable CONFIG_FB_LITTLE_ENDIAN to support this framebuffer
[ 50.009436] bochs-drm 0000:00:02.0: [drm:drm_fb_helper_fbdev_setup] *ERROR* fbdev: Failed to set configuration (ret=-38)
[ 50.011456] [drm] Initialized bochs-drm 1.0.0 20130925 for 0000:00:02.0 on minor 2
[ 50.013604] WARNING: CPU: 1 PID: 1 at drivers/gpu/drm/drm_mode_config.c:477 drm_mode_config_cleanup+0x280/0x2a0
[ 50.016175] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G T 4.20.0-rc7 #1
[ 50.017732] EIP: drm_mode_config_cleanup+0x280/0x2a0
...
[ 50.023155] Call Trace:
[ 50.023155] ? bochs_kms_fini+0x1e/0x30
[ 50.023155] ? bochs_unload+0x18/0x40
This can be reproduced with QEMU and CONFIG_FB_LITTLE_ENDIAN=n.
Link: https://lkml.kernel.org/r/20181221083226.GI23332@shao2-debian
Link: https://lkml.kernel.org/r/20181223004315.GA11455@al
Fixes: 8741216396 ("drm/fb-helper: Add drm_fb_helper_fbdev_setup/teardown()")
Reported-by: kernel test robot <rong.a.chen@intel.com >
Cc: Noralf Trønnes <noralf@tronnes.org >
Signed-off-by: Peter Wu <peter@lekensteyn.nl >
Reviewed-by: Noralf Trønnes <noralf@tronnes.org >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20181223005507.28328-1-peter@lekensteyn.nl
2019-01-08 18:47:46 +01:00
Noralf Trønnes
6e1490cf43
drm/fb-helper: generic: Fix setup error path
...
If register_framebuffer() fails during fbdev setup we will leak the
framebuffer, the GEM buffer and the shadow buffer for defio. This is
because drm_fb_helper_fbdev_setup() just calls drm_fb_helper_fini() on
error not taking into account that register_framebuffer() can fail.
Since the generic emulation uses DRM client for its framebuffer and
backing buffer in addition to a shadow buffer, it's necessary to open code
drm_fb_helper_fbdev_setup() to properly handle the error path.
Error cleanup is removed from .fb_probe and is handled by one function for
all paths.
Fixes: 9060d7f493 ("drm/fb-helper: Finish the generic fbdev emulation")
Reported-by: Peter Wu <peter@lekensteyn.nl >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Acked-by: Gerd Hoffmann <kraxel@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190105181846.26495-1-noralf@tronnes.org
2019-01-08 18:46:16 +01:00
Gerd Hoffmann
cb66c6daa5
drm/virtio: drop virtio_gpu_fence_cleanup()
...
Just call drm_fence_put directly instead.
Also set vgfb->fence to NULL after dropping the reference.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20181219122708.4586-4-kraxel@redhat.com
2019-01-08 12:00:01 +01:00
Gerd Hoffmann
6a01d277ac
drm/virtio: fix pageflip flush
...
Sending the flush command only makes sense if we actually have
a framebuffer attached to the scanout (handle != 0).
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20181219122708.4586-3-kraxel@redhat.com
2019-01-08 12:00:00 +01:00
Gerd Hoffmann
3630c2a24f
drm/virtio: log error responses
...
If we got an error response code from the host, print it to the log.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20181219122708.4586-2-kraxel@redhat.com
2019-01-08 11:59:59 +01:00
Ezequiel Garcia
edde9fc58e
drm/virtio: Add missing virtqueue reset
...
As per the VirtIO spec, the virtqueues must be reset during cleanup
(see "3.3.1 Driver Requirements: Device Cleanup").
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com >
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20190102175507.4653-2-ezequiel@collabora.com
2019-01-08 11:45:28 +01:00
Ezequiel Garcia
29cd2e2dac
drm/virtio: Remove incorrect kfree()
...
The virtio_gpu_output is a member of struct virtio_gpu_device
and is not a dynamically-allocated chunk, so it's wrong to kfree() it.
Removing it fixes a memory corruption BUG() that can be triggered
when the virtio-gpu driver is removed.
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com >
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20190102175507.4653-1-ezequiel@collabora.com
2019-01-08 11:45:19 +01:00
Daniel Vetter
be5cadc7e7
drm/todo: Better defio support in the generic fbdev emulation
...
The current one essentially means you need CMA or a vmalloc backed
object, which makes fbdev emulation a special case.
Since implementing this will be quite a bit of work, capture the idea
in a TODO.
Cc: Noralf Trønnes <noralf@tronnes.org >
Acked-by: Noralf Trønnes <noralf@tronnes.org >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190107102238.7789-1-daniel.vetter@ffwll.ch
2019-01-08 09:03:52 +01:00
Maxime Ripard
1c95f662fc
Merge tag 'topic/drmp-cleanup-2019-01-02' of git://anongit.freedesktop.org/drm/drm-intel into drm-misc-next
...
Make some drm headers self-contained with includes and forward declarations
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com >
# gpg: Signature made Wed 02 Jan 2019 10:47:51 AM CET
# gpg: using RSA key 1565A65B77B0632E1124E59CD398079D26ABEE6F
# gpg: Can't check signature: No public key
From: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/87pntfl6pa.fsf@intel.com
2019-01-07 16:43:24 +01:00
YueHaibing
c39191feed
drm: Fix error handling in drm_legacy_addctx
...
'ctx->handle' is unsigned, it never less than zero.
This patch use int 'tmp_handle' to handle the err condition.
Fixes: 62968144e6 ("drm: convert drm context code to use Linux idr")
Signed-off-by: YueHaibing <yuehaibing@huawei.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20181229024907.12852-1-yuehaibing@huawei.com
2019-01-07 11:26:31 +01:00
Chris Wilson
227ad6d957
drm: Reorder set_property_atomic to avoid returning with an active ww_ctx
...
Delay the drm_modeset_acquire_init() until after we check for an
allocation failure so that we can return immediately upon error without
having to unwind.
WARNING: lock held when returning to user space!
4.20.0+ #174 Not tainted
------------------------------------------------
syz-executor556/8153 is leaving the kernel with locks still held!
1 lock held by syz-executor556/8153:
#0 : 000000005100c85c (crtc_ww_class_acquire){+.+.}, at:
set_property_atomic+0xb3/0x330 drivers/gpu/drm/drm_mode_object.c:462
Reported-by: syzbot+6ea337c427f5083ebdf2@syzkaller.appspotmail.com
Fixes: 144a7999d6 ("drm: Handle properties in the core for atomic drivers")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Sean Paul <sean@poorly.run >
Cc: David Airlie <airlied@linux.ie >
Cc: <stable@vger.kernel.org > # v4.14+
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20181230122842.21917-1-chris@chris-wilson.co.uk
2019-01-03 09:54:26 +00:00
Jani Nikula
dd7ece7f6e
drm: forward declare struct drm_file in drm_syncobj.h
...
drm_syncobj.h uses struct drm_file pointers, forward declare struct
drm_file to make the header self-contained. This prepares for dropping
drmP.h from files including drm_syncobj.h.
Switch from "" to <> includes while at it.
v2: forward declare instead of including drm_file.h (Daniel)
[Updated commit message per Laurent's review while applying.]
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20181228082815.10797-1-jani.nikula@intel.com
2019-01-02 11:38:08 +02:00
Jani Nikula
f7e271de23
drm: include types.h from drm_hdcp.h
...
drm_hdcp.h uses kernel integer types, make it self-contained by
including linux/kernel.h. This prepares for dropping drmP.h from files
including drm_hdcp.h.
[Updated commit message per Laurent's review while applying.]
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/adfc79941e827b49eb6186f317cbeff0fb365f33.1545915059.git.jani.nikula@intel.com
2019-01-02 11:38:01 +02:00
Jani Nikula
39e2367480
drm: include idr.h from drm_file.h
...
drm_file.h embeds idr structures in DRM-specific structures. Include the
corresponding header to make drm_file.h self-contained. Make it easier
to drop drmP.h includes.
[Updated commit message per Laurent's review while applying.]
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/2818b15332ab562722dfc324cf977b7eb4a04401.1545915059.git.jani.nikula@intel.com
2019-01-02 11:37:56 +02:00
Jani Nikula
5c27b9fafe
drm: include kernel.h and agp_backend.h from intel-gtt.h
...
intel-gtt.h uses kernel and agp pointers, make it self-contained by
including the relevant headers. This prepares for dropping drmP.h from
files including intel-gtt.h.
[Updated commit message per Laurent's review while applying.]
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/9414800f89d6f326c6e9173233bf6c4dee254d9a.1545915059.git.jani.nikula@intel.com
2019-01-02 11:37:47 +02:00
Jani Nikula
c76426883c
drm: un-inline drm_legacy_findmap()
...
Un-inline drm_legacy_findmap() to not depend on struct drm_device
definition within drm_legacy.h, so that a forward declaration suffices.
Also include drm_hashtab.h in drm_legacy.h to make it more
self-contained. Make it easier to drop drmP.h includes.
v2: avoid including drm_device.h by un-inlining (Daniel)
[Updated commit message per Laurent's review while applying.]
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20181228130446.22141-1-jani.nikula@intel.com
2019-01-02 11:37:11 +02:00
Sam Ravnborg
ecb2e2fd5a
drm: move DRM_IF_VERSION to drm_internal.h
...
Move DRM_IF_VERSION out of drmP.h to allow users
to get rid of the drmP include.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Maxime Ripard <maxime.ripard@bootlin.com >
Cc: Sean Paul <sean@poorly.run >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20181226210353.13993-1-sam@ravnborg.org
2018-12-27 13:08:58 +01:00
Brajeswar Ghosh
183d9dc495
drm/drm_drv.c: Remove duplicate header
...
Remove drm_crtc_internal.h which is included more than once
Signed-off-by: Brajeswar Ghosh <brajeswar.linux@gmail.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20181224143636.GA3237@hp-pavilion-15-notebook-pc-brajeswar
2018-12-27 12:46:49 +01:00
Yangtao Li
2674305a1f
dma-buf: Change to use DEFINE_SHOW_ATTRIBUTE macro
...
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20181130161101.3413-1-tiny.windzz@gmail.com
2018-12-24 11:17:04 +01:00
Gerd Hoffmann
70bce993a7
drm/bochs: add edid present check
...
Check header before trying to read the complete edid blob, to avoid the
log being spammed in case qemu has no edid support (old qemu or edid
support turned off).
Fixes: 01f23459cf drm/bochs: add edid support.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20181220101122.16153-1-kraxel@redhat.com
2018-12-20 13:25:28 +01:00
Boris Brezillon
db999538fd
drm/vc4: Attach margin props to the HDMI connector
...
Now that the plane code takes the margins setup into account, we can
safely attach margin props to the HDMI connector.
We also take care of filling AVI infoframes correctly to expose the
top/botton/left/right bar.
Note that those margin props match pretty well the
overscan_{left,right,top,bottom} properties defined in config.txt and
parsed by the VC4 firmware.
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20181206142439.10441-6-boris.brezillon@bootlin.com
2018-12-19 14:47:58 +01:00
Boris Brezillon
666e73587f
drm/vc4: Take margin setup into account when updating planes
...
Applyin margins is just a matter of scaling all planes appropriately
and adjusting the CRTC X/Y offset to account for the
left/right/top/bottom borders.
Create a vc4_plane_margins_adj() function doing that and call it from
vc4_plane_setup_clipping_and_scaling() so that we are ready to attach
margins properties to the HDMI connector.
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20181206142439.10441-5-boris.brezillon@bootlin.com
2018-12-19 14:47:58 +01:00
Boris Brezillon
6c4f52dca3
drm/connector: Allow creation of margin props alone
...
TV margins properties can only be added as part of the SDTV TV
connector properties creation, but we might need those props for HDMI
TVs too, so let's move the margins props creation in a separate
function and expose it to drivers.
We also add an helper to attach margins props to a connector.
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20181206142439.10441-4-boris.brezillon@bootlin.com
2018-12-19 14:47:58 +01:00
Boris Brezillon
56406e15b5
drm/connector: Clarify the unit of TV margins
...
All margins are expressed in pixels. Clarify that in the doc.
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20181206142439.10441-3-boris.brezillon@bootlin.com
2018-12-19 14:38:35 +01:00
Boris Brezillon
eda6887f19
drm/connector: Fix drm_mode_create_tv_properties() doc
...
The in the kernel-doc header did not match the function name.
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20181206142439.10441-2-boris.brezillon@bootlin.com
2018-12-19 14:36:18 +01:00
Kuninori Morimoto
199d035bb8
drm: dw-hdmi-i2s: convert to SPDX identifiers
...
This patch updates license to use SPDX-License-Identifier
instead of verbose license text.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/87lg4n1izg.wl-kuninori.morimoto.gx@renesas.com
2018-12-19 11:01:39 +01:00
Archit Taneja
93a6788a34
MAINTAINERS: drm: Remove myself as drm-bridge maintainer
...
I have moved on to other stuff for now. Haven't been able to make time
to review bridge related work. Andrzej has been doing it by himself
for a while now.
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com >
Cc: Gustavo Padovan <gustavo@padovan.org >
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Sean Paul <sean@poorly.run >
Cc: Daniel Vetter <daniel@ffwll.ch >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180913075300.22510-1-architt@codeaurora.org
2018-12-18 11:42:03 +01:00
emersion
329e95a787
drm/vkms: set preferred depth to 24
...
Otherwise DRM_CAP_DUMB_PREFERRED_DEPTH is zero.
Signed-off-by: Simon Ser <contact@emersion.fr >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/o2SmEP0M6h287Fs5OeL3HtQzTr8uV0PyOhFict_qdxeS7vFvV1Zr8qzRUJh-YnCoJHo13nJgAqqQByzEzTZTqk9R2ExsOszYLj68hQLqBIc=@emersion.fr
2018-12-17 10:51:20 +01:00
Dan Carpenter
c27889ca3b
drm/ati_pcigart: Fix error code in drm_ati_pcigart_init()
...
The drm_ati_pcigart_init() function was originally suppose to return one
on success and zero on failure, but these days it returns a mix of
zero, one and -ENOMEM on failure.
This patch cleans it up and modifies the caller so now the function
returns zero on success and negative error codes on failure.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20181217070344.GC12159@kadam
2018-12-17 10:47:17 +01:00
Dan Carpenter
705c8160ce
drm: Fix an error pointer dereference()
...
The drm_mode_create_tile_group() is only called from
drm_parse_tiled_block() and the caller expects it to return a NULL on
error. In other words, this function should match
drm_mode_get_tile_group().
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20181217065733.GA12159@kadam
2018-12-17 10:47:17 +01:00
Lyude Paul
706246c761
drm/dp_mst: Refactor drm_dp_update_payload_part1()
...
This:
- Adds local variables in the first loop, instead of using array indices
everywhere
- Adds an early continue to reduce the indent level in the second loop
There should be no functional changes here
Signed-off-by: Lyude Paul <lyude@redhat.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Juston Li <juston.li@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20181214012604.13746-3-lyude@redhat.com
2018-12-14 15:38:25 -05:00
Lyude Paul
fc63668656
drm/dp_mst: Remove bogus conditional in drm_dp_update_payload_part1()
...
There's no reason we need this, it's just confusing looking.
Signed-off-by: Lyude Paul <lyude@redhat.com >
Cc: Juston Li <juston.li@intel.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20181214012604.13746-2-lyude@redhat.com
2018-12-14 15:32:14 -05:00
Gerd Hoffmann
48a77d66cb
drm/virtio: switch to generic fbdev emulation
...
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20181213134915.24722-1-kraxel@redhat.com
2018-12-14 09:40:27 +01:00
Shayenne da Luz Moura
18ce0906d9
drm: Remove complete task from TODO documentation
...
This patch remove the follow complete task from TODO documentation:
drm_mode_config.crtc_idr is misnamed, since it contains all KMS object.
Should be renamed to drm_mode_config.object_idr.
Signed-off-by: Shayenne da Luz Moura <shayenneluzmoura@gmail.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20181213225537.nq4dwidn6tma33iv@smtp.gmail.com
2018-12-14 09:36:10 +01:00
Lyude Paul
f536e00c46
drm/dp_mst: Fix memory leak in drm_dp_mst_topology_mgr_destroy()
...
We need to call drm_dp_mst_topology_mgr_set_mst(mgr, false) when
destroying the topology manager in order to ensure that the root mstb
and all of it's descendents are actually destroyed, and additionally to
try to make sure that we leave the hub in a clean state.
Signed-off-by: Lyude Paul <lyude@redhat.com >
Reviewed-by: Daniel Vetter <daniel@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20181211235026.21758-1-lyude@redhat.com
2018-12-13 17:40:49 -05:00
Shayenne da Luz Moura
b5f06893c4
drm: Rename crtc_idr as object_idr to KMS cleanups
...
This patch solves this TODO task:
drm_mode_config.crtc_idr is misnamed, since it contains all KMS object.
Should be renamed to drm_mode_config.object_idr.
Signed-off-by: Shayenne da Luz Moura <shayenneluzmoura@gmail.com >
[danvet: resolve conflict with addition of privobj_list.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20181213212957.vkitkyl5cj2qh7qr@smtp.gmail.com
2018-12-13 22:44:57 +01:00
Heiko Stuebner
63d5e06aa3
drm/rockchip: Add implicit fencing support for planes
...
Render like lima will attach a fence to the framebuffer dma_buf,
so the display driver should wait for it to finish before showing
the framebufferto prevent tearing.
Generally tested on rk3188, rk3288, rk3328 and rk3399 and
together with an actual lima-based kmscube on rk3188 and rk3328.
Suggested-by: Qiang Yu <yuq825@gmail.com >
Signed-off-by: Heiko Stuebner <heiko@sntech.de >
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20181130102449.6430-1-heiko@sntech.de
2018-12-12 17:03:09 +01:00
Daniel Vetter
cad5290a2f
drm/xen: Don't set the dpms hook
...
Doesn't do anything for atomic.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com >
Cc: xen-devel@lists.xen.org
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20181210100359.22507-7-daniel.vetter@ffwll.ch
2018-12-12 11:56:45 +01:00
Daniel Vetter
7ce5362815
drm/qxl: Don't set the dpms hook
...
Doesn't do anything with atomic.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Dave Airlie <airlied@redhat.com >
Cc: Gerd Hoffmann <kraxel@redhat.com >
Cc: virtualization@lists.linux-foundation.org
Cc: spice-devel@lists.freedesktop.org
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20181210100359.22507-6-daniel.vetter@ffwll.ch
2018-12-12 11:56:44 +01:00
Christian König
61a98b1b9a
drm/syncobj: remove drm_syncobj_cb and cleanup
...
This completes "drm/syncobj: Drop add/remove_callback from driver
interface" and cleans up the implementation a bit.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Link: https://patchwork.freedesktop.org/patch/266255/
2018-12-11 17:38:38 +01:00
Christian König
3415701a5e
drm/etnaviv: fix for 64bit seqno change
...
The fence seqno is now 64bit, fixes build warning.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Lucas Stach <l.stach@pengutronix.de >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/267136/
2018-12-11 17:31:52 +01:00
Rob Clark
b962a12050
drm/atomic: integrate modeset lock with private objects
...
Follow the same pattern of locking as with other state objects. This
avoids boilerplate in the driver.
Signed-off-by: Rob Clark <robdclark@gmail.com >
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20181022123122.30468-1-boris.brezillon@bootlin.com
2018-12-11 15:24:30 +01:00
Ville Syrjälä
cb8ce71111
drm/dp/mst: Validate REMOTE_I2C_READ harder
...
Make sure i2c msgs we're asked to transfer conform to the
requirements of REMOTE_I2C_READ. We were only checking that the
last message is a read, but we must also check that the preceding
messages are all writes. Also check that the length of each
message isn't too long.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180928180403.22499-2-ville.syrjala@linux.intel.com
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com >
2018-12-10 23:37:53 +02:00