1
0
Fork 0
Commit Graph

842236 Commits (1e9907362453b9ddf9e73a144bec91f15ca0d536)

Author SHA1 Message Date
Daniel Vetter 1e99073624 drm/doc: Document kapi doc expectations
We've had this already for anything new. With my drm_prime.c cleanup I
also think documentation for everything already existing is complete,
and we can bake this in as a requirements subsystem wide.

v2: Improve wording a bit (Laurent), fix typo in commit message (Sam).

Acked-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Sean Paul <sean@poorly.run>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Sean Paul <sean@poorly.run>
Link: https://patchwork.freedesktop.org/patch/msgid/20190704145054.5701-1-daniel.vetter@ffwll.ch
2019-07-19 15:02:37 +02:00
Douglas Anderson e362cc6a24 drm/panel: simple: document panel_desc; rename a few functions
This attempts to address outstanding review feedback from
commit b8a2948fa2 ("drm/panel: simple: Add ability to override typical timing")

Specifically:

* It was requested that I document (in the structure definition) that
  the device tree override had no effect if 'struct drm_display_mode'
  was used in the panel description.  I have provided full Doxygen
  comments for 'struct panel_desc' to accomplish that.
* panel_simple_get_fixed_modes() was thought to be a confusing name,
  so it has been renamed to panel_simple_get_display_modes().
* panel_simple_parse_override_mode() was thought to be better named as
  panel_simple_parse_panel_timing_node().

Suggested-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190712163333.231884-1-dianders@chromium.org
2019-07-17 19:27:33 +02:00
Sean Paul 57a1b08937 drm: Make the bw/link rate calculations more forgiving
Although the DisplayPort spec explicitly calls out the 1.62/2.7/5.4/8.1
link rates, the value of LINK_BW_SET is calculated.  The DisplayPort
spec says "Main-Link Bandwidth Setting = Value x 0.27Gbps/lane".

A bridge that we're looking to upstream uses 6.75Gbps rate (value 0x19)
[1], and that precludes it from using these functions.

This 6.75Gbps rate is defined in the spec as (credit to Ville for posting this):
  A MyDP Source device, upon reading the MAX_LINK_RATE register of the
  downstream DPRX programmed to 19h (which can be the case only for a
  MyDP-to-Legacy or MyDP-to-DP lane count converter) can program the
  LINK_BW_SET register (DPCD Address 00100h) to 19h to enable 6.75Gbps/lane."

So to avoid failing on legitimate rates in the future, this patch calculates thevalues according to spec instead of restricting these values to one of the
DP_LINK_BW_* #defines.

No functional change for the well-defined values, but we lose the
warning (and return the correct value) for ill-defined bw values.

Signed-off-by: Sean Paul <seanpaul@chromium.org>

[1] https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1689251/2/drivers/gpu/drm/bridge/analogix/anx7625.c#636

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190717160148.256826-1-sean@poorly.run
2019-07-17 12:45:30 -04:00
Sam Ravnborg 9aef5867c8 drm/mediatek: drop use of drmP.h
Drop use of the deprecated drmP.h header file.

While touching the include files divide them up in blocks
in the typical order:

\#include <linux/*>

\#include <video/*>

\#include <drm/*>

\#include ""

And sort the includes in the blocks
Add the necessary includes to fix build after removal of drmP.h

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mediatek@lists.infradead.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190716064220.18157-20-sam@ravnborg.org
2019-07-17 12:52:55 +02:00
Sam Ravnborg c2156ccd96 drm/rockchip: drop use of drmP.h
Drop use of the deprecated drmP.h header file.

While touching the list of include files move the
blocks so they follow the common pattern:

\#include <linux/*>

\#include <video/*>

\#include <drm/*>

\#include ""

