12 Jun, 2019
1 commit
-
Apparently little known fact that there's no need to hand-roll your own
anymore. Cc'ing a bunch of driver people who might want to know this
too.v2: s/none/known/ (Chris Wilson)
Cc: Rob Clark
Cc: Sebastian Reichel
Cc: Tomi Valkeinen
Cc: Maarten Lankhorst
Cc: Maxime Ripard
Cc: Sean Paul
Cc: Gerd Hoffmann
Cc: David Lechner
Cc: Noralf Trønnes
Cc: Hans de Goede
Reviewed-by: Noralf Trønnes
Signed-off-by: Daniel Vetter
Link: https://patchwork.freedesktop.org/patch/msgid/20190611112859.16375-1-daniel.vetter@ffwll.ch
28 Mar, 2019
1 commit
-
drm_framebuffer.h makes use of a pointer to struct drm_format_info but
doesn't include drm_fourcc.h (neither directly nor indirectly).
Forward-declare the structure.Signed-off-by: Laurent Pinchart
Reviewed-by: Jani Nikula
Reviewed-by: Sam Ravnborg
10 Jan, 2019
1 commit
-
Add forward declaration and pull in include
file to make drm_framebuffer.h self contained.While add it order include files alphabetically.
The use of TASK_COMM_LEN is the reason for including sched.h.
I could not see any good way to avoid this dependency,
and users of drm_framebuffer.comm already use
TASK_COMM_LEN to check for length etc.v2:
- Added forward declaration of drm_gem_object (Noralf)
- Added ack from NoralfSigned-off-by: Sam Ravnborg
Acked-by: Noralf Trønnes
Cc: Maarten Lankhorst
Cc: Maxime Ripard
Cc: Sean Paul
Cc: David Airlie
Cc: Daniel Vetter
Signed-off-by: Daniel Vetter
Link: https://patchwork.freedesktop.org/patch/msgid/20190108192939.15255-4-sam@ravnborg.org
25 Nov, 2018
1 commit
-
There are no more places where this (deprecated) function is being used
from, thus it can now be removed.Signed-off-by: Fernando Ramos
Reviewed-by: Linus Walleij
Signed-off-by: Linus Walleij
Link: https://patchwork.freedesktop.org/patch/msgid/20181115221634.22715-8-greenfoo@gluegarage.com
20 Dec, 2017
1 commit
-
This is is very useful to finding sources of leaked framebufers.
The fbcon fb is annotated with [fbcon], to give it a better name
than kworker.Signed-off-by: Maarten Lankhorst
Link: https://patchwork.freedesktop.org/patch/msgid/20171220093545.613-3-maarten.lankhorst@linux.intel.com
Reviewed-by: Daniel Vetter
21 Nov, 2017
1 commit
-
Bake in the conflict between the drm_print.h extraction and the
addition of DRM_DEBUG_LEASES since we lost it a few too many times.Also fix a new use of drm_plane_helper_check_state in msm to follow
Ville's conversion incommit a01cb8ba3f6282934cff65e89ab36b18b14cbe27
Author: Ville Syrjälä
Date: Wed Nov 1 22:16:19 2017 +0200drm: Move drm_plane_helper_check_state() into drm_atomic_helper.c
Acked-by: Ville Syrjälä
Signed-off-by: Daniel Vetter
11 Nov, 2017
1 commit
-
Constify argument so functions calling into this take a const argument.
Reviewed-by: Ville Syrjälä
Signed-off-by: Noralf Trønnes
Reviewed-by: Laurent Pinchart
Link: https://patchwork.freedesktop.org/patch/msgid/20171107191348.17555-3-noralf@tronnes.org
12 Oct, 2017
1 commit
-
This will allow __drm_mode_object_file to be extended to perform
access control checks based on the file in use.v2: Also fix up vboxvideo driver in staging
[airlied: merging early as this is an API change]
Suggested-by: Daniel Vetter
Signed-off-by: Keith Packard
Signed-off-by: Dave Airlie
17 Aug, 2017
1 commit
-
This library provides helpers for drivers that don't subclass
drm_framebuffer and are backed by drm_gem_object. The code is
taken from drm_fb_cma_helper.Signed-off-by: Noralf Trønnes
Reviewed-by: Daniel Vetter
Reviewed-by: Eric Anholt
Link: https://patchwork.freedesktop.org/patch/msgid/1502631125-13557-2-git-send-email-noralf@tronnes.org
14 Mar, 2017
1 commit
-
Pointer for Markus's image conversion work.
We need this so we can merge all the pretty drm graphs for 4.12.
Signed-off-by: Daniel Vetter
28 Feb, 2017
1 commit
-
For consistency with other reference counting APIs in the kernel, add
drm_framebuffer_get() and drm_framebuffer_put() to reference count DRM
framebuffers.Compatibility aliases are added to keep existing code working. To help
speed up the transition, all the instances of the old functions in the
DRM core are already replaced in this commit.The existing semantic patch for the DRM subsystem-wide conversion is
extended to account for these new helpers.Reviewed-by: Sean Paul
Acked-by: Christian König
Signed-off-by: Thierry Reding
Link: http://patchwork.freedesktop.org/patch/msgid/20170228144643.5668-5-thierry.reding@gmail.com
24 Feb, 2017
1 commit
-
Pull drm updates from Dave Airlie:
"This is the main drm pull request for v4.11.Nothing too major, the tinydrm and mmu-less support should make
writing smaller drivers easier for some of the simpler platforms, and
there are a bunch of documentation updates.Intel grew displayport MST audio support which is hopefully useful to
people, and FBC is on by default for GEN9+ (so people know where to
look for regressions). AMDGPU has a lot of fixes that would like new
firmware files installed for some GPUs.Other than that it's pretty scattered all over.
I may have a follow up pull request as I know BenH has a bunch of AST
rework and fixes and I'd like to get those in once they've been tested
by AST, and I've got at least one pull request I'm just trying to get
the author to fix up.Core:
- drm_mm reworked
- Connector list locking and iterators
- Documentation updates
- Format handling rework
- MMU-less support for fbdev helpers
- drm_crtc_from_index helper
- Core CRC API
- Remove drm_framebuffer_unregister_private
- Debugfs cleanup
- EDID/Infoframe fixes
- Release callback
- Tinydrm support (smaller drivers for simple hw)panel:
- Add support for some new simple panelsi915:
- FBC by default for gen9+
- Shared dpll cleanups and docs
- GEN8 powerdomain cleanup
- DMC support on GLK
- DP MST audio support
- HuC loading support
- GVT init ordering fixes
- GVT IOMMU workaround fixamdgpu/radeon:
- Power/clockgating improvements
- Preliminary SR-IOV support
- TTM buffer priority and eviction fixes
- SI DPM quirks removed due to firmware fixes
- Powerplay improvements
- VCE/UVD powergating fixes
- Cleanup SI GFX code to match CI/VI
- Support for > 2 displays on 3/5 crtc asics
- SI headless fixesnouveau:
- Rework securre boot code in prep for GP10x secure boot
- Channel recovery improvements
- Initial power budget code
- MMU rework preperationvmwgfx:
- Bunch of fixes and cleanupsexynos:
- Runtime PM support for MIC driver
- Cleanups to use atomic helpers
- UHD Support for TM2/TM2E boards
- Trigger mode fix for Rinato boardetnaviv:
- Shader performance fix
- Command stream validator fixes
- Command buffer suballocatorrockchip:
- CDN DisplayPort support
- IOMMU support for arm64 platformimx-drm:
- Fix i.MX5 TV encoder probing
- Remove lower fb size limitsmsm:
- Support for HW cursor on MDP5 devices
- DSI encoder cleanup
- GPU DT bindings cleanupsti:
- stih410 cleanups
- Create fbdev at binding
- HQVDP fixes
- Remove stih416 chip functionality
- DVI/HDMI mode selection fixes
- FPS statistic reportingomapdrm:
- IRQ code cleanupdwi-hdmi bridge:
- Cleanups and fixesadv-bridge:
- Updates for nexussii8520 bridge:
- Add interlace mode support
- Rework HDMI and lots of fixesqxl:
- probing/teardown cleanupsZTE drm:
- HDMI audio via SPDIF interface
- Video Layer overlay plane support
- Add TV encoder output deviceatmel-hlcdc:
- Rework fbdev creation logictegra:
- OF node fixfsl-dcu:
- Minor fixesmali-dp:
- Assorted fixessunxi:
- Minor fix"[ This was the "fixed" pull, that still had build warnings due to people
not even having build tested the result. I'm not a happy camperI've fixed the things I noticed up in this merge. - Linus ]
* tag 'drm-for-v4.11-less-shouty' of git://people.freedesktop.org/~airlied/linux: (1177 commits)
lib/Kconfig: make PRIME_NUMBERS not user selectable
drm/tinydrm: helpers: Properly fix backlight dependency
drm/tinydrm: mipi-dbi: Fix field width specifier warning
drm/tinydrm: mipi-dbi: Silence: ‘cmd’ may be used uninitialized
drm/sti: fix build warnings in sti_drv.c and sti_vtg.c files
drm/amd/powerplay: fix PSI feature on Polars12
drm/amdgpu: refuse to reserve io mem for split VRAM buffers
drm/ttm: fix use-after-free races in vm fault handling
drm/tinydrm: Add support for Multi-Inno MI0283QT display
dt-bindings: Add Multi-Inno MI0283QT binding
dt-bindings: display/panel: Add common rotation property
of: Add vendor prefix for Multi-Inno
drm/tinydrm: Add MIPI DBI support
drm/tinydrm: Add helper functions
drm: Add DRM support for tiny LCD displays
drm/amd/amdgpu: post card if there is real hw resetting performed
drm/nouveau/tmr: provide backtrace when a timeout is hit
drm/nouveau/pci/g92: Fix rearm
drm/nouveau/drm/therm/fan: add a fallback if no fan control is specified in the vbios
drm/nouveau/hwmon: expose power_max and power_crit
..
25 Jan, 2017
1 commit
-
I just learned that &struct_name.member_name works and looks pretty
even. It doesn't (yet) link to the member directly though, which would
be really good for big structures or vfunc tables (where the
per-member kerneldoc tends to be long).Also some minor drive-by polish where it makes sense, I read a lot
of docs ...v2: Review from Eric.
Cc: Jani Nikula
Cc: Chris Wilson
Reviewed-by: Eric Engestrom
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/20170125062657.19270-4-daniel.vetter@ffwll.ch
14 Jan, 2017
1 commit
-
Since we need to change the implementation, stop exposing internals.
Provide kref_read() to read the current reference count; typically
used for debug messages.Kills two anti-patterns:
atomic_read(&kref->refcount)
kref->refcount.counterSigned-off-by: Peter Zijlstra (Intel)
Cc: Andrew Morton
Cc: Greg Kroah-Hartman
Cc: Linus Torvalds
Cc: Paul E. McKenney
Cc: Peter Zijlstra
Cc: Thomas Gleixner
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar
30 Dec, 2016
1 commit
-
sed -e 's/\( \* .*\)struct &\([_a-z]*\)/\1\&struct \2/' -i
Originally I wasnt a friend of this style because I thought a
line-break between the "&struct" and "foo" part would break it. But a
quick test shows that " * &struct \n * foo\n" works pefectly well with
current kernel-doc. So time to mass-apply these changes!Cc: Jani Nikula
Cc: Chris Wilson
Reviewed-by: David Herrmann
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/1483044517-5770-6-git-send-email-daniel.vetter@ffwll.ch
15 Dec, 2016
5 commits
-
Replace uses of fb->pixel_format with fb->format->format.
Less duplicated information is a good thing.Note that coccinelle failed to eliminate the
"/* fourcc format */" comment from drm_framebuffer.h, so I had
to do that part manually.@@
struct drm_framebuffer *FB;
expression E;
@@
drm_helper_mode_fill_fb_struct(...) {
...
- FB->pixel_format = E;
...
}@@
struct drm_framebuffer *FB;
expression E;
@@
i9xx_get_initial_plane_config(...) {
...
- FB->pixel_format = E;
...
}@@
struct drm_framebuffer *FB;
expression E;
@@
ironlake_get_initial_plane_config(...) {
...
- FB->pixel_format = E;
...
}@@
struct drm_framebuffer *FB;
expression E;
@@
skylake_get_initial_plane_config(...) {
...
- FB->pixel_format = E;
...
}@@
struct drm_framebuffer *a;
struct drm_framebuffer b;
@@
(
- a->pixel_format
+ a->format->format
|
- b.pixel_format
+ b.format->format
)@@
struct drm_plane_state *a;
struct drm_plane_state b;
@@
(
- a->fb->pixel_format
+ a->fb->format->format
|
- b.fb->pixel_format
+ b.fb->format->format
)@@
struct drm_crtc *CRTC;
@@
(
- CRTC->primary->fb->pixel_format
+ CRTC->primary->fb->format->format
|
- CRTC->primary->state->fb->pixel_format
+ CRTC->primary->state->fb->format->format
)@@
struct drm_mode_set *set;
@@
(
- set->fb->pixel_format
+ set->fb->format->format
|
- set->crtc->primary->fb->pixel_format
+ set->crtc->primary->fb->format->format
)@@
@@
struct drm_framebuffer {
...
- uint32_t pixel_format;
...
};v2: Fix commit message (Laurent)
Rebase due to earlier removal of many fb->pixel_format uses,
including the 'fb->format = drm_format_info(fb->format->format);'
snafu
v3: Adjusted the semantic patch a bit and regenerated due to code
changesCc: Laurent Pinchart
Signed-off-by: Ville Syrjälä
Reviewed-by: Alex Deucher (v1)
Reviewed-by: Laurent Pinchart
Link: http://patchwork.freedesktop.org/patch/msgid/1481751175-18463-1-git-send-email-ville.syrjala@linux.intel.com -
Replace uses of fb->bits_per_pixel with fb->format->cpp[0]*8.
Less duplicated information is a good thing.Note that I didn't put parens around the cpp*8 in the below cocci script,
on account of not wanting spurious parens all over the place. Instead I
did the unsafe way, and tried to look over the entire diff to spot if
any dangerous expressions were produced. I didn't see any.There are some cases where previously the code did X*bpp/8, so the
division happened after the multiplication. Those are now just X*cpp
so the division effectively happens before the multiplication,
but that is perfectly fine since bpp is always a multiple of 8.@@
struct drm_framebuffer *FB;
expression E;
@@
drm_helper_mode_fill_fb_struct(...) {
...
- FB->bits_per_pixel = E;
...
}@@
struct drm_framebuffer *FB;
expression E;
@@
i9xx_get_initial_plane_config(...) {
...
- FB->bits_per_pixel = E;
...
}@@
struct drm_framebuffer *FB;
expression E;
@@
ironlake_get_initial_plane_config(...) {
...
- FB->bits_per_pixel = E;
...
}@@
struct drm_framebuffer *FB;
expression E;
@@
skylake_get_initial_plane_config(...) {
...
- FB->bits_per_pixel = E;
...
}@@
struct drm_framebuffer FB;
expression E;
@@
(
- E * FB.bits_per_pixel / 8
+ E * FB.format->cpp[0]
|
- FB.bits_per_pixel / 8
+ FB.format->cpp[0]
|
- E * FB.bits_per_pixel >> 3
+ E * FB.format->cpp[0]
|
- FB.bits_per_pixel >> 3
+ FB.format->cpp[0]
|
- (FB.bits_per_pixel + 7) / 8
+ FB.format->cpp[0]
|
- FB.bits_per_pixel
+ FB.format->cpp[0] * 8
|
- FB.format->cpp[0] * 8 != 8
+ FB.format->cpp[0] != 1
)@@
struct drm_framebuffer *FB;
expression E;
@@
(
- E * FB->bits_per_pixel / 8
+ E * FB->format->cpp[0]
|
- FB->bits_per_pixel / 8
+ FB->format->cpp[0]
|
- E * FB->bits_per_pixel >> 3
+ E * FB->format->cpp[0]
|
- FB->bits_per_pixel >> 3
+ FB->format->cpp[0]
|
- (FB->bits_per_pixel + 7) / 8
+ FB->format->cpp[0]
|
- FB->bits_per_pixel
+ FB->format->cpp[0] * 8
|
- FB->format->cpp[0] * 8 != 8
+ FB->format->cpp[0] != 1
)@@
struct drm_plane_state *state;
expression E;
@@
(
- E * state->fb->bits_per_pixel / 8
+ E * state->fb->format->cpp[0]
|
- state->fb->bits_per_pixel / 8
+ state->fb->format->cpp[0]
|
- E * state->fb->bits_per_pixel >> 3
+ E * state->fb->format->cpp[0]
|
- state->fb->bits_per_pixel >> 3
+ state->fb->format->cpp[0]
|
- (state->fb->bits_per_pixel + 7) / 8
+ state->fb->format->cpp[0]
|
- state->fb->bits_per_pixel
+ state->fb->format->cpp[0] * 8
|
- state->fb->format->cpp[0] * 8 != 8
+ state->fb->format->cpp[0] != 1
)@@
@@
- (8 * 8)
+ 8 * 8@@
struct drm_framebuffer FB;
@@
- (FB.format->cpp[0])
+ FB.format->cpp[0]@@
struct drm_framebuffer *FB;
@@
- (FB->format->cpp[0])
+ FB->format->cpp[0]@@
@@
struct drm_framebuffer {
...
- int bits_per_pixel;
...
};v2: Clean up the 'cpp*8 != 8' and '(8 * 8)' cases (Laurent)
v3: Adjusted the semantic patch a bit and regenerated due to code
changesSigned-off-by: Ville Syrjälä
Reviewed-by: Laurent Pinchart
Reviewed-by: Alex Deucher (v1)
Link: http://patchwork.freedesktop.org/patch/msgid/1481751140-18352-1-git-send-email-ville.syrjala@linux.intel.com -
Replace uses of fb->depth with fb->format->depth. Less duplicate
information is a good thing.@@
struct drm_framebuffer *fb;
expression E;
@@
drm_helper_mode_fill_fb_struct(...) {
...
- fb->depth = E;
...
}@@
struct nouveau_framebuffer *fb;
@@
- fb->base.depth
+ fb->base.format->depth@@
struct drm_framebuffer fb;
@@
- fb.depth
+ fb.format->depth@@
struct drm_framebuffer *fb;
@@
- fb->depth
+ fb->format->depth@@
struct drm_framebuffer fb;
@@
- (fb.format->depth)
+ fb.format->depth@@
struct drm_framebuffer *fb;
@@
- (fb->format->depth)
+ fb->format->depth@@
@@
struct drm_framebuffer {
...
- unsigned int depth;
...
};v2: Drop the vmw stuff (Daniel)
Rerun spatch due to code changesSigned-off-by: Ville Syrjälä
Reviewed-by: Laurent Pinchart
Reviewed-by: Alex Deucher
Reviewed-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/1481751095-18249-1-git-send-email-ville.syrjala@linux.intel.com -
Add variants of drm_format_plane_{width,height}() that take an entire fb
object instead of just the format. These should be more efficent as they
can just look up the format info from the fb->format pointer rather than
having to look it up (using a linear search based on the format).Signed-off-by: Ville Syrjälä
Reviewed-by: Alex Deucher
Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-30-git-send-email-ville.syrjala@linux.intel.com -
To avoid having to look up the format information struct every time,
let's just store a pointer to it under drm_framebuffer.v2: Don't populate the fb->format pointer in drm_framebuffer_init().
instead we'll treat a NULL format as an error laterCc: Laurent Pinchart
Signed-off-by: Ville Syrjälä
Reviewed-by: Alex Deucher (v1)
Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-20-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Laurent Pinchart
29 Nov, 2016
1 commit
-
In a couple of places currently, and with the intent to add more, we
update a pointer to a framebuffer to hold a new fb reference (evicting
the old).Signed-off-by: Chris Wilson
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/20161125153231.13255-2-chris@chris-wilson.co.uk
17 Nov, 2016
1 commit
-
It has been suggested that having per-plane modifiers is making life
more difficult for userspace, so let's just retire modifier[1-3] and
use modifier[0] to apply to the entire framebuffer.Obviosuly this means that if individual planes need different tiling
layouts and whatnot we will need a new modifier for each combination
of planes with different tiling layouts.For a bit of extra backwards compatilbilty the kernel will allow
non-zero modifier[1+] but it require that they will match modifier[0].
This in case there's existing userspace out there that sets
modifier[1+] to something non-zero with planar formats.Mostly a cocci job, with a bit of manual stuff mixed in.
@@
struct drm_framebuffer *fb;
expression E;
@@
- fb->modifier[E]
+ fb->modifier@@
struct drm_framebuffer fb;
expression E;
@@
- fb.modifier[E]
+ fb.modifierCc: Kristian Høgsberg
Cc: Ben Widawsky
Cc: Rob Clark
Cc: Daniel Vetter
Cc: Tomeu Vizoso
Cc: dczaplejewicz@collabora.co.uk
Suggested-by: Kristian Høgsberg
Acked-by: Ben Widawsky
Acked-by: Daniel Stone
Acked-by: Rob Clark
Signed-off-by: Ville Syrjälä
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/1479295996-26246-1-git-send-email-ville.syrjala@linux.intel.com
19 Sep, 2016
1 commit
-
Now that there's less stuff in there I noticed that I overlooked them.
Sprinkle some docs over them while at it.Reviewed-by: Sean Paul
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/20160831160913.12991-2-daniel.vetter@ffwll.ch
29 Aug, 2016
1 commit
-
Just for the struct drm_mode_object base class. The header file was
already partially extracted to help untangle the include loops.v2:
- Also move the generic get/set property ioctls. At first this seemed
like a bad idea since it requires making drm_mode_crtc_set_obj_prop
non-static. But eventually that will get split away too (like
the connector version already is) for both crtc and planes. Hence I
reconsidered.- drm_mode_object.[hc] instead of drm_modeset.[hc], which requires
renaming the drm_modeset.h header I already started building up.
This is more consistent (matches the name of the main structure),
and I want to be able to use drm_modeset.[hc] for the basic modeset
init/cleanup functionality like drm_mode_config_init.Reviewed-by: Archit Taneja
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/20160829082757.17913-3-daniel.vetter@ffwll.ch
16 Aug, 2016
2 commits
-
- Move the intro section into a DOC comment, and update it slightly.
- kernel-doc for struct drm_framebuffer!v2:
- Copypaste fail (Sean).
- Explain the linear @offsets clearer (Ville).Cc: Sean Paul
Cc: Ville Syrjälä
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-12-git-send-email-daniel.vetter@ffwll.ch -
Also start with drm_modeset.h with the core bits, since we need
to untangle this mess somehow. That allows us to move the drm_modes.h
include to the right spot, except for the temporary connector status
enum. That will get fixed as soon as drm_connector.h exists.v2: Rebase.
v3: Move drm_crtc_force_disable_all back again, that wasn't meant to
be moved (Sean).v4: Rebase.
Cc: Sean Paul
Reviewed-by: Sean Paul
Signed-off-by: Daniel Vetter