Rodrigo Siqueira
dbe37dc31c
drm/virtio: Add spaces around operators
...
This patch fixes the checkpatch.pl check:
virtgpu_ioctl.c:535: CHECK: spaces preferred around that '|' (ctx:VxV)
virtgpu_vq.c:277: CHECK: spaces preferred around that '+' (ctx:VxV)
...
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com >
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/8402b55696b44483ba2e1f6aaeb53bf709ffbfe7.1519343668.git.rodrigosiqueiramelo@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
2018-02-27 08:40:42 +01:00
Rodrigo Siqueira
601030e262
drm/virtio: Remove multiple blank lines
...
This patch fixes the checkpatch.pl check:
virtgpu_drv.c:116: CHECK: Please don't use multiple blank lines
virtgpu_vq.c:599: CHECK: Please don't use multiple blank lines
virtgpu_prime.c:42: CHECK: Please don't use multiple blank lines
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com >
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/c43a006f2ed93a16fe824b4a2686a2d5e2ef56f5.1519343668.git.rodrigosiqueiramelo@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
2018-02-27 08:40:42 +01:00
Rodrigo Siqueira
dc31b3b76c
drm/virtio: Replace 'unsigned' for 'unsigned int'
...
This patch fixes the checkpatch.pl warning:
drivers/gpu/drm/virtio/virtgpu_display.c:64: WARNING: Prefer 'unsigned
int' to bare use of 'unsigned'
...
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com >
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/ac9c4110785e6519801d44c57d4f05c3e0cdad53.1519343668.git.rodrigosiqueiramelo@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
2018-02-27 08:40:41 +01:00
Rodrigo Siqueira
1a5019f125
drm/virtio: Remove return from void function
...
This patch fixes the checkpatch.pl warning:
virtgpu_ttm.c:181: WARNING: void function return statements are not
generally useful
...
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com >
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/fd8dc6599c81c7aec6753c8552c1cabb7baa7577.1519343668.git.rodrigosiqueiramelo@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
2018-02-27 08:40:40 +01:00
Rodrigo Siqueira
5d883850dc
drm/virtio: Add */ in block comments to separate line
...
This patch fixes the checkpatch.pl warning:
virtgpu_ioctl.c:551: WARNING: Block comments use a trailing */ on a
separate line
...
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com >
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/f0bd4104a7d26bf7561c3a2b4632041c5411f1f2.1519343668.git.rodrigosiqueiramelo@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
2018-02-27 08:40:39 +01:00
Rodrigo Siqueira
9d492b6bec
drm/virtio: Add blank line after variable declarations
...
This patch fixes the checkpatch.pl warnings:
virtgpu_drv.c:57: WARNING: Missing a blank line after declarations
virtgpu_display.c:99: WARNING: Missing a blank line after declarations
...
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com >
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/41767852ff9dc584c825e32db6222b9a311603b9.1519343668.git.rodrigosiqueiramelo@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
2018-02-27 08:40:37 +01:00
Rodrigo Siqueira
1858b85606
drm/virtio: Add tabs at the start of a line
...
This patch fixes the checkpatch.pl errors:
drivers/gpu/drm/virtio/virtgpu_drv.h:371: ERROR: code indent should use
tabs where possible
...
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com >
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1c77c233d4454ee2bdb85beaf17d413e310fac0a.1519343668.git.rodrigosiqueiramelo@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
2018-02-27 08:40:35 +01:00
Ville Syrjälä
f6d25e1ccf
drm: Include the header with the prototype for drm_get_panel_orientation_quirk()
...
sparse complains:
drivers/gpu/drm/drm_panel_orientation_quirks.c:133:5: warning: symbol 'drm_get_panel_orientation_quirk' was not declared. Should it be static?
Cc: Hans de Goede <hdegoede@redhat.com >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180226142423.26439-1-ville.syrjala@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
2018-02-26 17:39:59 +02:00
Ville Syrjälä
9f91280feb
drm/i915: Remove the pipe/plane ID checks from skl_check_ccs_aux_surface()
...
The core now checks that the plane supports the fb's format+modifier
combination, so we can drop the related checks from
skl_check_ccs_aux_surface(). These checks were specific to
SKL/KBL/BXT anyway.
Cc: Ben Widawsky <ben@bwidawsk.net >
Cc: Jason Ekstrand <jason@jlekstrand.net >
Cc: Daniel Stone <daniels@collabora.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171222192231.17981-9-ville.syrjala@linux.intel.com
Reviewed-by: Mika Kahola <mika.kahola@intel.com >
2018-02-26 16:29:47 +02:00
Ville Syrjälä
23163a7d4b
drm: Check that the plane supports the request format+modifier combo
...
Currently we only check that the plane supports the pixel format of the
fb we're about to feed to it. Extend it to check also the modifier, and
more specifically that the combination of the format and modifier is
supported.
Cc: dri-devel@lists.freedesktop.org
Cc: Ben Widawsky <ben@bwidawsk.net >
Cc: Jason Ekstrand <jason@jlekstrand.net >
Cc: Daniel Stone <daniels@collabora.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171222192231.17981-8-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2018-02-26 16:29:47 +02:00
Thierry Reding
a22f1d801a
drm/pl111: Remove reverse dependency on DRM_DUMB_VGA_DAC
...
DRM_DUMB_VGA_DAC is a user-visible symbol. Selecting it can cause unmet
direct dependencies such as this (on i386, randconfig):
warning: (DRM_PL111) selects DRM_DUMB_VGA_DAC which has unmet direct dependencies (HAS_IOMEM && DRM && DRM_BRIDGE && OF)
This is because DRM_DUMB_VGA_DAC depends on OF while DRM_PL111 does not.
It does indirectly depend on OF via the ARM and ARM64 dependencies, but
since it can also be enabled under COMPILE_TEST, randconfig can find a
case where DRM_PL111 is selected without pulling in OF and not meeting
the dependency for DRM_DUMB_VGA_DAC.
Since select is "heavy handed", DRM_DUMB_VGA_DAC is going to be enabled
regardless of the above warning and causes the following build error:
../drivers/gpu/drm/bridge/dumb-vga-dac.c: In function 'dumb_vga_probe':
../drivers/gpu/drm/bridge/dumb-vga-dac.c:207:13: error: 'struct drm_bridge' has no member named 'of_node'
vga->bridge.of_node = pdev->dev.of_node;
See Documentation/kbuild/kconfig-language.txt, "reverse dependencies".
Fixes: 49f81d80ab ("drm/pl111: Support handling bridge timings")
Reported-by: Randy Dunlap <rdunlap@infradead.org >
Reviewed-by: Eric Anholt <eric@anholt.net >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Cc: Archit Taneja <architt@codeaurora.org >
Cc: Eric Anholt <eric@anholt.net >
Signed-off-by: Thierry Reding <treding@nvidia.com >
Signed-off-by: Archit Taneja <archit@cradlewise.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180220102903.27787-1-thierry.reding@gmail.com
2018-02-26 11:04:51 +05:30
Benjamin Gaignard
879659bb87
drm/stm: check pitch and size calculations even if !CONFIG_MMU
...
In all cases we have to check pitch and size calculations to speed up
data transfer.
Fixes: 21f815bf77 ("drm/stm: drv: Improve data transfers")
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org >
Tested-by: Philippe Cornu <philippe.cornu@st.com >
Reviewed-by: Philippe Cornu <philippe.cornu@st.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180131080508.14356-1-benjamin.gaignard@linaro.org
2018-02-23 09:37:12 +01:00
Linus Walleij
fd9b503dec
drm/panel: Fix ARM Versatile panel clocks
...
These clocks are in kHz not in Hz, oops. Fix it so my
new bandwidth calculations patch starts working with these
panels.
Reviewed-by: Eric Anholt <eric@anholt.net >
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20180211103840.18764-1-linus.walleij@linaro.org
2018-02-23 00:13:47 +01:00
Oleksandr Andrushchenko
6c7d091008
drm/pl111: Do not use deprecated drm_driver.{enable|disable)_vblank
...
Do not use deprecated drm_driver.{enable|disable)_vblank callbacks,
but use drm_simple_kms_helpe's pipe callbacks instead.
Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com >
Cc: Eric Anholt <eric@anholt.net >
Reviewed-by: Eric Anholt <eric@anholt.net >
Tested-by: Eric Anholt <eric@anholt.net >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/1518425574-32671-5-git-send-email-andr2000@gmail.com
2018-02-22 17:58:59 +01:00
Oleksandr Andrushchenko
df91972fe3
drm/tve200: Do not use deprecated drm_driver.{enable|disable)_vblank
...
Do not use deprecated drm_driver.{enable|disable)_vblank callbacks,
but use drm_simple_kms_helpe's pipe callbacks instead.
Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com >
Cc: Linus Walleij <linus.walleij@linaro.org >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/1518425574-32671-4-git-send-email-andr2000@gmail.com
2018-02-22 17:58:59 +01:00
Oleksandr Andrushchenko
989c48e6c2
drm/mxsfb: Do not use deprecated drm_driver.{enable|disable)_vblank
...
Do not use deprecated drm_driver.{enable|disable)_vblank callbacks,
but use drm_simple_kms_helpe's pipe callbacks instead.
Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com >
Cc: Marek Vasut <marex@denx.de >
Reviewed-by: Marek Vasut <marex@denx.de >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/1518425574-32671-3-git-send-email-andr2000@gmail.com
2018-02-22 17:58:59 +01:00
Oleksandr Andrushchenko
ac86cba96e
drm/simple_kms_helper: Add {enable|disable}_vblank callback support
...
If simple_kms_helper based driver needs to work with vblanks,
then it has to provide drm_driver.{enable|disable}_vblank callbacks,
because drm_simple_kms_helper.drm_crtc_funcs does not provide any.
At the same time drm_driver.{enable|disable}_vblank callbacks
are marked as deprecated and shouldn't be used by new drivers.
Fix this by extending drm_simple_kms_helper.drm_crtc_funcs
to provide the missing callbacks.
Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/1518425574-32671-2-git-send-email-andr2000@gmail.com
2018-02-22 17:58:59 +01:00
Arnd Bergmann
5887170610
drm: fix drm_get_max_iomem type mismatch
...
When comparing two variables with min()/max(), they should be the same type:
drivers/gpu/drm/drm_memory.c: In function 'drm_get_max_iomem':
include/linux/kernel.h:821:16: error: comparison of distinct pointer types lacks a cast [-Werror]
(void) (&max1 == &max2);
This makes the local variable in drm_get_max_iomem make the type
from resource->end.
Fixes: 82626363a2 ("drm: add func to get max iomem address v2")
Signed-off-by: Arnd Bergmann <arnd@arndb.de >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20180222114804.1394300-1-arnd@arndb.de
2018-02-22 11:18:58 -05:00
Oleksandr Andrushchenko
4751cf733a
drm/simple_kms_helper: Fix NULL pointer dereference with no active CRTC
...
It is possible that drm_simple_kms_plane_atomic_check called
with no CRTC set, e.g. when user-space application sets CRTC_ID/FB_ID
to 0 before doing any actual drawing. This leads to NULL pointer
dereference because in this case new CRTC state is NULL and must be
checked before accessing.
Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/1519279759-7803-1-git-send-email-andr2000@gmail.com
2018-02-22 17:11:46 +01:00
Maxime Ripard
35152d1159
drm/sun4i: backend: Remove ARGB spoofing
...
We've had some code for quite some time to prevent the alpha bug from
happening on the lowest primary plane. Since we now check for this in our
atomic_check, we can simply remove it.
Reviewed-by: Chen-Yu Tsai <wens@csie.org >
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com >
Link: https://patchwork.freedesktop.org/patch/msgid/965180afd8169ccaa848f061d16a2c1a9ec4d289.1518802627.git-series.maxime.ripard@bootlin.com
2018-02-22 16:20:59 +01:00
Maxime Ripard
ded4f346ac
drm/sun4i: backend: Make zpos configurable
...
Now that we have everything in place, we can make zpos configurable now.
Change the zpos property from an immutable one to a regular.
Reviewed-by: Chen-Yu Tsai <wens@csie.org >
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com >
Link: https://patchwork.freedesktop.org/patch/msgid/0ab187956855db86972d936e6751181649e0d035.1518802627.git-series.maxime.ripard@bootlin.com
2018-02-22 16:20:16 +01:00
Maxime Ripard
70d2850ee3
drm/sun4i: Remove the plane description structure
...
The plane description structure was mostly needed to differentiate the
formats usable on the primary plane (because of its lowest position), and
assign the pipes. Now that both are dynamically checked and assigned, we
can remove the static definition.
Reviewed-by: Chen-Yu Tsai <wens@csie.org >
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com >
Link: https://patchwork.freedesktop.org/patch/msgid/6b09e3698e692c3338f70a5ae1e5a580f9dd08ee.1518802627.git-series.maxime.ripard@bootlin.com
2018-02-22 16:20:10 +01:00
Maxime Ripard
8f1f25534f
drm/sun4i: backend: Assign the pipes automatically
...
Since we now have a way to enforce the zpos, check for the number of alpha
planes, the only missing part is to assign our pipe automatically instead
of hardcoding it.
The algorithm is quite simple, but requires two iterations over the list of
planes.
In the first one (which is the same one that we've had to check for alpha,
the frontend usage, and so on), we order the planes by their zpos.
We can then do a second iteration over that array by ascending zpos
starting with the pipe 0. When and if we encounter our alpha plane, we put
it and all the other subsequent planes in the second pipe.
Reviewed-by: Chen-Yu Tsai <wens@csie.org >
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com >
Link: https://patchwork.freedesktop.org/patch/msgid/e9caf21d831438d36a3ccc7cef229c9a7ea7f69f.1518802627.git-series.maxime.ripard@bootlin.com
2018-02-22 16:19:52 +01:00
Chris Wilson
8a1949455a
drm/mm: Fix caching of leftmost node in the interval tree
...
When we descend the tree to find our slot, if we step to the right, we
are no longer the leftmost node.
Fixes: f808c13fd3 ("lib/interval_tree: fast overlap detection")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Davidlohr Bueso <dbueso@suse.de >
Cc: Jérôme Glisse <jglisse@redhat.com >
Cc: Christian König <christian.koenig@amd.com >
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Acked-by: Christian König <christian.koenig@amd.com > for now.
Link: https://patchwork.freedesktop.org/patch/msgid/20180220093738.1461-1-chris@chris-wilson.co.uk
2018-02-20 16:38:26 +00:00
Meghana Madhyastha
2b91e3c43b
drm/omapdrm: Use of_find_backlight helper
...
Replace of_find_backlight_by_node and of the code around it
with of_find_backlight helper to avoid repetition of code.
Reviewed-by: Noralf Trønnes <noralf@tronnes.org >
Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/eb914313f9d0e58d81572ccd3c718a573a891bd7.1516810726.git.meghana.madhyastha@gmail.com
2018-02-20 11:07:22 -05:00
Meghana Madhyastha
c69f94570d
drm/panel: Use of_find_backlight helper
...
Replace of_find_backlight_by_node and of the code around it
with of_find_backlight helper to avoid repetition of code.
Reviewed-by: Noralf Trønnes <noralf@tronnes.org >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Acked-by: Thierry Reding <treding@nvidia.com >
Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/140d01afb138d687680b2d1776a4c101c9fa9a0a.1516810725.git.meghana.madhyastha@gmail.com
2018-02-20 11:07:22 -05:00
Meghana Madhyastha
f4ccc2b576
drm/omapdrm: Use backlight_enable/disable helpers
...
Use backlight_enable/disable helpers instead of changing
the property and calling backlight_update_status for cleaner
and simpler code and also to avoid repetitions.
Reviewed-by: Noralf Trønnes <noralf@tronnes.org >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/30d5b26c3c7d75de3d2ab3cff9dee67084fc3caf.1516810725.git.meghana.madhyastha@gmail.com
2018-02-20 11:07:22 -05:00
Meghana Madhyastha
d593bfdb62
drm/panel: Use backlight_enable/disable helpers
...
Use backlight_enable/disable helpers instead of changing
the property and calling backlight_update_status for cleaner
and simpler code and also to avoid repetitions.
Reviewed-by: Noralf Trønnes <noralf@tronnes.org >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Acked-by: Thierry Reding <treding@nvidia.com >
Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/bc80cdb5cf1a6638dce9fb9f8da674e361e3b749.1516810725.git.meghana.madhyastha@gmail.com
2018-02-20 11:07:22 -05:00
Meghana Madhyastha
27f6640c8f
drm/tinydrm: Call devres version of of_find_backlight
...
Call devm_of_find_backlight (the devres version) instead of
of_find_backlight.
Reviewed-by: Noralf Trønnes <noralf@tronnes.org >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/244cd4d567cb3944a8cb7633715ffc8ac4e1ce83.1516810725.git.meghana.madhyastha@gmail.com
2018-02-20 11:07:22 -05:00
Meghana Madhyastha
d1a2e7004b
drm/tinydrm: Replace tinydrm_of_find_backlight with of_find_backlight
...
Remove tinydrm_of_find_backlight from tinydrm-helpers.c. We now have
a generic of_find_backlight defined in backlight.c. Let the callers
of tinydrm_of_find_backlight call of_find_backlight. Also, remove
select BACKLIGHT_LCD_SUPPORT and select BACKLIGHT_CLASS_DEVICE from
tinydrm/Kconfig as it is a hack that is no longer needed.
Reviewed-by: Noralf Trønnes <noralf@tronnes.org >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/11dd1cabd098a730d07ab04c5987b139d14d8b21.1516810725.git.meghana.madhyastha@gmail.com
2018-02-20 11:07:22 -05:00
Meghana Madhyastha
414147e8a3
drm/tinydrm: Convert tinydrm_enable/disable_backlight to backlight_enable/disable
...
Remove tinydrm_enable/disable_backlight and let the callers call the
more generic backlight_enable/disable helpers
Reviewed-by: Noralf Trønnes <noralf@tronnes.org >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/ec700724e47814e6426966e093bd32b2364ba147.1516810725.git.meghana.madhyastha@gmail.com
2018-02-20 11:07:22 -05:00
Sean Paul
f5155876af
Merge tag 'topic/backlight_for_lag-2018-01-29' of git://anongit.freedesktop.org/drm/drm-misc into drm-misc-next
...
This contains the backlight portion of Meghana Madhyastha's patch set to
migrate the backlight helpers from tinydrm to the backlight subsystem.
https://patchwork.freedesktop.org/series/36522/
Cc: Meghana Madhyastha <meghana.madhyastha@gmail.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
# gpg: Signature made Mon 29 Jan 2018 02:25:40 PM EST
# gpg: using RSA key 7F17297CC4A076740CB3E42A96F70DFDA84A070A
# gpg: Good signature from "Sean Paul <seanpaul@chromium.org >" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg: There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 1C5E AB9E D7C9 DDE9 E7F2 087C 732C 0025 72DC AF79
# Subkey fingerprint: 7F17 297C C4A0 7674 0CB3 E42A 96F7 0DFD A84A 070A
Link: https://patchwork.freedesktop.org/patch/msgid/20180129192950.bvmhkz3h42t5a25r@art_vandelay
2018-02-20 10:33:05 -05:00
Jani Nikula
07d85290f9
drm: add documentation for tv connector state margins
...
A bit boring documentation fix, but gets rid of the warnings:
./include/drm/drm_connector.h:370: warning: Function parameter or member 'margins.left' not described in 'drm_tv_connector_state'
./include/drm/drm_connector.h:370: warning: Function parameter or member 'margins.right' not described in 'drm_tv_connector_state'
./include/drm/drm_connector.h:370: warning: Function parameter or member 'margins.top' not described in 'drm_tv_connector_state'
./include/drm/drm_connector.h:370: warning: Function parameter or member 'margins.bottom' not described in 'drm_tv_connector_state'
[Depends on fe7bc493d9 ("scripts: kernel-doc: support in-line comments
on nested structs/unions") in docs-next to actually fix the warnings.]
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180219104009.4887-1-jani.nikula@intel.com
2018-02-20 16:04:43 +02:00
Daniel Vetter
83a7dff07f
drm/doc: Use new substruct support
...
Support for this just recently landed in linux-next.
Reviewed-by: Thierry Reding <treding@nvidia.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180219225356.24996-5-daniel.vetter@ffwll.ch
2018-02-20 14:24:38 +01:00
Daniel Vetter
dbd124f013
drm/doc: Polish for drm_mode_parse_command_line_for_connector
...
Quoting the module option format looks soo much nicer, and avoids
sphinx spewing errors about markup issues.
v2: Fix typo in commit message (Thierry).
Reviewed-by: Thierry Reding <treding@nvidia.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180219225356.24996-4-daniel.vetter@ffwll.ch
2018-02-20 12:10:46 +01:00
Daniel Vetter
bbeba09fc8
drm/docs: Document "scaling mode" property better
...
Move it out of the csv dungeon.
While at it add the missing link to the helper functions for setting
up the "panel rotation" property.
Also OCD how we list enum property values and their corresponding docs.
Going for a nest definition list seams cleanest, no need for also making
it an uordered list.
Cc: Sean Paul <seanpaul@chromium.org >
Cc: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Thierry Reding <treding@nvidia.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180219225356.24996-3-daniel.vetter@ffwll.ch
2018-02-20 12:10:46 +01:00
Daniel Vetter
4d10bd45d4
drm/docs: Align layout of optional plane blending properties
...
Just a bit of drive-by OCD. All the other property docs use enumerations,
for some nice visual consistency. It also neatly highlights the property
name.
Reviewed-by: Thierry Reding <treding@nvidia.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20180219225356.24996-2-daniel.vetter@ffwll.ch
2018-02-20 12:10:46 +01:00
Daniel Vetter
3f0df756b6
drm/docs: Discourage adding more to kms-properties.csv
...
Motivated by patch review.
The table is really hard to read in source form, hard to edit, and
we've moved away to more focused sections about specific features and
how they're exposed in properties.
Those sections can then more easily enumerate options, link to helper
functions and other parts of the docs. All things that get ugly real
fast in the docs.
Cc: Maxime Ripard <maxime.ripard@bootlin.com >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Thierry Reding <treding@nvidia.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180219225356.24996-1-daniel.vetter@ffwll.ch
2018-02-20 12:10:46 +01:00
Linus Walleij
40275dc4ed
drm: simple_kms_helper: Add mode_valid() callback support
...
The PL111 needs to filter valid modes based on memory bandwidth.
I guess it is a pretty simple operation, so we can still claim
the DRM KMS helper pipeline is simple after adding this (optional)
vtable callback.
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20180220072859.3386-1-linus.walleij@linaro.org
2018-02-20 08:42:17 +01:00
Daniel Vetter
1aecabb5b2
drm/todo: Add idr_init_base todo
...
Suggested-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Acked-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180219145708.23523-1-daniel.vetter@ffwll.ch
2018-02-19 17:32:12 +01:00
Chris Wilson
e86584c537
drm: Use idr_init_base(1) when using id==0 for invalid
...
Use the new idr_init_base() function to create an IDR that knows id==0
is never allocated as it maps to an invalid identifier. By knowing that
id==0 is invalid, the IDR can start from id=1 instead avoiding the issue
of having to start each lookup from the zeroth leaf as id==0 is always
unused (and thus the tree-of-bitmaps indicate that is the first
available).
References: 6ce711f275 ("idr: Make 1-based IDRs more efficient")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Christian Konig <christian.koenig@amd.com >
Cc: Dave Airlie <airlied@redhat.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Acked-by: Christian König <christian.koenig@amd.com > as well.
Link: https://patchwork.freedesktop.org/patch/msgid/20180212145533.30046-1-chris@chris-wilson.co.uk
2018-02-19 12:21:24 +00:00
Joe Moriarty
a5ef656736
drm: NULL pointer dereference [null-pointer-deref] (CWE 476) problem
...
The Parfait (version 2.1.0) static code analysis tool found the
following NULL pointer derefernce problem.
- drivers/gpu/drm/drm_edid.c
The call to drm_cvt_mode() in function drm_mode_std() for the
HDTV hack resulted in the possibility of accessing a NULL pointer
if drm_mode_std() returned NULL. A check for this added right after
the call to drm_cvt_mode() in this particular area of code.
Signed-off-by: Joe Moriarty <joe.moriarty@oracle.com >
Reviewed-by: Steven Sistare <steven.sistare@oracle.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20180212195144.98323-4-joe.moriarty@oracle.com
2018-02-19 13:01:20 +01:00
Joe Moriarty
22a07038c0
drm: NULL pointer dereference [null-pointer-deref] (CWE 476) problem
...
The Parfait (version 2.1.0) static code analysis tool found the
following NULL pointer derefernce problem.
- drivers/gpu/drm/drm_dp_mst_topology.c
The call to drm_dp_calculate_rad() in function drm_dp_port_setup_pdt()
could result in a NULL pointer being returned to port->mstb due to a
failure to allocate memory for port->mstb.
Signed-off-by: Joe Moriarty <joe.moriarty@oracle.com >
Reviewed-by: Steven Sistare <steven.sistare@oracle.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20180212195144.98323-3-joe.moriarty@oracle.com
2018-02-19 12:58:20 +01:00
Chris Wilson
b88132b4ab
dma-buf/sw_sync: Fix kerneldoc warnings
...
drivers/dma-buf/sw_sync.c:248: warning: No description found for parameter 'obj'
drivers/dma-buf/sw_sync.c:248: warning: No description found for parameter 'value'
drivers/dma-buf/sw_sync.c:248: warning: Excess function parameter 'parent' description in 'sync_pt_create'
drivers/dma-buf/sw_sync.c:248: warning: Excess function parameter 'inc' description in 'sync_pt_create'
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20180208113816.8288-1-chris@chris-wilson.co.uk
2018-02-19 10:50:49 +01:00
Chris Wilson
7591844c19
drm: Fix kerneldoc warnings for drm_lease
...
drivers/gpu/drm/drm_lease.c:56: warning: No description found for parameter 'lessee_id'
drivers/gpu/drm/drm_lease.c:56: warning: Excess function parameter 'id' description in '_drm_find_lessee'
drivers/gpu/drm/drm_lease.c:114: warning: No description found for parameter 'file_priv'
drivers/gpu/drm/drm_lease.c:114: warning: Excess function parameter 'master' description in '_drm_lease_held'
drivers/gpu/drm/drm_lease.c:134: warning: No description found for parameter 'file_priv'
drivers/gpu/drm/drm_lease.c:134: warning: Excess function parameter 'master' description in 'drm_lease_held'
drivers/gpu/drm/drm_lease.c:158: warning: No description found for parameter 'crtcs_in'
drivers/gpu/drm/drm_lease.c:158: warning: Excess function parameter 'crtcs' description in 'drm_lease_filter_crtcs'
drivers/gpu/drm/drm_lease.c:311: warning: No description found for parameter 'top'
drivers/gpu/drm/drm_lease.c:311: warning: Excess function parameter 'master' description in '_drm_lease_revoke'
drivers/gpu/drm/drm_lease.c:494: warning: No description found for parameter 'lessor_priv'
drivers/gpu/drm/drm_lease.c:494: warning: Excess function parameter 'file_priv' description in 'drm_mode_create_lease_ioctl'
drivers/gpu/drm/drm_lease.c:672: warning: No description found for parameter 'lessee_priv'
drivers/gpu/drm/drm_lease.c:672: warning: Excess function parameter 'file_priv' description in 'drm_mode_get_lease_ioctl'
drivers/gpu/drm/drm_lease.c:733: warning: No description found for parameter 'lessor_priv'
drivers/gpu/drm/drm_lease.c:733: warning: Excess function parameter 'file_priv' description in 'drm_mode_revoke_lease_ioctl'
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20180208110817.30057-1-chris@chris-wilson.co.uk
2018-02-19 10:49:59 +01:00
Colin Ian King
f42bd94628
drm/bochs: make structure bochs_bo_driver static
...
The structure bochs_bo_driver is local to the source and does not need to
be in global scope, so make it static.
Cleans up sparse warning:
drivers/gpu/drm/bochs/bochs_mm.c:197:22: warning: symbol 'bochs_bo_driver'
was not declared. Should it be static?
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20180207111353.30261-1-colin.king@canonical.com
2018-02-19 10:43:44 +01:00
Ørjan Eide
57de50af16
drm/rockchip: Respect page offset for PRIME mmap calls
...
When mapping external DMA-bufs through the PRIME mmap call, we might be
given an offset which has to be respected. However for the internal DRM
GEM mmap path, we have to ignore the fake mmap offset used to identify
the buffer only. Currently the code always zeroes out vma->vm_pgoff,
which breaks the former.
This patch fixes the problem by moving the vm_pgoff assignment to a
function that is used only for GEM mmap path, so that the PRIME path
retains the original offset.
Cc: Daniel Kurtz <djkurtz@chromium.org >
Signed-off-by: Ørjan Eide <orjan.eide@arm.com >
Signed-off-by: Tomasz Figa <tfiga@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Thierry Escande <thierry.escande@collabora.com >
Tested-by: Heiko Stuebner <heiko@sntech.de >
Signed-off-by: Heiko Stuebner <heiko@sntech.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20180130202913.28724-4-thierry.escande@collabora.com
2018-02-18 11:16:55 +01:00
Haixia Shi
6fd0bfe2f7
drm/rockchip: support prime import sg table
...
The prime fd to handle ioctl was not used with rockchip before. Support
was added in order to pass graphics_Gbm and to support potential uses
within Chrome OS (e.g. zero-copy video decode, camera).
Signed-off-by: Haixia Shi <hshi@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Thierry Escande <thierry.escande@collabora.com >
Tested-by: Heiko Stuebner <heiko@sntech.de >
Signed-off-by: Heiko Stuebner <heiko@sntech.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20180130202913.28724-3-thierry.escande@collabora.com
2018-02-18 11:16:40 +01:00
Tomasz Figa
b4a92d0eef
drm/rockchip: Get rid of unnecessary struct fields
...
This patch removes unused fields from vop structure.
Signed-off-by: Tomasz Figa <tfiga@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Thierry Escande <thierry.escande@collabora.com >
Signed-off-by: Heiko Stuebner <heiko@sntech.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20180130202913.28724-2-thierry.escande@collabora.com
2018-02-18 11:16:19 +01:00
Fabio Estevam
a2fad8d1bd
drm/rockchip: inno_hdmi: Remove unnecessary platform_get_resource() error check
...
devm_ioremap_resource() already checks if the resource is NULL, so
remove the unnecessary platform_get_resource() error check.
Cc: Heiko Stübner <heiko@sntech.de >
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com >
Signed-off-by: Heiko Stuebner <heiko@sntech.de >
Link: https://patchwork.freedesktop.org/patch/msgid/1513602150-7542-4-git-send-email-festevam@gmail.com
2018-02-18 11:15:29 +01:00