Within each block sort the include files.
Add the includes needed to fix build after the removal of drmP.h.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Cc: Sandy Huang <hjc@rock-chips.com>
Cc: "Heiko Stübner" <heiko@sntech.de>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190716064220.18157-19-sam@ravnborg.org
2019-07-17 12:52:55 +02:00
Sam Ravnborg 05f0940b4d drm/imx: drop use of drmP.h
Drop use of the deprecated drmP.h header file.
While touching the include files divide them in blocks and sort the
include files within each block.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: linux-arm-kernel@lists.infradead.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190716064220.18157-18-sam@ravnborg.org
2019-07-17 12:52:55 +02:00
Sam Ravnborg 71466ffd73 drm/i2c/sil164: drop use of drmP.h
Drop use of the deprecated drmP.h header file.
Fix fallout.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Francisco Jerez <currojerez@riseup.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20190716064220.18157-17-sam@ravnborg.org
2019-07-17 12:52:55 +02:00
Sam Ravnborg 758380bd5b drm/i2c/ch7006: drop use of drmP.h
Drop using the deprecated drmP.h header file.
Fix fallout.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20190716064220.18157-16-sam@ravnborg.org
2019-07-17 12:52:55 +02:00
Sam Ravnborg fcb5766417 drm/tilcdc: drop use of drmP.h
Dropped drmP.h and all other header files not used by tilcdc_drv.h.
Added the minimal includes and forwards to make the header file
self-contained.

Then dropped the remaining uses of drmP.h and fixed all fall-out.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Cc: Jyri Sarha <jsarha@ti.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20190716064220.18157-15-sam@ravnborg.org
2019-07-17 12:52:55 +02:00
Sam Ravnborg 2175749b36 drm/i810: drop use of drmP.h
Drop use of the deprecated drmP.h header.
Replace with necessary includes.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190716064220.18157-14-sam@ravnborg.org
2019-07-17 12:52:55 +02:00
Sam Ravnborg 7b42a2f4e4 drm/vgem: drop use of drmP.h
Drop use of the deprecated header drmP.h.
Replace with necessary includes in the individual .c files.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Deepak Sharma <deepak.sharma@amd.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20190716064220.18157-13-sam@ravnborg.org
2019-07-17 12:52:55 +02:00
Sam Ravnborg 53fa84b2fa drm/tdfx: drop use of drmP.h
Replace drmP.h include with necessary include files.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20190716064220.18157-12-sam@ravnborg.org
2019-07-17 12:52:55 +02:00
Sam Ravnborg 54ccae0c08 drm/selftests: drop use of drmP.h
Drop the single user of drmP.h - replace it with relevant includes.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Alexandru-Cosmin Gheorghe <Alexandru-Cosmin.Gheorghe@arm.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190716064220.18157-11-sam@ravnborg.org
2019-07-17 12:52:55 +02:00
Sam Ravnborg 81f6156ca5 drm/omapdrm: drop use of drmP.h
Drop use of the deprecated header drmP.h.
Rearranged list of include files to match rest of
DRM too.
The drmP.h file was deleted from the header file, and the necessary
includes was added to the .c files to fix build.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20190716064220.18157-10-sam@ravnborg.org
2019-07-17 12:52:55 +02:00
Sam Ravnborg a9dcf3804a drm/udl: drop use of drmP.h
The drmP.h header file is deprecated.
Drop it from all files in the udl driver.

Made the header files self contained, which then
made it simpler to update the .c files.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Robert Tarasov <tutankhamen@chromium.org>
Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: "Noralf Trønnes" <noralf@tronnes.org>
Cc: Eric Anholt <eric@anholt.net>
Cc: Mikulas Patocka <mpatocka@redhat.com>
Cc: Emil Lundmark <lndmrk@chromium.org>
Cc: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190716064220.18157-9-sam@ravnborg.org
2019-07-17 12:52:55 +02:00
Sam Ravnborg 9e28e0ce2d drm/r128: drop use of drmP.h
Replace use of the deprecated drmP.h header file
with relevant includes.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20190716064220.18157-8-sam@ravnborg.org
2019-07-17 12:52:55 +02:00
Sam Ravnborg fd6d6d80cb drm/vc4: drop use of drmP.h
Drop use of the deprecated header drmP.h.
Fix so vc4_drv.h is now self-contained, and fixed fall-out in remaining
files.

Divided include files in blocks.
Sorted include files within their blocks.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20190716064220.18157-7-sam@ravnborg.org
2019-07-17 12:52:45 +02:00
Sam Ravnborg 9c25a29766 drm/sun4i: drop use of drmP.h
Drop use of the deprecated drmP.h header file.

While touching the list of include file, use the typical order of the
blocks:
\#include <linux/*>

\#include <video/*>

\#include <drm/*>

\#include ""

