mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-22 10:34:55 +08:00
70a59dd829
Only the following drivers aren't converted: - amdgpu, because of the driver_feature mangling due to virt support. Subsequent patch will address this. - nouveau, because DRIVER_ATOMIC uapi is still not the default on the platforms where it's supported (i.e. again driver_feature mangling) - vc4, again because of driver_feature mangling - qxl, because the ioctl table is somewhere else and moving that is maybe a bit too much, hence the num_ioctls assignment prevents a const driver structure. - arcpgu, because that is stuck behind a pending tiny-fication series from me. - legacy drivers, because legacy requires non-const drm_driver. Note that for armada I also went ahead and made the ioctl array const. Only cc'ing the driver people who've not been converted (everyone else is way too much). v2: Fix one misplaced const static, should be static const (0day) v3: - Improve commit message (Sam) Acked-by: Sam Ravnborg <sam@ravnborg.org> Cc: kernel test robot <lkp@intel.com> Acked-by: Maxime Ripard <mripard@kernel.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Dave Airlie <airlied@redhat.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: virtualization@lists.linux-foundation.org Cc: Harry Wentland <harry.wentland@amd.com> Cc: Leo Li <sunpeng.li@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian König <christian.koenig@amd.com> Cc: Eric Anholt <eric@anholt.net> Cc: Maxime Ripard <mripard@kernel.org> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: nouveau@lists.freedesktop.org Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20201104100425.1922351-5-daniel.vetter@ffwll.ch
58 lines
1.3 KiB
C
58 lines
1.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (c) 2016 Linaro Limited.
|
|
* Copyright (c) 2014-2016 Hisilicon Limited.
|
|
*/
|
|
|
|
#ifndef __KIRIN_DRM_DRV_H__
|
|
#define __KIRIN_DRM_DRV_H__
|
|
|
|
#define to_kirin_crtc(crtc) \
|
|
container_of(crtc, struct kirin_crtc, base)
|
|
|
|
#define to_kirin_plane(plane) \
|
|
container_of(plane, struct kirin_plane, base)
|
|
|
|
/* kirin-format translate table */
|
|
struct kirin_format {
|
|
u32 pixel_format;
|
|
u32 hw_format;
|
|
};
|
|
|
|
struct kirin_crtc {
|
|
struct drm_crtc base;
|
|
void *hw_ctx;
|
|
bool enable;
|
|
};
|
|
|
|
struct kirin_plane {
|
|
struct drm_plane base;
|
|
void *hw_ctx;
|
|
u32 ch;
|
|
};
|
|
|
|
/* display controller init/cleanup ops */
|
|
struct kirin_drm_data {
|
|
const u32 *channel_formats;
|
|
u32 channel_formats_cnt;
|
|
int config_max_width;
|
|
int config_max_height;
|
|
u32 num_planes;
|
|
u32 prim_plane;
|
|
|
|
const struct drm_driver *driver;
|
|
const struct drm_crtc_helper_funcs *crtc_helper_funcs;
|
|
const struct drm_crtc_funcs *crtc_funcs;
|
|
const struct drm_plane_helper_funcs *plane_helper_funcs;
|
|
const struct drm_plane_funcs *plane_funcs;
|
|
const struct drm_mode_config_funcs *mode_config_funcs;
|
|
|
|
void *(*alloc_hw_ctx)(struct platform_device *pdev,
|
|
struct drm_crtc *crtc);
|
|
void (*cleanup_hw_ctx)(void *hw_ctx);
|
|
};
|
|
|
|
extern struct kirin_drm_data ade_driver_data;
|
|
|
|
#endif /* __KIRIN_DRM_DRV_H__ */
|