mirror of
https://github.com/armbian/linux-cix.git
synced 2026-01-06 12:30:45 -08:00
drm/fb: rename FB CMA helpers to FB DMA helpers
Rename "FB CMA" helpers to "FB DMA" helpers - considering the hierarchy
of APIs (mm/cma -> dma -> fb dma) calling them "FB DMA" seems to be
more applicable.
Besides that, commit e57924d4ae ("drm/doc: Task to rename CMA helpers")
requests to rename the CMA helpers and implies that people seem to be
confused about the naming.
In order to do this renaming the following script was used:
```
#!/bin/bash
DIRS="drivers/gpu include/drm Documentation/gpu"
REGEX_SYM_UPPER="[0-9A-Z_\-]"
REGEX_SYM_LOWER="[0-9a-z_\-]"
REGEX_GREP_UPPER="(${REGEX_SYM_UPPER}*)(FB)_CMA_(${REGEX_SYM_UPPER}*)"
REGEX_GREP_LOWER="(${REGEX_SYM_LOWER}*)(fb)_cma_(${REGEX_SYM_LOWER}*)"
REGEX_SED_UPPER="s/${REGEX_GREP_UPPER}/\1\2_DMA_\3/g"
REGEX_SED_LOWER="s/${REGEX_GREP_LOWER}/\1\2_dma_\3/g"
# Find all upper case 'CMA' symbols and replace them with 'DMA'.
for ff in $(grep -REHl "${REGEX_GREP_UPPER}" $DIRS)
do
sed -i -E "$REGEX_SED_UPPER" $ff
done
# Find all lower case 'cma' symbols and replace them with 'dma'.
for ff in $(grep -REHl "${REGEX_GREP_LOWER}" $DIRS)
do
sed -i -E "$REGEX_SED_LOWER" $ff
done
# Replace all occurrences of 'CMA' / 'cma' in comments and
# documentation files with 'DMA' / 'dma'.
for ff in $(grep -RiHl " cma " $DIRS)
do
sed -i -E "s/ cma / dma /g" $ff
sed -i -E "s/ CMA / DMA /g" $ff
done
```
Only a few more manual modifications were needed, e.g. reverting the
following modifications in some DRM Kconfig files
- select CMA if HAVE_DMA_CONTIGUOUS
+ select DMA if HAVE_DMA_CONTIGUOUS
as well as manually picking the occurrences of 'CMA'/'cma' in comments and
documentation which relate to "FB CMA", but not "GEM CMA".
This patch is compile-time tested building a x86_64 kernel with
`make allyesconfig && make drivers/gpu/drm`.
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com> #drivers/gpu/drm/arm
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220802000405.949236-3-dakr@redhat.com
This commit is contained in:
committed by
Sam Ravnborg
parent
5e8bf00ea9
commit
6bcfe8eaee
@@ -122,13 +122,13 @@ format Helper Functions Reference
|
||||
.. kernel-doc:: drivers/gpu/drm/drm_format_helper.c
|
||||
:export:
|
||||
|
||||
Framebuffer CMA Helper Functions Reference
|
||||
Framebuffer DMA Helper Functions Reference
|
||||
==========================================
|
||||
|
||||
.. kernel-doc:: drivers/gpu/drm/drm_fb_cma_helper.c
|
||||
:doc: framebuffer cma helper functions
|
||||
.. kernel-doc:: drivers/gpu/drm/drm_fb_dma_helper.c
|
||||
:doc: framebuffer dma helper functions
|
||||
|
||||
.. kernel-doc:: drivers/gpu/drm/drm_fb_cma_helper.c
|
||||
.. kernel-doc:: drivers/gpu/drm/drm_fb_dma_helper.c
|
||||
:export:
|
||||
|
||||
Framebuffer GEM Helper Reference
|
||||
|
||||
@@ -41,7 +41,7 @@ obj-$(CONFIG_DRM_PANEL_ORIENTATION_QUIRKS) += drm_panel_orientation_quirks.o
|
||||
obj-$(CONFIG_DRM_BUDDY) += drm_buddy.o
|
||||
|
||||
drm_cma_helper-y := drm_gem_cma_helper.o
|
||||
drm_cma_helper-$(CONFIG_DRM_KMS_HELPER) += drm_fb_cma_helper.o
|
||||
drm_cma_helper-$(CONFIG_DRM_KMS_HELPER) += drm_fb_dma_helper.o
|
||||
obj-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_cma_helper.o
|
||||
|
||||
drm_shmem_helper-y := drm_gem_shmem_helper.o
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*
|
||||
*/
|
||||
#include <drm/drm_device.h>
|
||||
#include <drm/drm_fb_cma_helper.h>
|
||||
#include <drm/drm_fb_dma_helper.h>
|
||||
#include <drm/drm_gem.h>
|
||||
#include <drm/drm_gem_cma_helper.h>
|
||||
#include <drm/drm_gem_framebuffer_helper.h>
|
||||
@@ -247,7 +247,7 @@ komeda_fb_get_pixel_addr(struct komeda_fb *kfb, int x, int y, int plane)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
obj = drm_fb_cma_get_gem_obj(fb, plane);
|
||||
obj = drm_fb_dma_get_gem_obj(fb, plane);
|
||||
|
||||
offset = fb->offsets[plane];
|
||||
if (!fb->modifier) {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <drm/drm_atomic.h>
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_crtc.h>
|
||||
#include <drm/drm_fb_cma_helper.h>
|
||||
#include <drm/drm_fb_dma_helper.h>
|
||||
#include <drm/drm_fb_helper.h>
|
||||
#include <drm/drm_framebuffer.h>
|
||||
#include <drm/drm_gem_cma_helper.h>
|
||||
@@ -273,7 +273,7 @@ static void hdlcd_plane_atomic_update(struct drm_plane *plane,
|
||||
return;
|
||||
|
||||
dest_h = drm_rect_height(&new_plane_state->dst);
|
||||
scanout_start = drm_fb_cma_get_gem_addr(fb, new_plane_state, 0);
|
||||
scanout_start = drm_fb_dma_get_gem_addr(fb, new_plane_state, 0);
|
||||
|
||||
hdlcd = plane->dev->dev_private;
|
||||
hdlcd_write(hdlcd, HDLCD_REG_FB_LINE_LENGTH, fb->pitches[0]);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_crtc.h>
|
||||
#include <drm/drm_edid.h>
|
||||
#include <drm/drm_fb_cma_helper.h>
|
||||
#include <drm/drm_fb_dma_helper.h>
|
||||
#include <drm/drm_fourcc.h>
|
||||
#include <drm/drm_framebuffer.h>
|
||||
#include <drm/drm_gem_cma_helper.h>
|
||||
@@ -160,7 +160,7 @@ malidp_mw_encoder_atomic_check(struct drm_encoder *encoder,
|
||||
|
||||
n_planes = fb->format->num_planes;
|
||||
for (i = 0; i < n_planes; i++) {
|
||||
struct drm_gem_cma_object *obj = drm_fb_cma_get_gem_obj(fb, i);
|
||||
struct drm_gem_cma_object *obj = drm_fb_dma_get_gem_obj(fb, i);
|
||||
/* memory write buffers are never rotated */
|
||||
u8 alignment = malidp_hw_get_pitch_align(malidp->dev, 0);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_blend.h>
|
||||
#include <drm/drm_drv.h>
|
||||
#include <drm/drm_fb_cma_helper.h>
|
||||
#include <drm/drm_fb_dma_helper.h>
|
||||
#include <drm/drm_fourcc.h>
|
||||
#include <drm/drm_framebuffer.h>
|
||||
#include <drm/drm_gem_cma_helper.h>
|
||||
@@ -722,19 +722,19 @@ static void malidp_set_plane_base_addr(struct drm_framebuffer *fb,
|
||||
ptr = mp->layer->ptr + (plane_index << 4);
|
||||
|
||||
/*
|
||||
* drm_fb_cma_get_gem_addr() alters the physical base address of the
|
||||
* drm_fb_dma_get_gem_addr() alters the physical base address of the
|
||||
* framebuffer as per the plane's src_x, src_y co-ordinates (ie to
|
||||
* take care of source cropping).
|
||||
* For AFBC, this is not needed as the cropping is handled by _AD_CROP_H
|
||||
* and _AD_CROP_V registers.
|
||||
*/
|
||||
if (!afbc) {
|
||||
paddr = drm_fb_cma_get_gem_addr(fb, plane->state,
|
||||
paddr = drm_fb_dma_get_gem_addr(fb, plane->state,
|
||||
plane_index);
|
||||
} else {
|
||||
struct drm_gem_cma_object *obj;
|
||||
|
||||
obj = drm_fb_cma_get_gem_obj(fb, plane_index);
|
||||
obj = drm_fb_dma_get_gem_obj(fb, plane_index);
|
||||
|
||||
if (WARN_ON(!obj))
|
||||
return;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include <drm/drm_crtc_helper.h>
|
||||
#include <drm/drm_device.h>
|
||||
#include <drm/drm_fb_cma_helper.h>
|
||||
#include <drm/drm_fb_dma_helper.h>
|
||||
#include <drm/drm_fourcc.h>
|
||||
#include <drm/drm_framebuffer.h>
|
||||
#include <drm/drm_gem_atomic_helper.h>
|
||||
@@ -185,7 +185,7 @@ static void aspeed_gfx_pipe_update(struct drm_simple_display_pipe *pipe,
|
||||
if (!fb)
|
||||
return;
|
||||
|
||||
gem = drm_fb_cma_get_gem_obj(fb, 0);
|
||||
gem = drm_fb_dma_get_gem_obj(fb, 0);
|
||||
if (!gem)
|
||||
return;
|
||||
writel(gem->paddr, priv->base + CRT_ADDR);
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <drm/drm_atomic.h>
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_blend.h>
|
||||
#include <drm/drm_fb_cma_helper.h>
|
||||
#include <drm/drm_fb_dma_helper.h>
|
||||
#include <drm/drm_fourcc.h>
|
||||
#include <drm/drm_framebuffer.h>
|
||||
#include <drm/drm_gem_cma_helper.h>
|
||||
@@ -448,7 +448,7 @@ static void atmel_hlcdc_plane_update_buffers(struct atmel_hlcdc_plane *plane,
|
||||
sr = atmel_hlcdc_layer_read_reg(&plane->layer, ATMEL_HLCDC_LAYER_CHSR);
|
||||
|
||||
for (i = 0; i < state->nplanes; i++) {
|
||||
struct drm_gem_cma_object *gem = drm_fb_cma_get_gem_obj(fb, i);
|
||||
struct drm_gem_cma_object *gem = drm_fb_dma_get_gem_obj(fb, i);
|
||||
|
||||
state->dscrs[i]->addr = gem->paddr + state->offsets[i];
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/*
|
||||
* drm kms/fb cma (contiguous memory allocator) helper functions
|
||||
* drm kms/fb dma helper functions
|
||||
*
|
||||
* Copyright (C) 2012 Analog Devices Inc.
|
||||
* Author: Lars-Peter Clausen <lars@metafoo.de>
|
||||
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
|
||||
#include <drm/drm_damage_helper.h>
|
||||
#include <drm/drm_fb_cma_helper.h>
|
||||
#include <drm/drm_fb_dma_helper.h>
|
||||
#include <drm/drm_fourcc.h>
|
||||
#include <drm/drm_framebuffer.h>
|
||||
#include <drm/drm_gem_cma_helper.h>
|
||||
@@ -20,17 +20,22 @@
|
||||
#include <linux/module.h>
|
||||
|
||||
/**
|
||||
* DOC: framebuffer cma helper functions
|
||||
* DOC: framebuffer dma helper functions
|
||||
*
|
||||
* Provides helper functions for creating a cma (contiguous memory allocator)
|
||||
* backed framebuffer.
|
||||
* Provides helper functions for creating a DMA-contiguous framebuffer.
|
||||
*
|
||||
* Depending on the platform, the buffers may be physically non-contiguous and
|
||||
* mapped through an IOMMU or a similar mechanism, or allocated from
|
||||
* physically-contiguous memory (using, for instance, CMA or a pool of memory
|
||||
* reserved at early boot). This is handled behind the scenes by the DMA mapping
|
||||
* API.
|
||||
*
|
||||
* drm_gem_fb_create() is used in the &drm_mode_config_funcs.fb_create
|
||||
* callback function to create a cma backed framebuffer.
|
||||
* callback function to create a DMA-contiguous framebuffer.
|
||||
*/
|
||||
|
||||
/**
|
||||
* drm_fb_cma_get_gem_obj() - Get CMA GEM object for framebuffer
|
||||
* drm_fb_dma_get_gem_obj() - Get CMA GEM object for framebuffer
|
||||
* @fb: The framebuffer
|
||||
* @plane: Which plane
|
||||
*
|
||||
@@ -38,7 +43,7 @@
|
||||
*
|
||||
* This function will usually be called from the CRTC callback functions.
|
||||
*/
|
||||
struct drm_gem_cma_object *drm_fb_cma_get_gem_obj(struct drm_framebuffer *fb,
|
||||
struct drm_gem_cma_object *drm_fb_dma_get_gem_obj(struct drm_framebuffer *fb,
|
||||
unsigned int plane)
|
||||
{
|
||||
struct drm_gem_object *gem;
|
||||
@@ -49,20 +54,20 @@ struct drm_gem_cma_object *drm_fb_cma_get_gem_obj(struct drm_framebuffer *fb,
|
||||
|
||||
return to_drm_gem_cma_obj(gem);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(drm_fb_cma_get_gem_obj);
|
||||
EXPORT_SYMBOL_GPL(drm_fb_dma_get_gem_obj);
|
||||
|
||||
/**
|
||||
* drm_fb_cma_get_gem_addr() - Get physical address for framebuffer, for pixel
|
||||
* drm_fb_dma_get_gem_addr() - Get DMA (bus) address for framebuffer, for pixel
|
||||
* formats where values are grouped in blocks this will get you the beginning of
|
||||
* the block
|
||||
* @fb: The framebuffer
|
||||
* @state: Which state of drm plane
|
||||
* @plane: Which plane
|
||||
* Return the CMA GEM address for given framebuffer.
|
||||
* Return the DMA GEM address for given framebuffer.
|
||||
*
|
||||
* This function will usually be called from the PLANE callback functions.
|
||||
*/
|
||||
dma_addr_t drm_fb_cma_get_gem_addr(struct drm_framebuffer *fb,
|
||||
dma_addr_t drm_fb_dma_get_gem_addr(struct drm_framebuffer *fb,
|
||||
struct drm_plane_state *state,
|
||||
unsigned int plane)
|
||||
{
|
||||
@@ -77,7 +82,7 @@ dma_addr_t drm_fb_cma_get_gem_addr(struct drm_framebuffer *fb,
|
||||
u32 block_start_y;
|
||||
u32 num_hblocks;
|
||||
|
||||
obj = drm_fb_cma_get_gem_obj(fb, plane);
|
||||
obj = drm_fb_dma_get_gem_obj(fb, plane);
|
||||
if (!obj)
|
||||
return 0;
|
||||
|
||||
@@ -98,10 +103,10 @@ dma_addr_t drm_fb_cma_get_gem_addr(struct drm_framebuffer *fb,
|
||||
|
||||
return paddr;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(drm_fb_cma_get_gem_addr);
|
||||
EXPORT_SYMBOL_GPL(drm_fb_dma_get_gem_addr);
|
||||
|
||||
/**
|
||||
* drm_fb_cma_sync_non_coherent - Sync GEM object to non-coherent backing
|
||||
* drm_fb_dma_sync_non_coherent - Sync GEM object to non-coherent backing
|
||||
* memory
|
||||
* @drm: DRM device
|
||||
* @old_state: Old plane state
|
||||
@@ -112,7 +117,7 @@ EXPORT_SYMBOL_GPL(drm_fb_cma_get_gem_addr);
|
||||
* in a plane's .atomic_update ensures that all the data in the backing
|
||||
* memory have been written to RAM.
|
||||
*/
|
||||
void drm_fb_cma_sync_non_coherent(struct drm_device *drm,
|
||||
void drm_fb_dma_sync_non_coherent(struct drm_device *drm,
|
||||
struct drm_plane_state *old_state,
|
||||
struct drm_plane_state *state)
|
||||
{
|
||||
@@ -125,11 +130,11 @@ void drm_fb_cma_sync_non_coherent(struct drm_device *drm,
|
||||
size_t nb_bytes;
|
||||
|
||||
for (i = 0; i < finfo->num_planes; i++) {
|
||||
cma_obj = drm_fb_cma_get_gem_obj(state->fb, i);
|
||||
cma_obj = drm_fb_dma_get_gem_obj(state->fb, i);
|
||||
if (!cma_obj->map_noncoherent)
|
||||
continue;
|
||||
|
||||
daddr = drm_fb_cma_get_gem_addr(state->fb, state, i);
|
||||
daddr = drm_fb_dma_get_gem_addr(state->fb, state, i);
|
||||
drm_atomic_helper_damage_iter_init(&iter, old_state, state);
|
||||
|
||||
drm_atomic_for_each_plane_damage(&iter, &clip) {
|
||||
@@ -142,4 +147,4 @@ void drm_fb_cma_sync_non_coherent(struct drm_device *drm,
|
||||
}
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(drm_fb_cma_sync_non_coherent);
|
||||
EXPORT_SYMBOL_GPL(drm_fb_dma_sync_non_coherent);
|
||||
@@ -54,7 +54,7 @@ static int drm_fb_xfrm(void *dst, unsigned long dst_pitch, unsigned long dst_pix
|
||||
const void *sbuf;
|
||||
|
||||
/*
|
||||
* Some source buffers, such as CMA memory, use write-combine
|
||||
* Some source buffers, such as DMA memory, use write-combine
|
||||
* caching, so reads are uncached. Speed up access by fetching
|
||||
* one line at a time.
|
||||
*/
|
||||
@@ -676,7 +676,7 @@ void drm_fb_xrgb8888_to_mono(void *dst, unsigned int dst_pitch, const void *vadd
|
||||
dst_pitch = DIV_ROUND_UP(linepixels, 8);
|
||||
|
||||
/*
|
||||
* The cma memory is write-combined so reads are uncached.
|
||||
* The dma memory is write-combined so reads are uncached.
|
||||
* Speed up by fetching one line at a time.
|
||||
*
|
||||
* Also, format conversion from XR24 to monochrome are done
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <drm/drm_atomic.h>
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_crtc.h>
|
||||
#include <drm/drm_fb_cma_helper.h>
|
||||
#include <drm/drm_fb_dma_helper.h>
|
||||
#include <drm/drm_fourcc.h>
|
||||
#include <drm/drm_framebuffer.h>
|
||||
#include <drm/drm_gem_cma_helper.h>
|
||||
@@ -95,7 +95,7 @@ static void fsl_dcu_drm_plane_atomic_update(struct drm_plane *plane,
|
||||
if (index < 0)
|
||||
return;
|
||||
|
||||
gem = drm_fb_cma_get_gem_obj(fb, 0);
|
||||
gem = drm_fb_dma_get_gem_obj(fb, 0);
|
||||
|
||||
switch (fb->format->format) {
|
||||
case DRM_FORMAT_RGB565:
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_crtc.h>
|
||||
#include <drm/drm_drv.h>
|
||||
#include <drm/drm_fb_cma_helper.h>
|
||||
#include <drm/drm_fb_dma_helper.h>
|
||||
#include <drm/drm_fourcc.h>
|
||||
#include <drm/drm_framebuffer.h>
|
||||
#include <drm/drm_gem_cma_helper.h>
|
||||
@@ -548,7 +548,7 @@ static const struct drm_crtc_funcs ade_crtc_funcs = {
|
||||
static void ade_rdma_set(void __iomem *base, struct drm_framebuffer *fb,
|
||||
u32 ch, u32 y, u32 in_h, u32 fmt)
|
||||
{
|
||||
struct drm_gem_cma_object *obj = drm_fb_cma_get_gem_obj(fb, 0);
|
||||
struct drm_gem_cma_object *obj = drm_fb_dma_get_gem_obj(fb, 0);
|
||||
u32 reg_ctrl, reg_addr, reg_size, reg_stride, reg_space, reg_en;
|
||||
u32 stride = fb->pitches[0];
|
||||
u32 addr = (u32)obj->paddr + y * stride;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <drm/drm_atomic.h>
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_blend.h>
|
||||
#include <drm/drm_fb_cma_helper.h>
|
||||
#include <drm/drm_fb_dma_helper.h>
|
||||
#include <drm/drm_framebuffer.h>
|
||||
#include <drm/drm_gem_atomic_helper.h>
|
||||
#include <drm/drm_gem_cma_helper.h>
|
||||
@@ -156,7 +156,7 @@ static int dcss_plane_atomic_check(struct drm_plane *plane,
|
||||
if (!fb || !new_plane_state->crtc)
|
||||
return 0;
|
||||
|
||||
cma_obj = drm_fb_cma_get_gem_obj(fb, 0);
|
||||
cma_obj = drm_fb_dma_get_gem_obj(fb, 0);
|
||||
WARN_ON(!cma_obj);
|
||||
|
||||
crtc_state = drm_atomic_get_existing_crtc_state(state,
|
||||
@@ -218,7 +218,7 @@ static void dcss_plane_atomic_set_base(struct dcss_plane *dcss_plane)
|
||||
struct dcss_dev *dcss = plane->dev->dev_private;
|
||||
struct drm_framebuffer *fb = state->fb;
|
||||
const struct drm_format_info *format = fb->format;
|
||||
struct drm_gem_cma_object *cma_obj = drm_fb_cma_get_gem_obj(fb, 0);
|
||||
struct drm_gem_cma_object *cma_obj = drm_fb_dma_get_gem_obj(fb, 0);
|
||||
unsigned long p1_ba = 0, p2_ba = 0;
|
||||
|
||||
if (!format->is_yuv ||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <drm/drm_atomic.h>
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_blend.h>
|
||||
#include <drm/drm_fb_cma_helper.h>
|
||||
#include <drm/drm_fb_dma_helper.h>
|
||||
#include <drm/drm_fourcc.h>
|
||||
#include <drm/drm_framebuffer.h>
|
||||
#include <drm/drm_gem_atomic_helper.h>
|
||||
@@ -129,7 +129,7 @@ drm_plane_state_to_eba(struct drm_plane_state *state, int plane)
|
||||
int x = state->src.x1 >> 16;
|
||||
int y = state->src.y1 >> 16;
|
||||
|
||||
cma_obj = drm_fb_cma_get_gem_obj(fb, plane);
|
||||
cma_obj = drm_fb_dma_get_gem_obj(fb, plane);
|
||||
BUG_ON(!cma_obj);
|
||||
|
||||
return cma_obj->paddr + fb->offsets[plane] + fb->pitches[plane] * y +
|
||||
@@ -145,7 +145,7 @@ drm_plane_state_to_ubo(struct drm_plane_state *state)
|
||||
int x = state->src.x1 >> 16;
|
||||
int y = state->src.y1 >> 16;
|
||||
|
||||
cma_obj = drm_fb_cma_get_gem_obj(fb, 1);
|
||||
cma_obj = drm_fb_dma_get_gem_obj(fb, 1);
|
||||
BUG_ON(!cma_obj);
|
||||
|
||||
x /= fb->format->hsub;
|
||||
@@ -164,7 +164,7 @@ drm_plane_state_to_vbo(struct drm_plane_state *state)
|
||||
int x = state->src.x1 >> 16;
|
||||
int y = state->src.y1 >> 16;
|
||||
|
||||
cma_obj = drm_fb_cma_get_gem_obj(fb, 2);
|
||||
cma_obj = drm_fb_dma_get_gem_obj(fb, 2);
|
||||
BUG_ON(!cma_obj);
|
||||
|
||||
x /= fb->format->hsub;
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <drm/drm_drv.h>
|
||||
#include <drm/drm_encoder.h>
|
||||
#include <drm/drm_gem_cma_helper.h>
|
||||
#include <drm/drm_fb_cma_helper.h>
|
||||
#include <drm/drm_fb_dma_helper.h>
|
||||
#include <drm/drm_fb_helper.h>
|
||||
#include <drm/drm_fourcc.h>
|
||||
#include <drm/drm_framebuffer.h>
|
||||
@@ -669,12 +669,12 @@ static void ingenic_drm_plane_atomic_update(struct drm_plane *plane,
|
||||
|
||||
if (newstate && newstate->fb) {
|
||||
if (priv->soc_info->map_noncoherent)
|
||||
drm_fb_cma_sync_non_coherent(&priv->drm, oldstate, newstate);
|
||||
drm_fb_dma_sync_non_coherent(&priv->drm, oldstate, newstate);
|
||||
|
||||
crtc_state = newstate->crtc->state;
|
||||
plane_id = !!(priv->soc_info->has_osd && plane != &priv->f0);
|
||||
|
||||
addr = drm_fb_cma_get_gem_addr(newstate->fb, newstate, 0);
|
||||
addr = drm_fb_dma_get_gem_addr(newstate->fb, newstate, 0);
|
||||
width = newstate->src_w >> 16;
|
||||
height = newstate->src_h >> 16;
|
||||
cpp = newstate->fb->format->cpp[0];
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_damage_helper.h>
|
||||
#include <drm/drm_drv.h>
|
||||
#include <drm/drm_fb_cma_helper.h>
|
||||
#include <drm/drm_fb_dma_helper.h>
|
||||
#include <drm/drm_fourcc.h>
|
||||
#include <drm/drm_framebuffer.h>
|
||||
#include <drm/drm_gem_atomic_helper.h>
|
||||
@@ -362,15 +362,15 @@ static void ingenic_ipu_plane_atomic_update(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
if (ingenic_drm_map_noncoherent(ipu->master))
|
||||
drm_fb_cma_sync_non_coherent(ipu->drm, oldstate, newstate);
|
||||
drm_fb_dma_sync_non_coherent(ipu->drm, oldstate, newstate);
|
||||
|
||||
/* New addresses will be committed in vblank handler... */
|
||||
ipu->addr_y = drm_fb_cma_get_gem_addr(newstate->fb, newstate, 0);
|
||||
ipu->addr_y = drm_fb_dma_get_gem_addr(newstate->fb, newstate, 0);
|
||||
if (finfo->num_planes > 1)
|
||||
ipu->addr_u = drm_fb_cma_get_gem_addr(newstate->fb, newstate,
|
||||
ipu->addr_u = drm_fb_dma_get_gem_addr(newstate->fb, newstate,
|
||||
1);
|
||||
if (finfo->num_planes > 2)
|
||||
ipu->addr_v = drm_fb_cma_get_gem_addr(newstate->fb, newstate,
|
||||
ipu->addr_v = drm_fb_dma_get_gem_addr(newstate->fb, newstate,
|
||||
2);
|
||||
|
||||
if (!needs_modeset)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <drm/drm_blend.h>
|
||||
#include <drm/drm_crtc.h>
|
||||
#include <drm/drm_crtc_helper.h>
|
||||
#include <drm/drm_fb_cma_helper.h>
|
||||
#include <drm/drm_fb_dma_helper.h>
|
||||
#include <drm/drm_fb_helper.h>
|
||||
#include <drm/drm_fourcc.h>
|
||||
#include <drm/drm_framebuffer.h>
|
||||
@@ -403,7 +403,7 @@ static void kmb_plane_atomic_update(struct drm_plane *plane,
|
||||
kmb_write_lcd(kmb, LCD_LAYERn_DMA_LINE_WIDTH(plane_id),
|
||||
(width * fb->format->cpp[0]));
|
||||
|
||||
addr[Y_PLANE] = drm_fb_cma_get_gem_addr(fb, new_plane_state, 0);
|
||||
addr[Y_PLANE] = drm_fb_dma_get_gem_addr(fb, new_plane_state, 0);
|
||||
kmb_write_lcd(kmb, LCD_LAYERn_DMA_START_ADDR(plane_id),
|
||||
addr[Y_PLANE] + fb->offsets[0]);
|
||||
val = get_pixel_format(fb->format->format);
|
||||
@@ -415,7 +415,7 @@ static void kmb_plane_atomic_update(struct drm_plane *plane,
|
||||
kmb_write_lcd(kmb, LCD_LAYERn_DMA_CB_LINE_WIDTH(plane_id),
|
||||
(width * fb->format->cpp[0]));
|
||||
|
||||
addr[U_PLANE] = drm_fb_cma_get_gem_addr(fb, new_plane_state,
|
||||
addr[U_PLANE] = drm_fb_dma_get_gem_addr(fb, new_plane_state,
|
||||
U_PLANE);
|
||||
/* check if Cb/Cr is swapped*/
|
||||
if (num_planes == 3 && (val & LCD_LAYER_CRCB_ORDER))
|
||||
@@ -436,7 +436,7 @@ static void kmb_plane_atomic_update(struct drm_plane *plane,
|
||||
LCD_LAYERn_DMA_CR_LINE_WIDTH(plane_id),
|
||||
((width) * fb->format->cpp[0]));
|
||||
|
||||
addr[V_PLANE] = drm_fb_cma_get_gem_addr(fb,
|
||||
addr[V_PLANE] = drm_fb_dma_get_gem_addr(fb,
|
||||
new_plane_state,
|
||||
V_PLANE);
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ config DRM_LOGICVC
|
||||
depends on DRM
|
||||
depends on OF || COMPILE_TEST
|
||||
select DRM_KMS_HELPER
|
||||
select DRM_KMS_CMA_HELPER
|
||||
select DRM_KMS_DMA_HELPER
|
||||
select DRM_GEM_CMA_HELPER
|
||||
help
|
||||
DRM display driver for the logiCVC programmable logic block from Xylon
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <drm/drm_atomic.h>
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_blend.h>
|
||||
#include <drm/drm_fb_cma_helper.h>
|
||||
#include <drm/drm_fb_dma_helper.h>
|
||||
#include <drm/drm_fourcc.h>
|
||||
#include <drm/drm_framebuffer.h>
|
||||
#include <drm/drm_plane.h>
|
||||
@@ -157,7 +157,7 @@ static void logicvc_plane_atomic_update(struct drm_plane *drm_plane,
|
||||
new_state->crtc_h - 1);
|
||||
|
||||
if (logicvc->caps->layer_address) {
|
||||
phys_addr_t fb_addr = drm_fb_cma_get_gem_addr(fb, new_state, 0);
|
||||
phys_addr_t fb_addr = drm_fb_dma_get_gem_addr(fb, new_state, 0);
|
||||
|
||||
regmap_write(logicvc->regmap, LOGICVC_LAYER_ADDRESS_REG(index),
|
||||
fb_addr);
|
||||
@@ -280,7 +280,7 @@ int logicvc_layer_buffer_find_setup(struct logicvc_drm *logicvc,
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
fb_addr = drm_fb_cma_get_gem_addr(fb, state, 0);
|
||||
fb_addr = drm_fb_dma_get_gem_addr(fb, state, 0);
|
||||
if (fb_addr < logicvc->reserved_mem_base) {
|
||||
drm_err(drm_dev,
|
||||
"Framebuffer memory below reserved memory base!\n");
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <linux/media-bus-format.h>
|
||||
|
||||
#include <drm/drm_device.h>
|
||||
#include <drm/drm_fb_cma_helper.h>
|
||||
#include <drm/drm_fb_dma_helper.h>
|
||||
#include <drm/drm_fourcc.h>
|
||||
#include <drm/drm_framebuffer.h>
|
||||
#include <drm/drm_gem_atomic_helper.h>
|
||||
@@ -165,7 +165,7 @@ static int mcde_display_check(struct drm_simple_display_pipe *pipe,
|
||||
struct drm_framebuffer *fb = pstate->fb;
|
||||
|
||||
if (fb) {
|
||||
u32 offset = drm_fb_cma_get_gem_addr(fb, pstate, 0);
|
||||
u32 offset = drm_fb_dma_get_gem_addr(fb, pstate, 0);
|
||||
|
||||
/* FB base address must be dword aligned. */
|
||||
if (offset & 3) {
|
||||
@@ -1424,7 +1424,7 @@ static void mcde_display_update(struct drm_simple_display_pipe *pipe,
|
||||
* from the DRM core before the display is enabled.
|
||||
*/
|
||||
if (fb) {
|
||||
mcde_set_extsrc(mcde, drm_fb_cma_get_gem_addr(fb, pstate, 0));
|
||||
mcde_set_extsrc(mcde, drm_fb_dma_get_gem_addr(fb, pstate, 0));
|
||||
dev_info_once(mcde->dev, "first update of display contents\n");
|
||||
/*
|
||||
* Usually the flow is already active, unless we are in
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user