Within each block, sort the files.
Include necessary files to fix build after the drmP.h removal.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: linux-arm-kernel@lists.infradead.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190716064220.18157-6-sam@ravnborg.org
2019-07-17 12:52:45 +02:00
Sam Ravnborg 647d295b70 drm/zte: drop use of drmP.h
Drop use of the deprecated drmP.h header file.
Fix fallout.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20190716064220.18157-5-sam@ravnborg.org
2019-07-17 12:52:45 +02:00
Sam Ravnborg 09a56fbe8a drm/pl111: drop use of drmP.h
Drop use of the deprecated drmP.h header.
Sort includes in blocks while touching the files.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20190716064220.18157-4-sam@ravnborg.org
2019-07-17 12:52:38 +02:00
Sam Ravnborg 220989e709 drm/v3d: drop use of drmP.h
Drop use of the deprecated drmP.h header file.
Made v3d_drv.h self-contained with only sufficient
include files.
Fixed fallout in remaining files.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20190716064220.18157-3-sam@ravnborg.org
2019-07-17 12:52:20 +02:00
Sam Ravnborg 66620f48cb drm/meson: drop use of drmP.h
Drop use of the deprecated drmP.h header.
While doing so used the opportunity
to clean up a little so includes are now
sorted and removed unused include files.
In a few cases added some forwards to allow header
files to built in different include order.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Maxime Jourdan <mjourdan@baylibre.com>
Cc: Jerome Brunet <jbrunet@baylibre.com>
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190716064220.18157-2-sam@ravnborg.org
2019-07-17 12:47:57 +02:00
Chris Wilson 30fe7b07f6 dma-buf: Relax the write-seqlock for reallocating the shared fence list
As the set of shared fences is not being changed during reallocation of
the reservation list, we can skip updating the write_seqlock.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Christian König <christian.koenig@amd.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20190712080314.21018-2-chris@chris-wilson.co.uk
2019-07-16 21:02:39 +01:00
Qian Cai 45b2fda3d8 gpu/drm: fix a few kernel-doc "/**" mark warnings
The opening comment mark "/**" is reserved for kernel-doc comments, so
it will generate warnings for comments that are not kernel-doc with
"make W=1". For example,

drivers/gpu/drm/drm_memory.c:2: warning: Cannot understand  * \file
drm_memory.c

Signed-off-by: Qian Cai <cai@lca.pw>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1563198173-7317-1-git-send-email-cai@lca.pw
2019-07-16 11:25:02 +02:00
Rob Clark 66a639cbe3 drm/bridge: ti-sn65dsi86: use dev name for debugfs
This should be more future-proof if we ever encounter a device with two
of these bridges.

Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190706203105.7810-1-robdclark@gmail.com
2019-07-16 09:53:03 +02:00
Nishka Dasgupta 0a869e8d82 drm/pl111: pl111_vexpress.c: Add of_node_put() before return
Each iteration of for_each_available_child_of_node puts the previous
node, but in the case of a break from the middle of the loop there is
no put, thus causing a memory leak. Hence add an of_node_put before the
break.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20190706132742.3250-1-nishkadg.linux@gmail.com
2019-07-15 16:26:43 -07:00
Sam Ravnborg 71866a56bc drm/atmel_hlcdc: drop use of drmP.h
Drop use of the deprecated header drmP.h.
Make header file self-contained, with only the required set
of include files.
And fixed fallout in remaining files.
Divide include files in blocks and sort them within each block.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
Cc: linux-arm-kernel@lists.infradead.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190630061922.7254-15-sam@ravnborg.org
2019-07-15 18:11:31 +02:00
Sam Ravnborg a803bf0ade drm/shmobile: drop use of drmP.h
Drop use of the deprecated drmP.h header file.
Fix fallout.

v2:
- Add additional include/forward to shmob_drm_crtc.h
  to avoid relying on indirect includes (Laurent)
- Add additional includes to shmob_drm_regs.h to make
  it self-contained
- Add additional includes to shmob_drm_plane.h to make
  it self-contained

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Cc: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: linux-renesas-soc@vger.kernel.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190715090227.GA27652@ravnborg.org
2019-07-15 18:11:31 +02:00
Sam Ravnborg 40b4db43f7 drm/hisilicon: drop use of drmP.h
Drop the deprecated drmP.h header file.

