Thomas Gleixner
2874c5fd28
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152
...
Based on 1 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version
extracted by the scancode license scanner the SPDX license identifier
GPL-2.0-or-later
has been chosen to replace the boilerplate/reference in 3029 file(s).
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Reviewed-by: Allison Randal <allison@lohutok.net >
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-05-30 11:26:32 -07:00
Thomas Gleixner
ec8f24b7fa
treewide: Add SPDX license identifier - Makefile/Kconfig
...
Add SPDX license identifiers to all Make/Kconfig files which:
- Have no license information of any form
These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:
GPL-2.0-only
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-05-21 10:50:46 +02:00
Gerd Hoffmann
7415287e1f
drm: move tinydrm format conversion helpers to new drm_format_helper.c
...
Also rename them from tinydrm_* to drm_fb_*
Pure code motion, no functional change.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Reviewed-by: Noralf Trønnes <noralf@tronnes.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20190405095219.9231-2-kraxel@redhat.com
2019-04-08 06:59:26 +02:00
Noralf Trønnes
2afd9fcba6
drm/tinydrm: Remove tinydrm_device
...
No more users left so it can go alongside its helpers.
Update the tinydrm docs description and remove todo entry.
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20190225144232.20761-7-noralf@tronnes.org
2019-03-04 15:31:27 +01:00
Noralf Trønnes
d0a5163476
drm/tinydrm: Remove tinydrm_shutdown()
...
It's just a wrapper around drm_atomic_helper_shutdown() now.
Also store drm_device in the drvdata field, since that's what's used.
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20190210131039.52664-7-noralf@tronnes.org
2019-02-21 12:21:44 +01:00
Noralf Trønnes
96f2a9aef5
drm/tinydrm: tinydrm_display_pipe_init() don't use tinydrm_device
...
Rework function signature so tinydrm_device can be avoided.
Move definition to tinydrm-helpers.h so tinydrm.h can be deleted in a
later patch.
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20190210131039.52664-6-noralf@tronnes.org
2019-02-21 12:20:54 +01:00
Daniel Vetter
fcd70cd36b
drm: Split out drm_probe_helper.h
...
Having the probe helper stuff (which pretty much everyone needs) in
the drm_crtc_helper.h file (which atomic drivers should never need) is
confusing. Split them out.
To make sure I actually achieved the goal here I went through all
drivers. And indeed, all atomic drivers are now free of
drm_crtc_helper.h includes.
v2: Make it compile. There was so much compile fail on arm drivers
that I figured I'll better not include any of the acks on v1.
v3: Massive rebase because i915 has lost a lot of drmP.h includes, but
not all: Through drm_crtc_helper.h > drm_modeset_helper.h -> drmP.h
there was still one, which this patch largely removes. Which means
rolling out lots more includes all over.
This will also conflict with ongoing drmP.h cleanup by others I
expect.
v3: Rebase on top of atomic bochs.
v4: Review from Laurent for bridge/rcar/omap/shmob/core bits:
- (re)move some of the added includes, use the better include files in
other places (all suggested from Laurent adopted unchanged).
- sort alphabetically
v5: Actually try to sort them, and while at it, sort all the ones I
touch.
v6: Rebase onto i915 changes.
v7: Rebase once more.
Acked-by: Harry Wentland <harry.wentland@amd.com >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org >
Acked-by: Jani Nikula <jani.nikula@intel.com >
Acked-by: Neil Armstrong <narmstrong@baylibre.com >
Acked-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com >
Acked-by: CK Hu <ck.hu@mediatek.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Acked-by: Liviu Dudau <liviu.dudau@arm.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Cc: linux-arm-kernel@lists.infradead.org
Cc: virtualization@lists.linux-foundation.org
Cc: etnaviv@lists.freedesktop.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: intel-gfx@lists.freedesktop.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-msm@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
Cc: nouveau@lists.freedesktop.org
Cc: spice-devel@lists.freedesktop.org
Cc: amd-gfx@lists.freedesktop.org
Cc: linux-renesas-soc@vger.kernel.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-stm32@st-md-mailman.stormreply.com
Cc: linux-tegra@vger.kernel.org
Cc: xen-devel@lists.xen.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190117210334.13234-1-daniel.vetter@ffwll.ch
2019-01-24 13:20:42 +01:00
Noralf Trønnes
af74138160
drm/tinydrm: Use damage helper for dirtyfb
...
This switches to drm_atomic_helper_dirtyfb() as the framebuffer dirty
handler. All flushing will now happen in the pipe functions.
Also enable the damage plane property for all except repaper which can
only do full updates.
ili9225:
This change made ili9225_init() equal to mipi_dbi_init() so use it.
v3: Include vblank header (Sam)
ili9225 and st7586 can't use mipi_dbi_enable_flush() (David)
v2: Remove fb check in mipi_dbi_enable_flush() it can't be NULL
(kbuild test robot)
Cc: David Lechner <david@lechnology.com >
Cc: Eric Anholt <eric@anholt.net >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Tested-by: David Lechner <david@lechnology.com >
Reviewed-by: David Lechner <david@lechnology.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20190115043643.2364-5-noralf@tronnes.org
2019-01-17 10:57:15 +01:00
Noralf Trønnes
b051b3459b
drm/tinydrm: Use struct drm_rect
...
This prepares for the switch to drm_atomic_helper_dirtyfb() in the next
patch. The damage helper returns a drm_rect so switch to that everywhere
including using a pointer in the dirty functions.
This is a non-functional change except for the debug print which looks a
bit different.
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20190115043643.2364-4-noralf@tronnes.org
2019-01-17 10:57:03 +01:00
Sam Ravnborg
84056e9b45
drm/tinydrm: do not reply on drmP.h from drm_gem_cma_helper.h
...
drmP.h was the only header file in the past and a lot
of files rely on that drmP.h defines everything.
The goal is to one day to delete drmP.h and
as a step towards this it will no longer be included in the
headers files in include/drm/
To prepare tinydrm/ for this add dependencies that
othwewise was pulled in by drmP.h from drm_gem_cma_helper.h
To avoid that tinydrm.h became "include everything",
push include files to the individual drivers.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Noralf Trønnes <noralf@tronnes.org >
Acked-by: David Lechner <david@lechnology.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Eric Anholt <eric@anholt.net >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20190108192939.15255-12-sam@ravnborg.org
2019-01-09 22:48:56 +01:00
Noralf Trønnes
3db8d37dd8
drm/tinydrm: Use DRM_GEM_CMA_VMAP_DRIVER_OPS
...
The CMA helper now has the functionality to ensure a virtual address on
imported buffer so use that.
While touching all tinydrm drivers, remove the unnecessary inclusion of
drm_fb_helper.h in some drivers.
Cc: David Lechner <david@lechnology.com >
Cc: Eric Anholt <eric@anholt.net >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Link: https://patchwork.freedesktop.org/patch/msgid/20181110145647.17580-6-noralf@tronnes.org
2018-11-20 14:58:19 +01:00
Eric Anholt
dff906c3f9
drm/tinydrm: Advertise that we can do only DRM_FORMAT_MOD_LINEAR.
...
Without this, the xserver relies on what the 3D driver exposes and
assumes that the display can handle it, and then the DRM driver
happily tries to scan out a tiled format.
Signed-off-by: Eric Anholt <eric@anholt.net >
Link: https://patchwork.freedesktop.org/patch/msgid/20181025162635.6689-1-eric@anholt.net
Acked-by: Noralf Trønnes <noralf@tronnes.org >
2018-10-30 13:01:50 -07:00
Thomas Zimmermann
3ee53ae575
drm/tinydrm: Replace drm_dev_unref with drm_dev_put
...
This patch unifies the naming of DRM functions for reference counting
of struct drm_device. The resulting code is more aligned with the rest
of the Linux kernel interfaces.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20180713134601.14391-1-tzimmermann@suse.de
2018-08-07 17:09:15 +02:00
Noralf Trønnes
dff1c7032f
drm/tinydrm: Use drm_fbdev_generic_setup()
...
Make full use of the generic fbdev client.
Cc: David Lechner <david@lechnology.com >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Reviewed-by: David Lechner <david@lechnology.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180703160354.59955-8-noralf@tronnes.org
2018-07-10 14:54:33 +02:00
Daniel Vetter
ccc3b2b348
drm: Move simple_display_pipe prepare_fb helper into gem fb helpers
...
There's nothing tinydrm specific to this, and there's a few more
copies of the same in various other drivers.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Cc: Gustavo Padovan <gustavo@padovan.org >
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Sean Paul <seanpaul@chromium.org >
Cc: David Airlie <airlied@linux.ie >
Cc: David Lechner <david@lechnology.com >
Cc: "Noralf Trønnes" <noralf@tronnes.org >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Shawn Guo <shawnguo@kernel.org >
Cc: Neil Armstrong <narmstrong@baylibre.com >
Cc: Daniel Stone <daniels@collabora.com >
Cc: Haneen Mohammed <hamohammed.sa@gmail.com >
Cc: Ben Widawsky <ben@bwidawsk.net >
Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com >
Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com >
Acked-by: David Lechner <david@lechnology.com >
Reviewed-by: Noralf Trønnes <noralf@tronnes.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20180405154449.23038-3-daniel.vetter@ffwll.ch
2018-04-24 13:57:22 +02:00
Ville Syrjälä
e85d30060e
drm/tinydrm: Make fb_dirty into a lower level hook
...
mipi_dbi_enable_flush() wants to call the fb->dirty() hook from the
bowels of the .atomic_enable() hook. That prevents us from taking the
plane mutex in fb->dirty() unless we also plumb down the acquire
context.
Instead it seems simpler to split the fb->dirty() into a tinydrm
specific lower level hook that can be called from
mipi_dbi_enable_flush() and from a generic higher level
tinydrm_fb_dirty() helper. As we don't have a tinydrm specific
vfuncs table we'll just stick it into tinydrm_device directly
for now.
v2: Deal with the fb->dirty() in tinydrm_display_pipe_update() as well (Noralf)
Cc: "Noralf Trønnes" <noralf@tronnes.org >
Cc: David Lechner <david@lechnology.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Reviewed-by: Noralf Trønnes <noralf@tronnes.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20180323153509.15287-1-ville.syrjala@linux.intel.com
Reviewed-by: Noralf Trønnes <noralf@tronnes.org >
Tested-by: Noralf Trønnes <noralf@tronnes.org >
2018-03-28 19:19:32 +03:00
Daniel Vetter
a7d2a87e99
drm/tinydrm: Use gem_free_object_unlocked
...
tinydrm doesn't use dev->struct_mutex and therefore has no need to use
gem_free_object.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Cc: "Noralf Trønnes" <noralf@tronnes.org >
Acked-by: Noralf Trønnes <noralf@tronnes.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20180322105133.11211-2-daniel.vetter@ffwll.ch
2018-03-27 10:19:42 +02: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
Noralf Trønnes
fe4be3b8f3
drm/tinydrm: Embed the mode in tinydrm_connector
...
Embed the mode in tinydrm_connector instead of doing an devm_ allocation.
Remove unnecessary use of ret variable at the end of
tinydrm_display_pipe_init().
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Reviewed-by: David Lechner <david@lechnology.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180110185940.53841-7-noralf@tronnes.org
2018-01-15 15:16:59 +01:00
Noralf Trønnes
d3820952ea
drm/tinydrm: Use drm_fb_cma_fbdev_init_with_funcs/fini()
...
Use drm_fb_cma_fbdev_init_with_funcs() and drm_fb_cma_fbdev_fini() which
relies on the fact that drm_device holds a pointer to the drm_fb_helper
structure. This means that the driver doesn't have to keep track of that.
Also use the drm_fb_helper functions directly.
Remove todo entry.
Cc: David Lechner <david@lechnology.com >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Acked-by: David Lechner <david@lechnology.com >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Tested-by: David Lechner <david@lechnolgy.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171208193743.34450-11-noralf@tronnes.org
2017-12-10 15:37:07 +01:00
Noralf Trønnes
6e8e9a01ec
drm/tinydrm: Use drm_mode_config_helper_suspend/resume()
...
Replace driver's code with the generic helpers that do the same thing.
Remove todo entry.
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Reviewed-by: Stefan Agner <stefan@agner.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20171106191812.38927-6-noralf@tronnes.org
2017-11-30 18:19:15 +01:00
Harsha Sharma
b7fa1bdb10
drm/tinydrm: Replace list_for_each with list_for_each_entry
...
Replace use of list_for_each with list_for_each_entry to simplify the
code and remove variables that are used only in list_for_each.
Done with following coccinelle patch:
@r@
identifier fn,i,f,p;
expression e;
iterator name list_for_each, list_for_each_entry;
type T;
@@
fn(...) {
++ T *i;
<+...
- list_for_each(p,e)
+ list_for_each_entry(i,e,f)
{
...
- T *i = list_entry(p,T,f);
...
}
...+>
}
@@
identifier r.fn,r.p;
@@
fn(...) {
...
- struct list_head *p;
... when != p
}
@@
identifier r.fn,r.i,r.f;
expression r.e;
statement S;
@@
fn(...) {
<...
list_for_each_entry(i,e,f)
- {
S
- }
...>
}
@s@
identifier i,f,p;
expression e;
type T;
@@
- list_for_each(p,e)
+ list_for_each_entry(i,e,f)
{
... when != T *i;
- i = list_entry(p,T,f);
...
}
@@
identifier s.p;
@@
- struct list_head *p;
... when != p
@@
identifier s.i,s.f;
expression s.e;
statement S;
@@
list_for_each_entry(i,e,f)
- {
S
- }
Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20171014202823.29230-1-harshasharmaiitr@gmail.com
2017-10-21 16:28:41 +02:00
Haneen Mohammed
9205281cb3
drm/tinydrm: Remove explicit .best_encoder assignment
...
Since the driver is relying on the atomic helpers, remove the explicit
.best_encoder assignment and let the core call
drm_atomic_helper_best_encoder().
Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20171010205858.GA4806@Haneen
2017-10-13 17:34:51 +02:00
Noralf Trønnes
cce1a87788
drm/tinydrm: Use drm_gem_framebuffer_helper
...
Use drm_gem_framebuffer_helper directly instead of the cma
library wrappers.
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Reviewed-by: Eric Anholt <eric@anholt.net >
Link: https://patchwork.freedesktop.org/patch/msgid/1506255985-61113-2-git-send-email-noralf@tronnes.org
2017-10-01 16:59:49 +02:00