Thomas Zimmermann
f5ca8eb6f9
drm/cma-helper: Implement mmap as GEM CMA object functions
...
The new GEM object function drm_gem_cma_mmap() sets the VMA flags
and offset as in the old implementation and immediately maps in the
buffer's memory pages.
Changing CMA helpers to use the GEM object function allows for the
removal of the special implementations for mmap and gem_prime_mmap
callbacks. The regular functions drm_gem_mmap() and drm_gem_prime_mmap()
are now used.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201123115646.11004-3-tzimmermann@suse.de
2020-11-30 13:38:27 +01:00
Thomas Zimmermann
bc2532ab7c
drm/cma-helper: Remove prime infix from GEM object functions
...
These functions are not directly related to PRIME interfaces any
longer, but are now GEM object functions. Rename them accordingly
and fix the docs.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201123115646.11004-2-tzimmermann@suse.de
2020-11-30 13:38:11 +01:00
Douglas Anderson
a96ee0f6b5
drm: panel: simple: Add BOE NV110WTM-N61
...
Add support for the BOE NV110WTM-N61 panel. The EDID lists two modes
(one for 60 Hz refresh rate and one for 40 Hz), so we'll list both of
them here.
Note that the panel datasheet requires 80 ms between HPD asserting and
the backlight power being turned on. We'll use the new timing
constraints structure to do this cleanly. This assumes that the
backlight will be enabled _after_ the panel enable finishes. This is
how it works today and seems a sane assumption.
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201109170018.v4.4.I71b2118dfc00fd7b43b02d28e7b890081c2acfa2@changeid
2020-11-29 23:06:54 +01:00
Douglas Anderson
981963a211
dt-bindings: dt-bindings: display: simple: Add BOE NV110WTM-N61
...
Add yet another eDP panel.
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Acked-by: Rob Herring <robh@kernel.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201109170018.v4.5.I28d9e32b3cc0aae980ecc39d364263a3f9871298@changeid
2020-11-29 23:06:46 +01:00
Douglas Anderson
4beb04beb2
drm: panel: simple: Allow specifying the delay from prepare to enable
...
On the panel I'm looking at, there's an 80 ms minimum time between HPD
being asserted by the panel and setting the backlight enable GPIO.
While we could just add an 80 ms "enable" delay, this is not ideal.
Link training is allowed to happen in parallel with this delay so the
fixed 80 ms delay over-delays.
We'll support this by logging the time at the end of prepare and then
delaying in enable if enough time hasn't passed.
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201109170018.v4.3.Ib9ce3c6482f464bf594161581521ced46bbd54ed@changeid
2020-11-29 23:05:16 +01:00
Douglas Anderson
e5e30dfcf3
drm: panel: simple: Defer unprepare delay till next prepare to shorten it
...
It is believed that all of the current users of the "unprepare" delay
don't actually need to wait the amount of time specified directly in
the unprepare phase. The purpose of the delay that's specified is to
allow the panel to fully power off so that we don't try to power it
back on before it's managed to full power down.
Let's use this observation to avoid the fixed delay that we currently
have. Instead of delaying, we'll note the current time when the
unprepare happens. If someone then tries to prepare the panel later
and not enough time has passed, we'll do the delay before starting the
prepare phase.
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201109170018.v4.2.I06a95d83e7fa1bd919c8edd63dacacb5436e495a@changeid
2020-11-29 23:05:12 +01:00
Douglas Anderson
131f909ad5
drm: panel: simple: Fixup the struct panel_desc kernel doc
...
When I run:
scripts/kernel-doc -rst drivers/gpu/drm/panel/panel-simple.c
I see that several of the kernel-doc entries aren't showing up because
they don't specify the full path down the hierarchy. Let's fix that
and also move to inline kernel docs.
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201109170018.v4.1.Icaa86f0a4ca45a9a7184da4bc63386b29792d613@changeid
2020-11-29 23:05:07 +01:00
Dan Carpenter
eba0d703b3
drm/kmb: Remove an unnecessary NULL check
...
The NULL checking isn't done consistently in this function and it leads
to a static checker warning:
drivers/gpu/drm/kmb/kmb_drv.c:561 kmb_pm_suspend()
error: we previously assumed 'drm' could be null (see line 559)
Fortunately "drm" cannot be NULL at this point so the check can just be
removed.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Reviewed-by: Anitha Chrisanthus <anitha.chrisanthus@intel.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201117072137.GB1111239@mwanda
2020-11-29 23:03:18 +01:00
Tom Rix
95e22f8ca1
omapfb: fbcon: remove trailing semicolon in macro definition
...
The macro use will already have a semicolon.
Signed-off-by: Tom Rix <trix@redhat.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201127190508.2842786-1-trix@redhat.com
2020-11-29 22:53:33 +01:00
Sam Ravnborg
6fdf38e613
video: fbdev: s1d13xxxfb: Fix kernel-doc and set but not used warnings
...
Fix following W=1 warnings:
- Fix set but not used variables that were used only for logging.
Fixed by introducing no_printk() to trick compiler to think variables
are used
- Fix kernel-doc warning by deleting an empty comment line
v3:
- Fix grammar in commit message (Thomas)
v2:
- Subject updated (Lee)
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Kristoffer Ericson <kristoffer.ericson@gmail.com >
Cc: Lee Jones <lee.jones@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201128224114.1033617-29-sam@ravnborg.org
2020-11-29 22:51:07 +01:00
Sam Ravnborg
b1cba76de6
video: fbcon: Fix warnings by using pr_debug() in fbcon
...
Replacing DPRINTK() statements with pr_debug fixes set but not used
warnings. And moves to a more standard logging setup at the same time.
v2:
- Fix indent (Joe)
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Joe Perches <joe@perches.com >
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: Jiri Slaby <jirislaby@kernel.org >
Cc: Peilin Ye <yepeilin.cs@gmail.com >
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp >
Cc: George Kennedy <george.kennedy@oracle.com >
Cc: Nathan Chancellor <natechancellor@gmail.com >
Cc: Peter Rosin <peda@axentia.se >
Link: https://patchwork.freedesktop.org/patch/msgid/20201128224114.1033617-3-sam@ravnborg.org
2020-11-29 22:44:48 +01:00
Sam Ravnborg
891948966b
video: Fix kernel-doc warnings in of_display_timing + of_videomode
...
Fix kernel-doc warnings reported when using W=1.
v3:
- Do not replace '-' with ':' (Thomas)
v2:
- Improve subject (Lee)
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Lee Jones <lee.jones@linaro.org >
Cc: linux-fbdev@vger.kernel.org
Link: https://patchwork.freedesktop.org/patch/msgid/20201128224114.1033617-2-sam@ravnborg.org
2020-11-29 22:42:17 +01:00
Dafna Hirschfeld
a218a397f0
drm/rockchip: fix typo in Kconfig 's/HDMI/dsi/'
...
In the help of ROCKCHIP_DW_MIPI_DSI it said
it is a HDMI driver instead of a dsi driver.
Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com >
Signed-off-by: Heiko Stuebner <heiko@sntech.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20201116141609.26719-1-dafna.hirschfeld@collabora.com
2020-11-29 17:39:44 +01:00
Dafna Hirschfeld
f8c8c7d86d
drm/rockchip: for error print, use the correct device pointer
...
There is a use of DRM_DEV_ERROR(dsi->dev,..)
which should be replaced with DRM_DEV_ERROR(dev, ..)
since dsi->dev is set later
Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com >
Signed-off-by: Heiko Stuebner <heiko@sntech.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20201116141609.26719-2-dafna.hirschfeld@collabora.com
2020-11-29 17:39:33 +01:00
Jonathan Liu
6762b50d7d
drm/rockchip: dw_hdmi: fix incorrect clock in vpll clock error message
...
Error message incorrectly refers to grf clock instead of vpll clock.
Signed-off-by: Jonathan Liu <net147@gmail.com >
Signed-off-by: Heiko Stuebner <heiko@sntech.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20201024035321.4898-1-net147@gmail.com
2020-11-29 17:39:21 +01:00
Paul Cercueil
d6bff5b0bd
drm/ingenic: Add basic PM support
...
Call drm_mode_config_helper_suspend() and
drm_mode_config_helper_resume() on suspend and resume, respectively.
This makes sure that the display stack is properly disabled when the
hardware is put to sleep.
Signed-off-by: Paul Cercueil <paul@crapouillou.net >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201128171606.132830-1-paul@crapouillou.net
2020-11-28 20:00:49 +00:00
Daniel Vetter
57fcd550eb
drm/ttm: Warn on pinning without holding a reference
...
Not technically a problem for ttm, but very likely a driver bug and
pretty big time confusing for reviewing code.
So warn about it, both at cleanup time (so we catch these for sure)
and at pin/unpin time (so we know who's the culprit).
Reviewed-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Cc: Christian Koenig <christian.koenig@amd.com >
Cc: Huang Rui <ray.huang@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201028113120.3641237-1-daniel.vetter@ffwll.ch
2020-11-27 16:43:54 +01:00
Randy Dunlap
c6c90c70db
fbdev: aty: SPARC64 requires FB_ATY_CT
...
It looks like SPARC64 requires FB_ATY_CT to build without errors,
so have FB_ATY select FB_ATY_CT if both SPARC64 and PCI are enabled
instead of using "default y if SPARC64 && PCI", which is not strong
enough to prevent build errors.
As it currently is, FB_ATY_CT can be disabled, resulting in build
errors:
ERROR: modpost: "aty_postdividers" [drivers/video/fbdev/aty/atyfb.ko] undefined!
ERROR: modpost: "aty_ld_pll_ct" [drivers/video/fbdev/aty/atyfb.ko] undefined!
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be >
Fixes: f7018c2135 ("video: move fbdev to drivers/video/fbdev")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org >
Cc: "David S. Miller" <davem@davemloft.net >
Cc: sparclinux@vger.kernel.org
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-fbdev@vger.kernel.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: David Airlie <airlied@linux.ie >
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com >
Cc: Geert Uytterhoeven <geert@linux-m68k.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20201127031752.10371-1-rdunlap@infradead.org
2020-11-27 16:14:02 +01:00
Bernard Zhao
584e599bd0
via/via_irq: use __func__ to replace string function name
...
This change also fix checkpatch.pl warning:
WARNING: Prefer using '"%s...", __func__' to using
'via_driver_irq_postinstall', this function's name, in a string
+ DRM_DEBUG("via_driver_irq_postinstall\n");
Signed-off-by: Bernard Zhao <bernard@vivo.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20201119072957.108941-1-bernard@vivo.com
2020-11-27 16:14:02 +01:00
Christian König
9afdda82ee
drm/radeon: fix check order in radeon_bo_move
...
Reorder the code to fix checking if blitting is available.
Signed-off-by: Christian König <christian.koenig@amd.com >
Fixes: 28a68f8282 ("drm/radeon/ttm: use multihop")
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Link: https://patchwork.freedesktop.org/patch/403847/
2020-11-27 11:31:12 +01:00
Laurentiu Palcu
05faf1559d
drm/imx/dcss: allow using nearest neighbor interpolation scaling
...
This patch adds support for using NN interpolation scaling by setting the
SCALING_FILTER plane property to 1. Otherwise, the default method is used.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com >
Reviewed-by: Lucas Stach <l.stach@pengutronix.de >
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20201105145018.27255-1-laurentiu.palcu@oss.nxp.com
2020-11-26 11:29:44 +01:00
Laurentiu Palcu
594486b52c
drm/imx/dcss: fix coccinelle warning
...
This small patch fixes a warning that I got while running coccinelle:
CHECK drivers/gpu/drm/imx/dcss/dcss-plane.c
drivers/gpu/drm/imx/dcss/dcss-plane.c:107:21-23: WARNING !A || A && B is equivalent to !A || B
Fixes: 9021c317b7 ("drm/imx: Add initial support for DCSS on iMX8MQ")
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com >
Reviewed-by: Lucas Stach <l.stach@pengutronix.de >
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20201105140127.25249-3-laurentiu.palcu@oss.nxp.com
2020-11-26 11:29:40 +01:00
Laurentiu Palcu
59cb403f38
drm/imx/dcss: fix rotations for Vivante tiled formats
...
DCSS supports 90/180/270 degree rotations for Vivante tiled and super-tiled
formats. Unfortunately, with the current code, they didn't work properly.
This simple patch makes the rotations work by fixing the way the scaler is set
up for 90/270 degree rotations. In this particular case, the source width and
height need to be swapped since DPR is sending the buffer to scaler already
rotated.
Also, make sure to allow full rotations for DRM_FORMAT_MOD_VIVANTE_SUPER_TILED.
Fixes: 9021c317b7 ("drm/imx: Add initial support for DCSS on iMX8MQ")
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com >
Reviewed-by: Lucas Stach <l.stach@pengutronix.de >
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20201105140127.25249-2-laurentiu.palcu@oss.nxp.com
2020-11-26 11:29:18 +01:00
Colin Ian King
ab43108d0d
drm/mcde: fix masking and bitwise-or on variable val
...
The masking of val with ~MCDE_CRX1_CLKSEL_MASK is currently being
ignored because there seems to be a missing bitwise-or of val in the
following statement. Fix this by replacing the assignment of val
with a bitwise-or.
Fixes: d795fd3220 ("drm/mcde: Support DPI output")
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Addresses-Coverity: ("Unused valued")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201124121528.395681-1-colin.king@canonical.com
2020-11-25 21:58:35 +01:00
Maarten Lankhorst
bf8975837d
dma-buf/dma-resv: Respect num_fences when initializing the shared fence list.
...
We hardcode the maximum number of shared fences to 4, instead of
respecting num_fences. Use a minimum of 4, but more if num_fences
is higher.
This seems to have been an oversight when first implementing the
api.
Fixes: 04a5faa8cb ("reservation: update api and add some helpers")
Cc: <stable@vger.kernel.org > # v3.17+
Reported-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com >
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201124115707.406917-1-maarten.lankhorst@linux.intel.com
2020-11-25 10:48:28 +01:00