Made the header file selfcontained, and dropped unused header files.
Fixed fallout in remaining files.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com>
Cc: Rongrong Zou <zourongrong@gmail.com>
Cc: Xinwei Kong <kong.kongxinwei@hisilicon.com>
Cc: Chen Feng <puck.chen@hisilicon.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Allison Randal <allison@lohutok.net>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Souptick Joarder <jrdr.linux@gmail.com>
Cc: John Garry <john.garry@huawei.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: Junwei Zhang <Jerry.Zhang@amd.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: CK Hu <ck.hu@mediatek.com>
Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Eric Anholt <eric@anholt.net>
Cc: "Noralf Trønnes" <noralf@tronnes.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190630061922.7254-34-sam@ravnborg.org
2019-07-15 18:11:31 +02:00
Sam Ravnborg fbbbd1608b drm/ast: drop use of drmP.h
Drop use of the deprecated drmP.h header file.
While touching the files divide include files in blocks
and sort the include files in the individual blocks.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: Sam Bobroff <sbobroff@linux.ibm.com>
Cc: YueHaibing <yuehaibing@huawei.com>
Cc: Huang Rui <ray.huang@amd.com>
Cc: "Y.C. Chen" <yc_chen@aspeedtech.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190630061922.7254-33-sam@ravnborg.org
2019-07-15 18:11:31 +02:00
Sam Ravnborg 016f363ee1 drm/bochs: drop use of drmP.h
Drop use of the deprecated drmP.h header file.
Made bochs.h self-contained and then fixed
fallout in remaining files.
Several unused includes was dropped in the process.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: virtualization@lists.linux-foundation.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190630061922.7254-32-sam@ravnborg.org
2019-07-15 18:11:31 +02:00
Sam Ravnborg 322d0c84d3 drm: add missing include to drm_vram_mm_helper.h
The macro DRM_VRAM_MM_FILE_OPERATIONS referencs
functions declared in other header files.
Include these header files so this header files
pulls in what it references.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
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>
Link: https://patchwork.freedesktop.org/patch/msgid/20190630061922.7254-31-sam@ravnborg.org
2019-07-15 18:11:31 +02:00
Sam Ravnborg a3d639776e drm/virtgpu: drop use of drmP.h
Drop use of the deprecated drmP.h header file.
Fix fallout by adding missing include files.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: virtualization@lists.linux-foundation.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190630061922.7254-28-sam@ravnborg.org
2019-07-15 18:11:31 +02:00
Sam Ravnborg 7c1be93c8e drm/scheduler: drop use of drmP.h
Drop use of the deprecated drmP.h header file.
Fix fallout.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Christian König <christian.koenig@amd.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Cc: Huang Rui <ray.huang@amd.com>
Cc: Eric Anholt <eric@anholt.net>
Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: Sharat Masetty <smasetty@codeaurora.org>
Cc: Nathan Chancellor <natechancellor@gmail.com>
Cc: Nayan Deshmukh <nayan26deshmukh@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190630061922.7254-26-sam@ravnborg.org
2019-07-15 18:11:31 +02:00
Sam Ravnborg ce672a1b21 drm/vkms: drop use of drmP.h
Drop use of the deprecated drmP.h header.
Replace it with the necessary includes in the individual .c files.
The header files was self-contained, and extra includes were not added
there.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Cc: Haneen Mohammed <hamohammed.sa@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: David Airlie <airlied@linux.ie>
Link: https://patchwork.freedesktop.org/patch/msgid/20190630061922.7254-13-sam@ravnborg.org
2019-07-15 18:11:30 +02:00
Sam Ravnborg c0f4b75c06 drm/qxl: drop use of drmP.h
Drop use of the deprecated drmP.h header file.
While touching the files divided includes in blocks,
and when needed sort the blocks.
Fix fallout.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: virtualization@lists.linux-foundation.org
Cc: spice-devel@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190630061922.7254-10-sam@ravnborg.org
2019-07-15 18:11:30 +02:00
Sam Ravnborg b4b21c8395 drm/fsl-dcu: drop use of drmP.h
Drop use of the deprecated drmP.h header file.
Fix fallout.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Stefan Agner <stefan@agner.ch>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Cc: Alison Wang <alison.wang@nxp.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190630061922.7254-9-sam@ravnborg.org
2019-07-15 18:11:30 +02:00
Sam Ravnborg d5742c6cfa drm/mxsfb: drop use of drmP.h
Drop use of the deprecated drmP.h header file.

