------------------------ dma-buf: - dma-buf-map: Rename to iosys-map (Lucas) Core Changes: ------------- drm: - Always include the debugfs_entry in drm_crtc (Ville) - Add orientation quirk for GPD Win Max (Anisse) Driver Changes: --------------- gvt: - Constify some pointers. (Rikard Falkeborn) - Use list_entry to access list members. (Guenter Roeck) - Fix cmd parser error for Passmark9. (Zhenyu Wang) i915: - Various clean-ups including headers and removing unused and unnecessary stuff\ (Jani, Hans, Andy, Ville) - Cleaning up on our registers definitions i915_reg.h (Matt) - More multi-FBC refactoring (Ville) - Baytrail backlight fix (Hans) - DG1 OPROM read through SPI controller (Clint) - ADL-N platform enabling (Tejas) - Fix slab-out-of-bounds access (Jani) - Add opregion mailbox #5 support for possible EDID override (Anisse) - Fix possible NULL dereferences (Harish) - Updates and fixes around display voltage swing values (Clint, Jose) - Fix RPM wekeref on PXP code (Juston) - Many register definitions clean-up, including planes registers (Ville) - More conversion towards display version over the old gen (Madhumitha, Ville) - DP MST ESI handling improvements (Jani) - drm device based logging conversions (Jani) - Prevent divide by zero (Dan) - Introduce ilk_pch_pre_enable for complete modeset abstraction (Ville) - Async flip optimization for DG2 (Stanislav) - Multiple DSC and bigjoiner fixes and improvements (Ville) - Fix ADL-P TypeC Phy ready status readout (Imre) - Fix up DP DFP 4:2:0 handling more display related fixes (Ville) - Display M/N cleanup (Ville) - Switch to use VGA definitions from video/vga.h (Jani) - Fixes and improvements to abstract CPU architecture (Lucas) - Disable unsused power wells left enabled by BIOS (Imre) - Allow !join_mbus cases for adlp+ dbuf configuration (Ville) - Populate pipe dbuf slices more accurately during readout (Ville) - Workaround broken BIOS DBUF configuration on TGL/RKL (Ville) - Fix trailing semicolon (Lucas) -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEbSBwaO7dZQkcLOKj+mJfZA7rE8oFAmIChLkACgkQ+mJfZA7r E8rDOgf9GdgD5PIqly1zCjfpN0z15KXS6kn6lDlthcZMQ2INpAjfo7sOhpAdcb5h ptoKkBxD0p+VlLWTR14+N1/DXV8lvxgdfbee2XHdG2+750eBjcjdYNakDj+lGZJ6 AVO5pNJRa6WEMd4pesm53CJMHlgSzydRCl66PobHrqqeHahO4VGh4Y9jqoJ3JzvD unO1iWrss/i9HvJrefcrUKPGkpb9u59dzsiM9Q3rCNSsPg3ik7Mz1LLPEyHEHyUi 7vs8ugjN2UiZZELnMJIiCBwHs1xN0O3oS4YkjjTzZXMWc+cvY9mFpGbIWMffYpMY qijXJLO8Fh57SN0G6EPaCjNyQbm8Gw== =/7VU -----END PGP SIGNATURE----- Merge tag 'drm-intel-next-2022-02-08' of git://anongit.freedesktop.org/drm/drm-intel into drm-next Cross-subsystem Changes: ------------------------ dma-buf: - dma-buf-map: Rename to iosys-map (Lucas) Core Changes: ------------- drm: - Always include the debugfs_entry in drm_crtc (Ville) - Add orientation quirk for GPD Win Max (Anisse) Driver Changes: --------------- gvt: - Constify some pointers. (Rikard Falkeborn) - Use list_entry to access list members. (Guenter Roeck) - Fix cmd parser error for Passmark9. (Zhenyu Wang) i915: - Various clean-ups including headers and removing unused and unnecessary stuff\ (Jani, Hans, Andy, Ville) - Cleaning up on our registers definitions i915_reg.h (Matt) - More multi-FBC refactoring (Ville) - Baytrail backlight fix (Hans) - DG1 OPROM read through SPI controller (Clint) - ADL-N platform enabling (Tejas) - Fix slab-out-of-bounds access (Jani) - Add opregion mailbox #5 support for possible EDID override (Anisse) - Fix possible NULL dereferences (Harish) - Updates and fixes around display voltage swing values (Clint, Jose) - Fix RPM wekeref on PXP code (Juston) - Many register definitions clean-up, including planes registers (Ville) - More conversion towards display version over the old gen (Madhumitha, Ville) - DP MST ESI handling improvements (Jani) - drm device based logging conversions (Jani) - Prevent divide by zero (Dan) - Introduce ilk_pch_pre_enable for complete modeset abstraction (Ville) - Async flip optimization for DG2 (Stanislav) - Multiple DSC and bigjoiner fixes and improvements (Ville) - Fix ADL-P TypeC Phy ready status readout (Imre) - Fix up DP DFP 4:2:0 handling more display related fixes (Ville) - Display M/N cleanup (Ville) - Switch to use VGA definitions from video/vga.h (Jani) - Fixes and improvements to abstract CPU architecture (Lucas) - Disable unsused power wells left enabled by BIOS (Imre) - Allow !join_mbus cases for adlp+ dbuf configuration (Ville) - Populate pipe dbuf slices more accurately during readout (Ville) - Workaround broken BIOS DBUF configuration on TGL/RKL (Ville) - Fix trailing semicolon (Lucas) Signed-off-by: Dave Airlie <airlied@redhat.com> From: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/YgKFLmCgpv4vQEa1@intel.com
149 lines
3.6 KiB
C
149 lines
3.6 KiB
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
|
|
#ifndef _VKMS_DRV_H_
|
|
#define _VKMS_DRV_H_
|
|
|
|
#include <linux/hrtimer.h>
|
|
|
|
#include <drm/drm.h>
|
|
#include <drm/drm_gem.h>
|
|
#include <drm/drm_gem_atomic_helper.h>
|
|
#include <drm/drm_encoder.h>
|
|
#include <drm/drm_writeback.h>
|
|
|
|
#define XRES_MIN 20
|
|
#define YRES_MIN 20
|
|
|
|
#define XRES_DEF 1024
|
|
#define YRES_DEF 768
|
|
|
|
#define XRES_MAX 8192
|
|
#define YRES_MAX 8192
|
|
|
|
#define NUM_OVERLAY_PLANES 8
|
|
|
|
struct vkms_writeback_job {
|
|
struct iosys_map map[DRM_FORMAT_MAX_PLANES];
|
|
struct iosys_map data[DRM_FORMAT_MAX_PLANES];
|
|
};
|
|
|
|
struct vkms_composer {
|
|
struct drm_framebuffer fb;
|
|
struct drm_rect src, dst;
|
|
struct iosys_map map[4];
|
|
unsigned int offset;
|
|
unsigned int pitch;
|
|
unsigned int cpp;
|
|
};
|
|
|
|
/**
|
|
* vkms_plane_state - Driver specific plane state
|
|
* @base: base plane state
|
|
* @composer: data required for composing computation
|
|
*/
|
|
struct vkms_plane_state {
|
|
struct drm_shadow_plane_state base;
|
|
struct vkms_composer *composer;
|
|
};
|
|
|
|
struct vkms_plane {
|
|
struct drm_plane base;
|
|
};
|
|
|
|
/**
|
|
* vkms_crtc_state - Driver specific CRTC state
|
|
* @base: base CRTC state
|
|
* @composer_work: work struct to compose and add CRC entries
|
|
* @n_frame_start: start frame number for computed CRC
|
|
* @n_frame_end: end frame number for computed CRC
|
|
*/
|
|
struct vkms_crtc_state {
|
|
struct drm_crtc_state base;
|
|
struct work_struct composer_work;
|
|
|
|
int num_active_planes;
|
|
/* stack of active planes for crc computation, should be in z order */
|
|
struct vkms_plane_state **active_planes;
|
|
struct vkms_writeback_job *active_writeback;
|
|
|
|
/* below four are protected by vkms_output.composer_lock */
|
|
bool crc_pending;
|
|
bool wb_pending;
|
|
u64 frame_start;
|
|
u64 frame_end;
|
|
};
|
|
|
|
struct vkms_output {
|
|
struct drm_crtc crtc;
|
|
struct drm_encoder encoder;
|
|
struct drm_connector connector;
|
|
struct drm_writeback_connector wb_connector;
|
|
struct hrtimer vblank_hrtimer;
|
|
ktime_t period_ns;
|
|
struct drm_pending_vblank_event *event;
|
|
/* ordered wq for composer_work */
|
|
struct workqueue_struct *composer_workq;
|
|
/* protects concurrent access to composer */
|
|
spinlock_t lock;
|
|
|
|
/* protected by @lock */
|
|
bool composer_enabled;
|
|
struct vkms_crtc_state *composer_state;
|
|
|
|
spinlock_t composer_lock;
|
|
};
|
|
|
|
struct vkms_device;
|
|
|
|
struct vkms_config {
|
|
bool writeback;
|
|
bool cursor;
|
|
bool overlay;
|
|
/* only set when instantiated */
|
|
struct vkms_device *dev;
|
|
};
|
|
|
|
struct vkms_device {
|
|
struct drm_device drm;
|
|
struct platform_device *platform;
|
|
struct vkms_output output;
|
|
const struct vkms_config *config;
|
|
};
|
|
|
|
#define drm_crtc_to_vkms_output(target) \
|
|
container_of(target, struct vkms_output, crtc)
|
|
|
|
#define drm_device_to_vkms_device(target) \
|
|
container_of(target, struct vkms_device, drm)
|
|
|
|
#define to_vkms_crtc_state(target)\
|
|
container_of(target, struct vkms_crtc_state, base)
|
|
|
|
#define to_vkms_plane_state(target)\
|
|
container_of(target, struct vkms_plane_state, base.base)
|
|
|
|
/* CRTC */
|
|
int vkms_crtc_init(struct drm_device *dev, struct drm_crtc *crtc,
|
|
struct drm_plane *primary, struct drm_plane *cursor);
|
|
|
|
int vkms_output_init(struct vkms_device *vkmsdev, int index);
|
|
|
|
struct vkms_plane *vkms_plane_init(struct vkms_device *vkmsdev,
|
|
enum drm_plane_type type, int index);
|
|
|
|
/* CRC Support */
|
|
const char *const *vkms_get_crc_sources(struct drm_crtc *crtc,
|
|
size_t *count);
|
|
int vkms_set_crc_source(struct drm_crtc *crtc, const char *src_name);
|
|
int vkms_verify_crc_source(struct drm_crtc *crtc, const char *source_name,
|
|
size_t *values_cnt);
|
|
|
|
/* Composer Support */
|
|
void vkms_composer_worker(struct work_struct *work);
|
|
void vkms_set_composer(struct vkms_output *out, bool enabled);
|
|
|
|
/* Writeback */
|
|
int vkms_enable_writeback_connector(struct vkms_device *vkmsdev);
|
|
|
|
#endif /* _VKMS_DRV_H_ */
|