23 Sep, 2016
1 commit
-
Turns out assuming that only stuff in uabi is uabi is a bit naive, and
we have a bunch of properties for which the enum values are placed in
random headers. A proper fix would be to split out uapi include
headers, but meanwhile sprinkle at least some warning over them.Fixes: 532b36712ddf ("drm/doc: Polish for drm_plane.[hc]")
Cc: Archit Taneja
Cc: Sean Paul
Reviewed-by: Jani Nikula
Signed-off-by: Daniel Vetter
Signed-off-by: Sean Paul
Link: http://patchwork.freedesktop.org/patch/msgid/1474612525-9488-1-git-send-email-daniel.vetter@ffwll.ch
22 Sep, 2016
12 commits
-
When merging sync_files there is a case when we can end up with only one
fence in the merged sync_file: when all fences belong to the same
timeline.So for this case a fence_array is not created instead we just assigned the
fence to sync_file->fence. Then we do not use the fences array anymore nor
does free it.This patch frees the array.
Reported-by: Chris Wilson
Reviewed-by: Chris Wilson
Signed-off-by: Gustavo Padovan
Signed-off-by: Sean Paul
Link: http://patchwork.freedesktop.org/patch/msgid/1474442419-6040-1-git-send-email-gustavo@padovan.org -
The connector shouldn't be registered until the rest of the whole device
is set up, so that consistent state is presented to userspace.As drm_dev_register() now registers all of the connectors anyway,
there's no need to explicitly do it in individual drivers so remove
the calls to drm_connector_register()/drm_connector_unregister().This allows componentised drivers to use tda998x without having racy
initialisation.Signed-off-by: Brian Starkey
Reviewed-by: Liviu Dudau
Cc: Russell King
Signed-off-by: Sean Paul
Link: http://patchwork.freedesktop.org/patch/msgid/1469444148-19003-1-git-send-email-brian.starkey@arm.com
Link: http://patchwork.freedesktop.org/patch/msgid/545C835D.1050008@arm.com -
There are many reasons other than ENOMEM that drm_dev_init() can
fail. Return ERR_PTR rather than NULL to be able to distinguish
these in the caller.Signed-off-by: Tom Gundersen
Signed-off-by: Sean Paul
Link: http://patchwork.freedesktop.org/patch/msgid/20160921145919.13754-2-teg@jklm.no -
If passing name == NULL to drm_drv_set_unique() we now get -ENOMEM
as kstrdup() returns NULL. Instead check for this explicitly and
return -EINVAL if no name is provided.Signed-off-by: Tom Gundersen
Signed-off-by: Sean Paul
Link: http://patchwork.freedesktop.org/patch/msgid/20160921145919.13754-1-teg@jklm.no -
We removed it in
commit 6ab10b76ff6252bd9be0849c40f5865e39a29961
Author: Daniel Vetter
Date: Fri Aug 12 22:48:45 2016 +0200drm/kms: Nuke dirty_info property
Reviewed-by: Sean Paul
Signed-off-by: Daniel Vetter
Signed-off-by: Sean Paul
Link: http://patchwork.freedesktop.org/patch/msgid/1474448370-32227-7-git-send-email-daniel.vetter@ffwll.ch -
Again move it from the unmaintainable csv into DOC free-form overview
sections.v2: Types Lionel&Sean spotted.
Cc: Lionel Landwerlin
Reviewed-by: Sean Paul
Reviewed-by: Lionel Landwerlin
Signed-off-by: Daniel Vetter
Signed-off-by: Sean Paul
Link: http://patchwork.freedesktop.org/patch/msgid/1474448370-32227-6-git-send-email-daniel.vetter@ffwll.ch -
For both the new degamm/lut/gamma atomic combo, and the old legacy
gamma tables.Acked-by: Lionel Landwerlin
Cc: Lionel Landwerlin
Signed-off-by: Daniel Vetter
Signed-off-by: Sean Paul
Link: http://patchwork.freedesktop.org/patch/msgid/1474448370-32227-5-git-send-email-daniel.vetter@ffwll.ch -
Try to spec a bit more precisely how they all fit together, now that
at least the code is for all the additional properties is in one
place.Also remove the entries for the standardized properties from the
table, because that thing is supremely unmaintaineable.v2: Fix typos Sean spotted.
Cc: Ville Syrjälä
Cc: Sean Paul
Cc: Benjamin Gaignard
Reviewed-by: Sean Paul
Signed-off-by: Daniel Vetter
Signed-off-by: Sean Paul
Link: http://patchwork.freedesktop.org/patch/msgid/1474448370-32227-4-git-send-email-daniel.vetter@ffwll.ch -
Imo zpos, rotatation, blending eq (once we have it) and all that
should be in drm_blend.c, since those are all about how exactly the
pixels are rendered onto the CRTC's visible area. Also noticed that
one exported function accidentally ended up in drm_crtc_internal.h,
move it to the right place too.Reviewed-by: Sean Paul
Signed-off-by: Daniel Vetter
Signed-off-by: Sean Paul
Link: http://patchwork.freedesktop.org/patch/msgid/1474448370-32227-3-git-send-email-daniel.vetter@ffwll.ch -
Big thing is untangling and carefully documenting the different uapi
types of planes. I also sprinkled a few more cross references around
to make this easier to discover.As usual, remove the kerneldoc for internal functions which are not
exported. Aside: We should probably go OCD on all the ioctl handlers
and consistenly give them an _ioctl postfix.Acked-by: Archit Taneja
Signed-off-by: Daniel Vetter
Signed-off-by: Sean Paul
Link: http://patchwork.freedesktop.org/patch/msgid/1474448370-32227-2-git-send-email-daniel.vetter@ffwll.ch -
Just pure code movement, cleanup and polish will happen in later
patches.v2: Don't forget all the ioctl! To extract those cleanly I decided to
put check_src_coords into drm_framebuffer.c (and give it a
drm_framebuffer_ prefix), since that just checks framebuffer
constraints.v3: rebase over PAGE_FLIP_TARGET.
Reviewed-by: Sean Paul
Signed-off-by: Daniel Vetter[seanpaul]
This patch as posted on the list was rebased on:commit 6f00975c619064a18c23fd3aced325ae165a73b9
Author: Daniel Vetter
Date: Sat Aug 20 12:22:11 2016 +0200drm: Reject page_flip for !DRIVER_MODESET
so as a result of moving the page_flip ioctl, this fix has
been rolled into this patch.Signed-off-by: Sean Paul
-
Also reorder alphabetically and fix up drm_flip_work header.
Reviewed-by: Daniel Vetter
Signed-off-by: Sean Paul
21 Sep, 2016
5 commits
-
Corrected typo in bridge and encoder comparison. Also, added a one-line
encoder description from the previous documentation.Cc: Daniel Vetter
Cc: Archit TanejaSigned-off-by: Dhinakaran Pandiyan
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/1474324848-6446-1-git-send-email-dhinakaran.pandiyan@intel.com -
The script "checkpatch.pl" can point information out like the following.
WARNING: Prefer kcalloc over kzalloc with multiply
Thus fix the affected source code place.
Signed-off-by: Markus Elfring
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/b340d1ca-f114-a523-e6d1-afe7fd6c3826@users.sourceforge.net -
The script "checkpatch.pl" can point information out like the following.
WARNING: Prefer kcalloc over kzalloc with multiply
Thus fix the affected source code place.
Signed-off-by: Markus Elfring
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/606c22f3-5da5-2e84-783d-bfe5289b4a01@users.sourceforge.net -
The script "checkpatch.pl" can point information out like the following.
WARNING: Prefer kcalloc over kzalloc with multiply
Thus fix the affected source code places.
Signed-off-by: Markus Elfring
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/51f88f44-130d-48ac-f531-32ca9ae3919f@users.sourceforge.net -
A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus use the corresponding function "kmalloc_array".This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/b71c8fee-8e84-9f1b-8569-f1ae8b879cc5@users.sourceforge.net
20 Sep, 2016
2 commits
-
The ioctl name and description on the documentation block don't
match the ioctl being defined. This was probably overlooked while
renaming the ioctls during the sync file destaging. This patch
provides a more accurate description of what the ioctl actually does.Signed-off-by: Emilio López
Reviewed-by: Gustavo Padovan
Signed-off-by: Sumit Semwal
Link: http://patchwork.freedesktop.org/patch/msgid/20160919042120.6280-1-emilio.lopez@collabora.co.uk -
When we merge several fences, if all of them are signaled already, we
still keep one of them. So instead of using add_fence(), which will not
increase the refcount of signaled fences, we should explicitly call
fence_get() for the fence we are keeping.This patch fixes a kernel panic that can be triggered by creating a fence
that is expired (or increasing the timeline until it expires), then
creating a merged fence out of it, and deleting the merged fence. This
will make the original expired fence's refcount go to zero.Testcase: igt/sw_sync/sync_expired_merge
Signed-off-by: Rafael Antognolli
Reviewed-by: Chris Wilson
Reviewed-by: Gustavo Padovan
Signed-off-by: Sumit Semwal
Link: http://patchwork.freedesktop.org/patch/msgid/1473966865-4508-1-git-send-email-rafael.antognolli@intel.com
19 Sep, 2016
12 commits
-
drm/drm_fb_helper.c:2306:12: warning: symbol 'drm_fb_helper_modinit' was not declared. Should it be static?
While at it, move the lefover static inline to the right place.
Cc: Daniel Vetter
Cc: Sean Paul
Signed-off-by: Ville Syrjälä
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/1474292035-15695-4-git-send-email-ville.syrjala@linux.intel.com -
drm/drm_blend.c:207:5: warning: symbol 'drm_atomic_normalize_zpos' was not declared. Should it be static?
Cc: Marek Szyprowski
Cc: Benjamin Gaignard
Cc: Laurent Pinchart
Signed-off-by: Ville Syrjälä
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/1474292035-15695-3-git-send-email-ville.syrjala@linux.intel.com -
drm/drm_atomic_helper.c:1696:6: warning: symbol 'plane_crtc_active' was not declared. Should it be static?
Cc: Daniel Vetter
Signed-off-by: Ville Syrjälä
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/1474292035-15695-2-git-send-email-ville.syrjala@linux.intel.com -
drivers/gpu/drm/drm_dp_helper.c: In function 'drm_dp_downstream_debug':
>> drivers/gpu/drm/drm_dp_helper.c:551:2: error: implicit declaration of
>> function 'seq_printf' [-Werror=implicit-function-declaration]
seq_printf(m, "\tDP branch device present: %s\n",
^
>> drivers/gpu/drm/drm_dp_helper.c:559:3: error: implicit declaration of
>> function 'seq_puts' [-Werror=implicit-function-declaration]
seq_puts(m, "\t\tType: DisplayPort\n");
^Reported-by: kbuild test robot
References: https://lists.freedesktop.org/archives/intel-gfx/2016-September/106638.html
Fixes: 80209e5f2c42 ("drm: Add DP branch device info on debugfs")
Cc: Mika Kahola
Signed-off-by: Jani Nikula
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/1474020396-14875-1-git-send-email-jani.nikula@intel.com -
Some were still left in drm_crtc.h. Also include drm_edid.h in the
rst files.Reviewed-by: Sean Paul
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/20160831160913.12991-4-daniel.vetter@ffwll.ch -
We don't want to burry the bridge structures kerneldoc in drm_crtc.h.
Cc: Archit Taneja
Reviewed-by: Archit Taneja
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/20160831160913.12991-3-daniel.vetter@ffwll.ch -
Now that there's less stuff in there I noticed that I overlooked them.
Sprinkle some docs over them while at it.Reviewed-by: Sean Paul
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/20160831160913.12991-2-daniel.vetter@ffwll.ch -
Various cleanups to the DRM core initialization and exit handlers:
- Register chrdev last: Once register_chrdev() returns, open() will
succeed on the given chrdevs. This is usually not an issue, as no
chardevs are registered, yet. However, nodes can be created by
user-space via mknod(2), even though such major/minor combinations are
unknown to the kernel. Avoid calling into drm_stub_open() in those
cases.
Again, drm_stub_open() would just bail out as the inode is unknown,
but it's really non-obvious if you hack on drm_stub_open().- Unify error-paths into just one label. All the error-path helpers can
be called even though the constructors were not called yet, or failed.
Hence, just call all cleanups unconditionally.- Call into drm_global_release(). This is a no-op, but provides
debugging helpers in case there're GLOBALS left on module unload. This
function was unused until now.- Use DRM_ERROR() instead of printk(), and also print the error-code on
failure (even if it is static!).- Don't throw away error-codes of register_chrdev()!
- Don't hardcode -1 as errno. This is just plain wrong.
- Order exit-handlers in the exact reverse order of initialization
(except if the order actually matters for syncing-reasons, which is
not the case here, though).v2:
- Call drm_core_exit() directly from the init-error-handler. Requires to
drop __exit annotation, though.Signed-off-by: David Herrmann
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/20160901124837.680-7-dh.herrmann@gmail.com -
The drm_core.h header contains a set of constants meant to be used
throughout DRM. However, as it turns out, they're each used just once and
don't bring any benefit. They're also grossly mis-named and lack
name-spacing. This patch inlines them, or moves them into drm_internal.h
as appropriate:- CORE_AUTHOR and CORE_DESC are inlined into corresponding MODULE_*()
macros. It's just confusing having to follow 2 pointers when trying to
find the definition of these fields. Grep'ping for MODULE_AUTHOR()
should reveal the full information, if there's no strong reason not to.- CORE_NAME, CORE_DATE, CORE_MAJOR, CORE_MINOR, and CORE_PATCHLEVEL are
inlined into the sysfs 'version' attribute. They're stripped
everywhere else (which is just some printk() statements). CORE_NAME
just doesn't make *any* sense, as we hard-code it in many places,
anyway. The other constants are outdated and just serve
binary-compatibility purposes. Hence, inline them in 'version' sysfs
attribute (we might even try dropping it..).- DRM_IF_MAJOR and DRM_IF_MINOR are moved into drm_internal.h as they're
only used by the global ioctl handlers. Furthermore, versioning
interfaces breaks backports and as such is deprecated, anyway. We just
keep them for historic reasons. I doubt anyone will ever modify them
again.Signed-off-by: David Herrmann
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/20160901124837.680-6-dh.herrmann@gmail.com -
Rather than using "struct file*", use "struct drm_file*" as tag VM tag for
BOs. This will pave the way for "struct drm_file*" without any "struct
file*" back-pointer.Signed-off-by: David Herrmann
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/20160901124837.680-3-dh.herrmann@gmail.com -
Each DRM file-context caches the EUID of the process that opened the file.
It is used exclusively for debugging purposes in /proc/dri/ and friends.Note, however, that we can already fetch the EUID from
priv->pid->task->creds. The pointer-chasing will not hurt us, since it is
only about debugging, anyway.Since we already are in an rcu-read-side, we can use __task_cred() rather
than task_cred_xxx().Signed-off-by: David Herrmann
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/20160901124837.680-2-dh.herrmann@gmail.com -
Just random misc stuff that Sean/Sumit&Archit picked up while I relaxed.
Well except for one commit:* tag 'topic/drm-misc-2016-09-19' of git://anongit.freedesktop.org/drm-intel:
drm: Only use compat ioctl for addfb2 on X86/IA64
drm/qxl: squash lines for simple wrapper functions
drm/bridge: analogix_dp: squash lines for simple wrapper functions
drm/radeon: squash lines for simple wrapper functions
drm/amdgpu: squash lines for simple wrapper functions
dma-buf/sync-file: Avoid enable fence signaling if poll(.timeout=0)
drm/fence: allow fence waiting to be interrupted by userspace
drm: Move property validation to a helper, v2.
drm/bridge: adv7511: add support for the 2nd chip
15 Sep, 2016
5 commits
-
Similar to struct drm_update_draw, struct drm_mode_fb_cmd2 has an
unaligned 64 bit field (modifier). This get packed differently between
32 bit and 64 bit modes on architectures that can handle unaligned 64
bit access (X86 and IA64). Other architectures pack the structs the
same and don't need the compat wrapper. Use the same condition for
drm_mode_fb_cmd2 as we use for drm_update_draw.Note that only the modifier will be packed differently between compat
and non-compat versions.Reviewed-by: Rob Clark
Signed-off-by: Kristian H. Kristensen
[seanpaul added not at bottom of commit msg re: modifier]
Signed-off-by: Sean Paul
Link: http://patchwork.freedesktop.org/patch/msgid/1473801645-116011-1-git-send-email-hoegsberg@chromium.org -
Remove unneeded variables and assignments.
Reviewed-by: Gustavo Padovan
Signed-off-by: Masahiro Yamada
Signed-off-by: Sean Paul
Link: http://patchwork.freedesktop.org/patch/msgid/1473863952-7658-5-git-send-email-yamada.masahiro@socionext.com -
Remove unneeded variables and assignments.
Reviewed-by: Gustavo Padovan
Signed-off-by: Masahiro Yamada
[seanpaul added analogix prefix to subject]
Signed-off-by: Sean Paul
Link: http://patchwork.freedesktop.org/patch/msgid/1473863952-7658-4-git-send-email-yamada.masahiro@socionext.com -
Remove unneeded variables and assignments.
Reviewed-by: Gustavo Padovan
Signed-off-by: Masahiro Yamada
Signed-off-by: Sean Paul
Link: http://patchwork.freedesktop.org/patch/msgid/1473863952-7658-3-git-send-email-yamada.masahiro@socionext.com -
Remove unneeded variables and assignments.
Reviewed-by: Gustavo Padovan
Signed-off-by: Masahiro Yamada
Signed-off-by: Sean Paul
Link: http://patchwork.freedesktop.org/patch/msgid/1473863952-7658-2-git-send-email-yamada.masahiro@socionext.com
13 Sep, 2016
3 commits
-
If we being polled with a timeout of zero, a nonblocking busy query,
we don't need to install any fence callbacks as we will not be waiting.
As we only install the callback once, the overhead comes from the atomic
bit test that also causes serialisation between threads.Signed-off-by: Chris Wilson
Cc: Sumit Semwal
Cc: Gustavo Padovan
Cc: linux-media@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linaro-mm-sig@lists.linaro.org
Reviewed-by: Gustavo Padovan
Signed-off-by: Sumit Semwal
Link: http://patchwork.freedesktop.org/patch/msgid/20160829181613.30722-1-chris@chris-wilson.co.uk -
This adds the ASoC codec interfaces for TDA998x HDMI audio from
Jyri Sarha.* 'drm-tda998x-devel' of git://git.armlinux.org.uk/~rmk/linux-arm:
ARM: dts: am335x-boneblack: Add HDMI audio support
drm/i2c: tda998x: Register ASoC hdmi-codec and add audio DT binding
drm/i2c: tda998x: Improve tda998x_configure_audio() audio related pdata -
…/mripard/linux into drm-next
Allwinner DRM changes for 4.9
This tag adds the support of a new SoC to sun4i-drm (the Allwinner A33),
and the usual few fixes and enhancements* tag 'sunxi-drm-for-4.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux:
drm/sun4i: add missing header dependencies
drm/sun4i: Add a DRC driver
drm/sun4i: backend: Handle the SAT
drm/sun4i: support A33 tcon
drm/sun4i: support TCONs without channel 1
drm/sun4i: Clear encoder->bridge if a bridge is not found
drm/sun4i: rgb: add missing calls to drm_panel_{prepare,unprepare}
drm/sun4i: Remove redundant dev_err call in sun4i_tcon_init_regmap()
drm/sun4i: Add bridge support
drm/sun4i: Move panel retrieval in RGB connector
drm/sun4i: Store TCON's device structure pointer