While touching the list of include files divided them
in blocks and sort them within each block.
Fixed fallout in the relevant files.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Stefan Agner <stefan@agner.ch>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Cc: Marek Vasut <marex@denx.de>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: linux-arm-kernel@lists.infradead.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190630061922.7254-6-sam@ravnborg.org
2019-07-15 18:11:30 +02:00
Sam Ravnborg 91328ebe4f drm/tve200: drop use of drmP.h
Drop use of the deprecated header drmP.h.

Fix so header file became self-contained,
and then fixed fallout in the other files.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20190630061922.7254-5-sam@ravnborg.org
2019-07-15 18:11:30 +02:00
Sam Ravnborg 2ea2269e29 drm/xen: drop use of drmP.h
The drmP.h header is deprecated.  Drop all uses.
Added includes/forwards to the header files and
then fixed fallout in the .c files.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Cc: xen-devel@lists.xenproject.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190630061922.7254-3-sam@ravnborg.org
2019-07-15 18:11:30 +02:00
Maya Rashish c3bbb48e0c drm/agp: Remove unused function drm_agp_bind_pages
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Maya Rashish <coypu@sdf.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190710161725.GA5042@SDF.ORG
2019-07-15 18:11:30 +02:00
Chris Wilson 94eb1e10a3 dma-buf: Expand reservation_list to fill allocation
Since kmalloc() will round up the allocation to the next slab size or
page, it will normally return a pointer to a memory block bigger than we
asked for. We can query for the actual size of the allocated block using
ksize() and expand our variable size reservation_list to take advantage
of that extra space.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Christian König <christian.koenig@amd.com>
Cc: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190712080314.21018-1-chris@chris-wilson.co.uk
2019-07-15 12:08:05 +01:00
Chris Wilson 913cafbb25 drm/vgem: Reclassify buffer creation debug message
A buffer is created in response to the user ioctl, it should therefore
be a plain DRM_DEBUG() message to reflect it being a user invoked
response and not a driver construct.

This is just to make the commonplace drm.debug=[26e] quieter when
running with vgem.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20190712120147.29830-1-chris@chris-wilson.co.uk
2019-07-12 17:35:37 +01:00
Lucas Stach f8c6bfc612 drm/panel: simple: fix AUO g185han01 horizontal blanking
The horizontal blanking periods are too short, as the values are
specified for a single LVDS channel. Since this panel is dual LVDS
they need to be doubled. With this change the panel reaches its
nominal vrefresh rate of 60Fps, instead of the 64Fps with the
current wrong blanking.

Philipp Zabel added:
The datasheet specifies 960 active clocks + 40/128/160 clocks blanking
on each of the two LVDS channels (min/typical/max), so doubled this is
now correct.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1562764060.23869.12.camel@pengutronix.de
2019-07-12 18:13:26 +02:00
Joshua.Henderson@microchip.com e3c91a88e4 drm/atmel-hlcdc: set layer REP bit to enable replication logic
This bit enables replication logic to expand an RGB color less than 24
bits, to 24 bits, which is used internally for all formats.  Otherwise,
the least significant bits are always set to zero and the color may not
be what is expected.

Signed-off-by: Joshua Henderson <joshua.henderson@microchip.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1562686509-8747-1-git-send-email-joshua.henderson@microchip.com
2019-07-12 17:48:48 +02:00
Douglas Anderson 374bf825e7 drm/panel: simple: Use display_timing for AUO b101ean01
Convert the AUO b101ean01 from using a fixed mode to specifying a
display timing with min/typ/max values.

The AUO b101ean01's datasheet says:
* Vertical blanking min is 12
* Horizontal blanking min is 60
* Pixel clock is between 65.3 MHz and 75 MHz

The goal here is to be able to specify the proper timing in device
tree to use on rk3288-veyron-minnie to match what the downstream
kernel is using so that it can used the fixed PLL.

Changes in v4:
 - display_timing for AUO b101ean01 new for v4.
Changes in v6:
 - Rebased to drm-misc next
 - Added tags

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Acked-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190711203455.125667-4-dianders@chromium.org
2019-07-12 07:55:47 +02:00
Douglas Anderson d719cbe9a5 drm/panel: simple: Use display_timing for Innolux n116bge
Convert the Innolux n116bge from using a fixed mode to specifying a
display timing with min/typ/max values.

