|
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14, v6.14-rc7, v6.14-rc6, v6.14-rc5 |
|
| #
cce16fcd |
| 26-Feb-2025 |
Thomas Zimmermann <[email protected]> |
drm/gem-framebuffer: Use dma_buf from GEM object instance
Avoid dereferencing struct drm_gem_object.import_attach for the imported dma-buf. The dma_buf field in the GEM object instance refers to the
drm/gem-framebuffer: Use dma_buf from GEM object instance
Avoid dereferencing struct drm_gem_object.import_attach for the imported dma-buf. The dma_buf field in the GEM object instance refers to the same buffer. Prepares to make import_attach optional.
Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Anusha Srivatsa <[email protected]> Reviewed-by: Christian König <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
| #
3d672f48 |
| 26-Feb-2025 |
Thomas Zimmermann <[email protected]> |
drm/gem-framebuffer: Test for imported buffers with drm_gem_is_imported()
Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test.
Signed-off-by: Thom
drm/gem-framebuffer: Test for imported buffers with drm_gem_is_imported()
Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test.
Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Anusha Srivatsa <[email protected]> Reviewed-by: Christian König <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
|
Revision tags: v6.14-rc4, v6.14-rc3, v6.14-rc2, v6.14-rc1, v6.13, v6.13-rc7, v6.13-rc6, v6.13-rc5, v6.13-rc4, v6.13-rc3, v6.13-rc2 |
|
| #
cdd30ebb |
| 02-Dec-2024 |
Peter Zijlstra <[email protected]> |
module: Convert symbol namespace to string literal
Clean up the existing export namespace code along the same lines of commit 33def8498fdd ("treewide: Convert macro and uses of __section(foo) to __s
module: Convert symbol namespace to string literal
Clean up the existing export namespace code along the same lines of commit 33def8498fdd ("treewide: Convert macro and uses of __section(foo) to __section("foo")") and for the same reason, it is not desired for the namespace argument to be a macro expansion itself.
Scripted using
git grep -l -e MODULE_IMPORT_NS -e EXPORT_SYMBOL_NS | while read file; do awk -i inplace ' /^#define EXPORT_SYMBOL_NS/ { gsub(/__stringify\(ns\)/, "ns"); print; next; } /^#define MODULE_IMPORT_NS/ { gsub(/__stringify\(ns\)/, "ns"); print; next; } /MODULE_IMPORT_NS/ { $0 = gensub(/MODULE_IMPORT_NS\(([^)]*)\)/, "MODULE_IMPORT_NS(\"\\1\")", "g"); } /EXPORT_SYMBOL_NS/ { if ($0 ~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+),/) { if ($0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/ && $0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(\)/ && $0 !~ /^my/) { getline line; gsub(/[[:space:]]*\\$/, ""); gsub(/[[:space:]]/, "", line); $0 = $0 " " line; }
$0 = gensub(/(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/, "\\1(\\2, \"\\3\")", "g"); } } { print }' $file; done
Requested-by: Masahiro Yamada <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://mail.google.com/mail/u/2/#inbox/FMfcgzQXKWgMmjdFwwdsfgxzKpVHWPlc Acked-by: Greg KH <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
show more ...
|
|
Revision tags: v6.13-rc1, v6.12, v6.12-rc7, v6.12-rc6, v6.12-rc5, v6.12-rc4, v6.12-rc3, v6.12-rc2, v6.12-rc1, v6.11, v6.11-rc7, v6.11-rc6, v6.11-rc5, v6.11-rc4, v6.11-rc3, v6.11-rc2, v6.11-rc1, v6.10, v6.10-rc7, v6.10-rc6, v6.10-rc5, v6.10-rc4, v6.10-rc3, v6.10-rc2, v6.10-rc1, v6.9, v6.9-rc7, v6.9-rc6, v6.9-rc5, v6.9-rc4, v6.9-rc3, v6.9-rc2, v6.9-rc1, v6.8, v6.8-rc7, v6.8-rc6, v6.8-rc5, v6.8-rc4, v6.8-rc3, v6.8-rc2, v6.8-rc1, v6.7, v6.7-rc8, v6.7-rc7, v6.7-rc6, v6.7-rc5, v6.7-rc4, v6.7-rc3, v6.7-rc2, v6.7-rc1, v6.6, v6.6-rc7, v6.6-rc6, v6.6-rc5, v6.6-rc4, v6.6-rc3, v6.6-rc2, v6.6-rc1, v6.5, v6.5-rc7, v6.5-rc6, v6.5-rc5, v6.5-rc4 |
|
| #
a8b0a7fd |
| 28-Jul-2023 |
Geert Uytterhoeven <[email protected]> |
drm/gem-fb-helper: Consistenly use drm_dbg_kms()
All debug messages in drm_gem_framebuffer_helper.c use drm_dbg_kms(), except for one, which uses drm_dbg(). Replace the outlier by drm_dbg_kms() to r
drm/gem-fb-helper: Consistenly use drm_dbg_kms()
All debug messages in drm_gem_framebuffer_helper.c use drm_dbg_kms(), except for one, which uses drm_dbg(). Replace the outlier by drm_dbg_kms() to restore consistency.
Fixes: c91acda3a380 ("drm/gem: Check for valid formats") Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Thomas Zimmermann <[email protected]> Reviewed-by: Maíra Canal <[email protected]> Signed-off-by: Javier Martinez Canillas <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/7d56615fbef2d4d0e5f4c4a23f57269bf8bdb71f.1690535176.git.geert+renesas@glider.be
show more ...
|
|
Revision tags: v6.5-rc3, v6.5-rc2, v6.5-rc1, v6.4, v6.4-rc7, v6.4-rc6, v6.4-rc5, v6.4-rc4, v6.4-rc3, v6.4-rc2, v6.4-rc1, v6.3, v6.3-rc7 |
|
| #
c91acda3 |
| 12-Apr-2023 |
Maíra Canal <[email protected]> |
drm/gem: Check for valid formats
Currently, drm_gem_fb_create() doesn't check if the pixel format is supported, which can lead to the acceptance of invalid pixel formats e.g. the acceptance of inval
drm/gem: Check for valid formats
Currently, drm_gem_fb_create() doesn't check if the pixel format is supported, which can lead to the acceptance of invalid pixel formats e.g. the acceptance of invalid modifiers. Therefore, add a check for valid formats on drm_gem_fb_create().
Note that this check is only valid for atomic drivers, because, for non-atomic drivers, checking drm_any_plane_has_format() is not possible since the format list for the primary plane is fake, and we'd therefore reject valid formats.
Adding this check to drm_gem_fb_create() will guarantee that the igt@kms_addfb_basic@addfb25-bad-modifier IGT test passes for drivers using this callback.
This commit is a recapture of a series sent a while ago. Initially, I sent a patch [1] similar to this one in which I introduced the format check to drm_gem_fb_create().
Based on the feedback on the patch, I placed the check inside framebuffer_check() [2] so that it wouldn't be needed to hit any driver-specific code path when the check fails. Therefore, we could remove the check from the specific drivers (i915, amdgpu, and vmwgfx).
But, with some new feedback, it was shown that introducing this check inside framebuffer_check() is problematic for the i915 driver [3]. For the i915 driver, in the legacy case, in which we don't get the modifier from the userspace, i915's fb_create hook computes the right modifier, which isn't necessarily linear. Therefore, if we check the modifier before that point, we might get wrong answers.
So, I kept the check inside the i915 driver and removed the check from amdgpu and vmwgfx [4]. But, this yet hasn't solved the i915 problem [5].
As we cannot add the check inside framebuffer_check() without affecting the i915 behavior, this commit went back to the original patch. This way we can guarantee a more uniform behavior from the drivers that use the drm_gem_fb_create() callback.
[1] https://lore.kernel.org/dri-devel/[email protected]/T/ [2] https://lore.kernel.org/dri-devel/[email protected]/T/ [3] https://lore.kernel.org/dri-devel/[email protected]/ [4] https://lore.kernel.org/dri-devel/[email protected]/T/ [5] https://lore.kernel.org/dri-devel/[email protected]/
Signed-off-by: Maíra Canal <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Acked-by: Daniel Vetter <[email protected]> Signed-off-by: Maíra Canal <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
|
Revision tags: v6.3-rc6, v6.3-rc5, v6.3-rc4, v6.3-rc3, v6.3-rc2, v6.3-rc1, v6.2, v6.2-rc8, v6.2-rc7, v6.2-rc6, v6.2-rc5, v6.2-rc4, v6.2-rc3, v6.2-rc2, v6.2-rc1, v6.1, v6.1-rc8, v6.1-rc7, v6.1-rc6, v6.1-rc5, v6.1-rc4 |
|
| #
45b64fd9 |
| 03-Nov-2022 |
Thomas Zimmermann <[email protected]> |
drm/fb-helper: Remove unnecessary include statements
Remove include statements for <drm/drm_fb_helper.h> where it is not required (i.e., most of them). In a few places include other header files tha
drm/fb-helper: Remove unnecessary include statements
Remove include statements for <drm/drm_fb_helper.h> where it is not required (i.e., most of them). In a few places include other header files that are required by the source code.
v3: * fix amdgpu include statements * fix rockchip include statements
Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
|
Revision tags: v6.1-rc3, v6.1-rc2 |
|
| #
79e2cf2e |
| 17-Oct-2022 |
Dmitry Osipenko <[email protected]> |
drm/gem: Take reservation lock for vmap/vunmap operations
The new common dma-buf locking convention will require buffer importers to hold the reservation lock around mapping operations. Make DRM GEM
drm/gem: Take reservation lock for vmap/vunmap operations
The new common dma-buf locking convention will require buffer importers to hold the reservation lock around mapping operations. Make DRM GEM core to take the lock around the vmapping operations and update DRM drivers to use the locked functions for the case where DRM core now holds the lock. This patch prepares DRM core and drivers to the common dynamic dma-buf locking convention.
Acked-by: Christian König <[email protected]> Signed-off-by: Dmitry Osipenko <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
|
Revision tags: v6.1-rc1, v6.0, v6.0-rc7, v6.0-rc6, v6.0-rc5, v6.0-rc4, v6.0-rc3, v6.0-rc2, v6.0-rc1, v5.19, v5.19-rc8, v5.19-rc7, v5.19-rc6 |
|
| #
0a2486f8 |
| 08-Jul-2022 |
Geert Uytterhoeven <[email protected]> |
drm/gem-fb-helper: Use actual bpp for size calculations
The AFBC helpers derive the number of bits per pixel from the deprecated drm_format_info.cpp[] field, which does not take into account block s
drm/gem-fb-helper: Use actual bpp for size calculations
The AFBC helpers derive the number of bits per pixel from the deprecated drm_format_info.cpp[] field, which does not take into account block sizes.
Fix this by using the actual number of bits per pixel instead.
Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/b1d938d903157627c4ac101df92a1f3bf8ebe83d.1657294931.git.geert@linux-m68k.org
show more ...
|
|
Revision tags: v5.19-rc5, v5.19-rc4, v5.19-rc3, v5.19-rc2, v5.19-rc1, v5.18 |
|
| #
4f093a52 |
| 17-May-2022 |
Thomas Zimmermann <[email protected]> |
drm/gem: Warn on trying to use a non-existing framebuffer plane
Warn if callers of drm_gem_fb_get_obj() try to use a GEM buffer for a non-existing or unset plane.
Signed-off-by: Thomas Zimmermann <
drm/gem: Warn on trying to use a non-existing framebuffer plane
Warn if callers of drm_gem_fb_get_obj() try to use a GEM buffer for a non-existing or unset plane.
Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Tested-by: Noralf Trønnes <[email protected]> Acked-by: Christian König <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
| #
746b9c62 |
| 17-May-2022 |
Thomas Zimmermann <[email protected]> |
drm/gem: Ignore color planes that are unused by framebuffer format
Only handle color planes that exist in a framebuffer's color format. Ignore non-existing planes.
So far, several helpers assumed t
drm/gem: Ignore color planes that are unused by framebuffer format
Only handle color planes that exist in a framebuffer's color format. Ignore non-existing planes.
So far, several helpers assumed that all 4 planes are available and silently ignored non-existing planes. This lead to subtil bugs with uninitialized data in instances of struct iosys_map. [1]
Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Tested-by: Noralf Trønnes <[email protected]> Acked-by: Christian König <[email protected]> Link: https://lore.kernel.org/dri-devel/[email protected]/T/#md0172b10bb588d8f20f4f456e304f08d2a4505f7 # 1 Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
| #
f159b1b2 |
| 17-May-2022 |
Thomas Zimmermann <[email protected]> |
drm/gem: Share code between drm_gem_fb_{begin,end}_cpu_access()
The error-recovery code in drm_gem_fb_begin() is of the same pattern as drm_gem_fb_end(). Implement both of them using an internal hel
drm/gem: Share code between drm_gem_fb_{begin,end}_cpu_access()
The error-recovery code in drm_gem_fb_begin() is of the same pattern as drm_gem_fb_end(). Implement both of them using an internal helper. No functional changes.
v2: * print additional information in error message (Javier) * fix commit description (Javier)
Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Tested-by: Noralf Trønnes <[email protected]> Acked-by: Christian König <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
|
Revision tags: v5.18-rc7, v5.18-rc6, v5.18-rc5, v5.18-rc4, v5.18-rc3, v5.18-rc2, v5.18-rc1, v5.17, v5.17-rc8, v5.17-rc7, v5.17-rc6, v5.17-rc5, v5.17-rc4, v5.17-rc3 |
|
| #
7938f421 |
| 04-Feb-2022 |
Lucas De Marchi <[email protected]> |
dma-buf-map: Rename to iosys-map
Rename struct dma_buf_map to struct iosys_map and corresponding APIs. Over time dma-buf-map grew up to more functionality than the one used by dma-buf: in fact it's
dma-buf-map: Rename to iosys-map
Rename struct dma_buf_map to struct iosys_map and corresponding APIs. Over time dma-buf-map grew up to more functionality than the one used by dma-buf: in fact it's just a shim layer to abstract system memory, that can be accessed via regular load and store, from IO memory that needs to be acessed via arch helpers.
The idea is to extend this API so it can fulfill other needs, internal to a single driver. Example: in the i915 driver it's desired to share the implementation for integrated graphics, which uses mostly system memory, with discrete graphics, which may need to access IO memory.
The conversion was mostly done with the following semantic patch:
@r1@ @@ - struct dma_buf_map + struct iosys_map
@r2@ @@ ( - DMA_BUF_MAP_INIT_VADDR + IOSYS_MAP_INIT_VADDR | - dma_buf_map_set_vaddr + iosys_map_set_vaddr | - dma_buf_map_set_vaddr_iomem + iosys_map_set_vaddr_iomem | - dma_buf_map_is_equal + iosys_map_is_equal | - dma_buf_map_is_null + iosys_map_is_null | - dma_buf_map_is_set + iosys_map_is_set | - dma_buf_map_clear + iosys_map_clear | - dma_buf_map_memcpy_to + iosys_map_memcpy_to | - dma_buf_map_incr + iosys_map_incr )
@@ @@ - #include <linux/dma-buf-map.h> + #include <linux/iosys-map.h>
Then some files had their includes adjusted and some comments were update to remove mentions to dma-buf-map.
Since this is not specific to dma-buf anymore, move the documentation to the "Bus-Independent Device Accesses" section.
v2: - Squash patches
v3: - Fix wrong removal of dma-buf.h from MAINTAINERS - Move documentation from dma-buf.rst to device-io.rst
v4: - Change documentation title and level
Signed-off-by: Lucas De Marchi <[email protected]> Acked-by: Christian König <[email protected]> Acked-by: Sumit Semwal <[email protected]> Acked-by: Thomas Zimmermann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
|
Revision tags: v5.17-rc2, v5.17-rc1, v5.16, v5.16-rc8, v5.16-rc7, v5.16-rc6, v5.16-rc5, v5.16-rc4, v5.16-rc3, v5.16-rc2, v5.16-rc1, v5.15, v5.15-rc7, v5.15-rc6, v5.15-rc5 |
|
| #
16b0314a |
| 10-Oct-2021 |
Greg Kroah-Hartman <[email protected]> |
dma-buf: move dma-buf symbols into the DMA_BUF module namespace
In order to better track where in the kernel the dma-buf code is used, put the symbols in the namespace DMA_BUF and modify all users o
dma-buf: move dma-buf symbols into the DMA_BUF module namespace
In order to better track where in the kernel the dma-buf code is used, put the symbols in the namespace DMA_BUF and modify all users of the symbols to properly import the namespace to not break the build at the same time.
Now the output of modinfo shows the use of these symbols, making it easier to watch for users over time:
$ modinfo drivers/misc/fastrpc.ko | grep import import_ns: DMA_BUF
Cc: "Pan, Xinhui" <[email protected]> Cc: David Airlie <[email protected]> Cc: Maarten Lankhorst <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: Thomas Zimmermann <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Cc: [email protected] Acked-by: Daniel Vetter <[email protected]> Acked-by: Christian König <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Acked-by: Sumit Semwal <[email protected]> Acked-by: Alex Deucher <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v5.15-rc4, v5.15-rc3, v5.15-rc2, v5.15-rc1, v5.14, v5.14-rc7, v5.14-rc6, v5.14-rc5 |
|
| #
43b36232 |
| 03-Aug-2021 |
Thomas Zimmermann <[email protected]> |
drm/gem: Provide offset-adjusted framebuffer BO mappings
Add an additional argument to drm_gem_fb_vmap() to return each BO's mapping adjusted by the respective offset. Update all callers.
The newly
drm/gem: Provide offset-adjusted framebuffer BO mappings
Add an additional argument to drm_gem_fb_vmap() to return each BO's mapping adjusted by the respective offset. Update all callers.
The newly returned values point to the first byite of the data stored in the framebuffer BOs. Drivers that access the BO data should use it.
Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
|
Revision tags: v5.14-rc4 |
|
| #
0ec77bd9 |
| 30-Jul-2021 |
Thomas Zimmermann <[email protected]> |
drm/gem: Clear mapping addresses for unused framebuffer planes
Set the returned mapping address to NULL if a framebuffer plane does not have a BO associated with it. Likewise, ignore mappings of NUL
drm/gem: Clear mapping addresses for unused framebuffer planes
Set the returned mapping address to NULL if a framebuffer plane does not have a BO associated with it. Likewise, ignore mappings of NULL during framebuffer unmap operations. Allows users of the functions to perform unmap operations of certain BOs by themselfes.
Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
| #
f6424ecd |
| 30-Jul-2021 |
Thomas Zimmermann <[email protected]> |
drm/gem: Provide drm_gem_fb_{vmap,vunmap}()
Move framebuffer vmap code from shadow-buffered plane state into the new interfaces drm_gem_fb_vmap() and drm_gem_fb_vunmap(). These functions provide map
drm/gem: Provide drm_gem_fb_{vmap,vunmap}()
Move framebuffer vmap code from shadow-buffered plane state into the new interfaces drm_gem_fb_vmap() and drm_gem_fb_vunmap(). These functions provide mappings of a framebuffer's BOs into kernel address space. No functional changes.
v4: * remove duplicated blank line v2: * using [static N] for array parameters enables compile-time checks * include <drm/drm_fourcc.h> for DRM_FORMAT_MAX_PLANES (kernel test robot)
Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
| #
279cc2e9 |
| 30-Jul-2021 |
Thomas Zimmermann <[email protected]> |
drm: Define DRM_FORMAT_MAX_PLANES
DRM uses a magic number of 4 for the maximum number of planes per color format. Declare this constant via DRM_FORMAT_MAX_PLANES and update the related code. Some co
drm: Define DRM_FORMAT_MAX_PLANES
DRM uses a magic number of 4 for the maximum number of planes per color format. Declare this constant via DRM_FORMAT_MAX_PLANES and update the related code. Some code depends on the length of arrays that are now declared with DRM_FORMAT_MAX_PLANES. Convert it from '4' to ARRAY_SIZE.
v2: * mention usage of ARRAY_SIZE() in the commit message (Maxime) * also fix error handling in drm_gem_fb_init_with_funcs() (kernel test robot) * include <drm/drm_fourcc.h> for DRM_FORMAT_MAX_PLANES
Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
|
Revision tags: v5.14-rc3, v5.14-rc2 |
|
| #
37408cd8 |
| 16-Jul-2021 |
Thomas Zimmermann <[email protected]> |
drm/gem: Provide drm_gem_fb_{begin,end}_cpu_access() helpers
Implement helpers drm_gem_fb_begin_cpu_access() and _end_cpu_access(), which call the rsp dma-buf functions for all GEM BOs of the given
drm/gem: Provide drm_gem_fb_{begin,end}_cpu_access() helpers
Implement helpers drm_gem_fb_begin_cpu_access() and _end_cpu_access(), which call the rsp dma-buf functions for all GEM BOs of the given framebuffer.
Calls to dma_buf_end_cpu_access() can return an error code on failure, while drm_gem_fb_end_cpu_access() does not. The latter runs during DRM's atomic commit or during cleanup. Both cases don't allow for errors, so leave out the return value.
v2: * fix typo in docs (Daniel)
Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Reviewed-by: Noralf Trønnes <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
|
Revision tags: v5.14-rc1, v5.13, v5.13-rc7, v5.13-rc6, v5.13-rc5, v5.13-rc4, v5.13-rc3, v5.13-rc2, v5.13-rc1 |
|
| #
f7f52503 |
| 03-May-2021 |
Simon Ser <[email protected]> |
drm: log errors in drm_gem_fb_init_with_funcs
Let the user know what went wrong in drm_gem_fb_init_with_funcs failure paths.
v2: use proper format specifier for size_t (kernel test robot)
Signed-o
drm: log errors in drm_gem_fb_init_with_funcs
Let the user know what went wrong in drm_gem_fb_init_with_funcs failure paths.
v2: use proper format specifier for size_t (kernel test robot)
Signed-off-by: Simon Ser <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Sam Ravnborg <[email protected]> Cc: Noralf Trønnes <[email protected]> Cc: Andrzej Pietrasiewicz <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
|
Revision tags: v5.12, v5.12-rc8, v5.12-rc7, v5.12-rc6, v5.12-rc5, v5.12-rc4, v5.12-rc3, v5.12-rc2, v5.12-rc1, v5.12-rc1-dontuse |
|
| #
820c1707 |
| 22-Feb-2021 |
Thomas Zimmermann <[email protected]> |
drm/gem: Move drm_gem_fb_prepare_fb() to GEM atomic helpers
The function drm_gem_fb_prepare_fb() is a helper for atomic modesetting, but currently located next to framebuffer helpers. Move it to GEM
drm/gem: Move drm_gem_fb_prepare_fb() to GEM atomic helpers
The function drm_gem_fb_prepare_fb() is a helper for atomic modesetting, but currently located next to framebuffer helpers. Move it to GEM atomic helpers, rename it slightly and adopt the drivers. Same for the rsp simple-pipe helper.
Compile-tested with x86-64, aarch64 and arm. The patch is fairly large, but there are no functional changes.
v3: * remove out-comented line in drm_gem_framebuffer_helper.h (Maxime) v2: * rename to drm_gem_plane_helper_prepare_fb() (Daniel) * add tutorial-style documentation
Signed-off-by: Thomas Zimmermann <[email protected]> Acked-by: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
|
Revision tags: v5.11, v5.11-rc7, v5.11-rc6, v5.11-rc5, v5.11-rc4, v5.11-rc3, v5.11-rc2, v5.11-rc1, v5.10, v5.10-rc7, v5.10-rc6, v5.10-rc5, v5.10-rc4, v5.10-rc3, v5.10-rc2, v5.10-rc1, v5.9, v5.9-rc8, v5.9-rc7, v5.9-rc6, v5.9-rc5, v5.9-rc4, v5.9-rc3, v5.9-rc2, v5.9-rc1, v5.8, v5.8-rc7, v5.8-rc6, v5.8-rc5, v5.8-rc4, v5.8-rc3, v5.8-rc2, v5.8-rc1, v5.7, v5.7-rc7, v5.7-rc6 |
|
| #
be6ee102 |
| 15-May-2020 |
Emil Velikov <[email protected]> |
drm: remove _unlocked suffix in drm_gem_object_put_unlocked
Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about
drm: remove _unlocked suffix in drm_gem_object_put_unlocked
Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex.
Just drop the suffix. It makes the API cleaner.
Done via the following script:
__from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done
Pay special attention to the compat #define
v2: keep sed and #define removal separate
Cc: David Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Acked-by: Sam Ravnborg <[email protected]> (v1) Reviewed-by: Steven Price <[email protected]> Acked-by: Thomas Zimmermann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
|
Revision tags: v5.7-rc5, v5.7-rc4, v5.7-rc3, v5.7-rc2 |
|
| #
13e3d941 |
| 15-Apr-2020 |
Andrzej Pietrasiewicz <[email protected]> |
drm: Don't free a struct never allocated by drm_gem_fb_init()
drm_gem_fb_init() is passed the fb and never allocates it, so it should be not the one freeing it. As it is now the second call to kfree
drm: Don't free a struct never allocated by drm_gem_fb_init()
drm_gem_fb_init() is passed the fb and never allocates it, so it should be not the one freeing it. As it is now the second call to kfree() is possible with the same fb. Coverity reported the following:
*** CID 1492613: Memory - corruptions (USE_AFTER_FREE) /drivers/gpu/drm/drm_gem_framebuffer_helper.c: 230 in drm_gem_fb_create_with_funcs() 224 fb = kzalloc(sizeof(*fb), GFP_KERNEL); 225 if (!fb) 226 return ERR_PTR(-ENOMEM); 227 228 ret = drm_gem_fb_init_with_funcs(dev, fb, file, mode_cmd, funcs); 229 if (ret) { vvv CID 1492613: Memory - corruptions (USE_AFTER_FREE) vvv Calling "kfree" frees pointer "fb" which has already been freed. [Note: The source code implementation of the function has been overridden by a user model.] 230 kfree(fb); 231 return ERR_PTR(ret); 232 } 233 234 return fb; 235 }
drm_gem_fb_init_with_funcs() calls drm_gem_fb_init() drm_gem_fb_init() calls kfree(fb)
Reported-by: coverity-bot <[email protected]> Addresses-Coverity-ID: 1492613 ("Memory - corruptions") Fixes: f2b816d78a94 ("drm/core: Allow drivers allocate a subclass of struct drm_framebuffer") Signed-off-by: Andrzej Pietrasiewicz <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
|
Revision tags: v5.7-rc1 |
|
| #
bcf6293d |
| 31-Mar-2020 |
Andrzej Pietrasiewicz <[email protected]> |
drm/core: Calculate bpp in afbc helper
Some drivers (komeda, malidp) don't set anything in cpp. If that is the case the right value can be inferred from the format. Then the "bpp" member can be elim
drm/core: Calculate bpp in afbc helper
Some drivers (komeda, malidp) don't set anything in cpp. If that is the case the right value can be inferred from the format. Then the "bpp" member can be eliminated from struct drm_afbc_framebuffer.
Signed-off-by: Andrzej Pietrasiewicz <[email protected]> Acked-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
| #
88f1b29a |
| 31-Mar-2020 |
Andrzej Pietrasiewicz <[email protected]> |
drm/core: Use proper debugging macro
Use drm_dbg_kms() instead of DRM_DEBUG_KMS.
Signed-off-by: Andrzej Pietrasiewicz <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> L
drm/core: Use proper debugging macro
Use drm_dbg_kms() instead of DRM_DEBUG_KMS.
Signed-off-by: Andrzej Pietrasiewicz <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
|
Revision tags: v5.6, v5.6-rc7, v5.6-rc6 |
|
| #
55f7f727 |
| 11-Mar-2020 |
Andrzej Pietrasiewicz <[email protected]> |
drm/core: Add drm_afbc_framebuffer and a corresponding helper
The new struct contains afbc-specific data.
The new function can be used by drivers which support afbc to complete the preparation of s
drm/core: Add drm_afbc_framebuffer and a corresponding helper
The new struct contains afbc-specific data.
The new function can be used by drivers which support afbc to complete the preparation of struct drm_afbc_framebuffer. It must be called after allocating the said struct and calling drm_gem_fb_init_with_funcs().
Signed-off-by: Andrzej Pietrasiewicz <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: James Qian Wang <[email protected]> Acked-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|