Note that the n116bge's datasheet doesn't fit too well into DRM's way
of specifying things.  Specifically the panel's datasheet just
specifies the vertical blanking period and horizontal blanking period
and doesn't break things out.  For now we'll leave everything as a
fixed value but just allow adjusting the pixel clock.  I've added a
comment on what the datasheet claims so someone could later expand
things to fit their needs if they wanted to test other blanking
periods.

The goal here is to be able to specify the panel timings in the device
tree for several rk3288 Chromebooks (like rk3288-veryon-jerry).  These
Chromebooks have all been running in the downstream kernel with the
standard porches and sync lengths but just with a slightly slower
pixel clock because the 76.42 MHz clock is not achievable from the
fixed PLL that was available.  These Chromebooks only achieve a
refresh rate of ~58 Hz.  While it's probable that we could adjust the
timings to achieve 60 Hz it's probably wisest to match what's been
running on these devices all these years.

I'll note that though the upstream kernel has always tried to achieve
76.42 MHz, it has actually been running at 74.25 MHz also since the
video processor is parented off the same fixed PLL.

Changes in v4:
 - display_timing for Innolux n116bge new for v4.
Changes in v5:
 - Added Heiko's Tested-by
Changes in v6:
 - Rebased to drm-misc next
 - Added tags

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190711203455.125667-3-dianders@chromium.org
2019-07-12 07:55:47 +02:00
Sean Paul b8a2948fa2 drm/panel: simple: Add ability to override typical timing
This patch adds the ability to override the typical display timing for a
given panel. This is useful for devices which have timing constraints
that do not apply across the entire display driver (eg: to avoid
crosstalk between panel and digitizer on certain laptops). The rules are
as follows:

- panel must not specify fixed mode (since the override mode will
  either be the same as the fixed mode, or we'll be unable to
  check the bounds of the overried)
- panel must specify at least one display_timing range which will be
  used to ensure the override mode fits within its bounds

Changes in v2:
 - Parse the full display-timings node (using the native-mode) (Rob)
Changes in v3:
 - No longer parse display-timings subnode, use panel-timing (Rob)
Changes in v4:
 - Don't add mode from timing if override was specified (Thierry)
 - Add warning if timing and fixed mode was specified (Thierry)
 - Don't add fixed mode if timing was specified (Thierry)
 - Refactor/rename a bit to avoid extra indentation from "if" tests
 - i should be unsigned (Thierry)
 - Add annoying WARN_ONs for some cases (Thierry)
 - Simplify 'No display_timing found' handling (Thierry)
 - Rename to panel_simple_parse_override_mode() (Thierry)
Changes in v5:
 - Added Heiko's Tested-by
Changes in v6:
 - Rebased to drm-misc next
 - Added tags

Cc: Doug Anderson <dianders@chromium.org>
Cc: Eric Anholt <eric@anholt.net>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Jeffy Chen <jeffy.chen@rock-chips.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Stéphane Marchesin <marcheu@chromium.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: devicetree@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190711203455.125667-2-dianders@chromium.org
2019-07-12 07:55:46 +02:00
Rodrigo Siqueira a4e7e98e90 drm/vkms: Rename vkms_crc.c into vkms_composer.c
As a preparation work for introducing writeback to vkms, this patch
renames the file vkms_crc.c into vkms_composer.c. Accordingly, it also
adjusts the functions and data structures to match the changes.

No functional change.

Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/dea62063077ebf5cc1dfce8876e56788d15367e6.1561491964.git.rodrigosiqueiramelo@gmail.com
2019-07-12 00:46:02 -03:00
Rodrigo Siqueira e9d85f731d drm/vkms: Avoid assigning 0 for possible_crtc
When vkms invoke drm_universal_plane_init(), it sets 0 for
possible_crtcs parameter which means that planes can't be attached to
any CRTC. It currently works due to some safeguard in the drm_crtc file;
however, it is possible to identify the problem by trying to append a
second connector. This patch fixes this issue by modifying
vkms_plane_init() to accept an index parameter which makes the code a
little bit more flexible and avoid set zero to possible_crtcs.

Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/d67849c62a8d8ace1a0af455998b588798a4c45f.1561491964.git.rodrigosiqueiramelo@gmail.com
2019-07-12 00:45:49 -03:00