Merge tag 'drm-misc-next-2020-07-22' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next for v5.9: UAPI Changes: Cross-subsystem Changes: - Convert panel-dsi-cm and ingenic bindings to YAML. - Add lockdep annotations for dma-fence. \o/ - Describe why indefinite fences are a bad idea - Update binding for rocktech jh057n00900. Core Changes: - Add vblank workers. - Use spin_(un)lock_irq instead of the irqsave/restore variants in crtc code. - Add managed vram helpers. - Convert more logging to drm functions. - Replace more http links with https in core and drivers. - Cleanup to ttm iomem functions and implementation. - Remove TTM CMA memtype as it doesn't work correctly. - Remove TTM_MEMTYPE_FLAG_MAPPABLE for many drivers that have no unmappable memory resources. Driver Changes: - Add CRC support to nouveau, using the new vblank workers. - Dithering and atomic state fix for nouveau. - Fixes for Frida FRD350H54004 panel. - Add support for OSD mode (sprite planes), IPU (scaling) and multiple panels/bridges to ingenic. - Use managed vram helpers in ast. - Assorted small fixes to ingenic, i810, mxsfb. - Remove optional unused ttm dummy functions. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/d6bf269e-ccb2-8a7b-fdae-226e9e3f8274@linux.intel.com
This commit is contained in:
@@ -206,6 +206,9 @@ struct drm_vram_mm *drm_vram_helper_alloc_mm(
|
||||
struct drm_device *dev, uint64_t vram_base, size_t vram_size);
|
||||
void drm_vram_helper_release_mm(struct drm_device *dev);
|
||||
|
||||
int drmm_vram_helper_init(struct drm_device *dev, uint64_t vram_base,
|
||||
size_t vram_size);
|
||||
|
||||
/*
|
||||
* Mode-config helpers
|
||||
*/
|
||||
|
@@ -27,12 +27,14 @@
|
||||
#include <linux/seqlock.h>
|
||||
#include <linux/idr.h>
|
||||
#include <linux/poll.h>
|
||||
#include <linux/kthread.h>
|
||||
|
||||
#include <drm/drm_file.h>
|
||||
#include <drm/drm_modes.h>
|
||||
|
||||
struct drm_device;
|
||||
struct drm_crtc;
|
||||
struct drm_vblank_work;
|
||||
|
||||
/**
|
||||
* struct drm_pending_vblank_event - pending vblank event tracking
|
||||
@@ -203,6 +205,24 @@ struct drm_vblank_crtc {
|
||||
* disabling functions multiple times.
|
||||
*/
|
||||
bool enabled;
|
||||
|
||||
/**
|
||||
* @worker: The &kthread_worker used for executing vblank works.
|
||||
*/
|
||||
struct kthread_worker *worker;
|
||||
|
||||
/**
|
||||
* @pending_work: A list of scheduled &drm_vblank_work items that are
|
||||
* waiting for a future vblank.
|
||||
*/
|
||||
struct list_head pending_work;
|
||||
|
||||
/**
|
||||
* @work_wait_queue: The wait queue used for signaling that a
|
||||
* &drm_vblank_work item has either finished executing, or was
|
||||
* cancelled.
|
||||
*/
|
||||
wait_queue_head_t work_wait_queue;
|
||||
};
|
||||
|
||||
int drm_vblank_init(struct drm_device *dev, unsigned int num_crtcs);
|
||||
|
71
include/drm/drm_vblank_work.h
Normal file
71
include/drm/drm_vblank_work.h
Normal file
@@ -0,0 +1,71 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
#ifndef _DRM_VBLANK_WORK_H_
|
||||
#define _DRM_VBLANK_WORK_H_
|
||||
|
||||
#include <linux/kthread.h>
|
||||
|
||||
struct drm_crtc;
|
||||
|
||||
/**
|
||||
* struct drm_vblank_work - A delayed work item which delays until a target
|
||||
* vblank passes, and then executes at realtime priority outside of IRQ
|
||||
* context.
|
||||
*
|
||||
* See also:
|
||||
* drm_vblank_work_schedule()
|
||||
* drm_vblank_work_init()
|
||||
* drm_vblank_work_cancel_sync()
|
||||
* drm_vblank_work_flush()
|
||||
*/
|
||||
struct drm_vblank_work {
|
||||
/**
|
||||
* @base: The base &kthread_work item which will be executed by
|
||||
* &drm_vblank_crtc.worker. Drivers should not interact with this
|
||||
* directly, and instead rely on drm_vblank_work_init() to initialize
|
||||
* this.
|
||||
*/
|
||||
struct kthread_work base;
|
||||
|
||||
/**
|
||||
* @vblank: A pointer to &drm_vblank_crtc this work item belongs to.
|
||||
*/
|
||||
struct drm_vblank_crtc *vblank;
|
||||
|
||||
/**
|
||||
* @count: The target vblank this work will execute on. Drivers should
|
||||
* not modify this value directly, and instead use
|
||||
* drm_vblank_work_schedule()
|
||||
*/
|
||||
u64 count;
|
||||
|
||||
/**
|
||||
* @cancelling: The number of drm_vblank_work_cancel_sync() calls that
|
||||
* are currently running. A work item cannot be rescheduled until all
|
||||
* calls have finished.
|
||||
*/
|
||||
int cancelling;
|
||||
|
||||
/**
|
||||
* @node: The position of this work item in
|
||||
* &drm_vblank_crtc.pending_work.
|
||||
*/
|
||||
struct list_head node;
|
||||
};
|
||||
|
||||
/**
|
||||
* to_drm_vblank_work - Retrieve the respective &drm_vblank_work item from a
|
||||
* &kthread_work
|
||||
* @_work: The &kthread_work embedded inside a &drm_vblank_work
|
||||
*/
|
||||
#define to_drm_vblank_work(_work) \
|
||||
container_of((_work), struct drm_vblank_work, base)
|
||||
|
||||
int drm_vblank_work_schedule(struct drm_vblank_work *work,
|
||||
u64 count, bool nextonmiss);
|
||||
void drm_vblank_work_init(struct drm_vblank_work *work, struct drm_crtc *crtc,
|
||||
void (*func)(struct kthread_work *work));
|
||||
bool drm_vblank_work_cancel_sync(struct drm_vblank_work *work);
|
||||
void drm_vblank_work_flush(struct drm_vblank_work *work);
|
||||
|
||||
#endif /* !_DRM_VBLANK_WORK_H_ */
|
@@ -47,7 +47,6 @@
|
||||
|
||||
#define TTM_MEMTYPE_FLAG_FIXED (1 << 0) /* Fixed (on-card) PCI memory */
|
||||
#define TTM_MEMTYPE_FLAG_MAPPABLE (1 << 1) /* Memory mappable */
|
||||
#define TTM_MEMTYPE_FLAG_CMA (1 << 3) /* Can't map aperture */
|
||||
|
||||
struct ttm_mem_type_manager;
|
||||
|
||||
@@ -155,7 +154,6 @@ struct ttm_mem_type_manager_func {
|
||||
* @use_io_reserve_lru: Use an lru list to try to unreserve io_mem_regions
|
||||
* reserved by the TTM vm system.
|
||||
* @io_reserve_lru: Optional lru list for unreserving io mem regions.
|
||||
* @io_reserve_fastpath: Only use bdev::driver::io_mem_reserve to obtain
|
||||
* @move_lock: lock for move fence
|
||||
* static information. bdev::driver::io_mem_free is never used.
|
||||
* @lru: The lru list for this memory type.
|
||||
@@ -184,7 +182,6 @@ struct ttm_mem_type_manager {
|
||||
void *priv;
|
||||
struct mutex io_reserve_mutex;
|
||||
bool use_io_reserve_lru;
|
||||
bool io_reserve_fastpath;
|
||||
spinlock_t move_lock;
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user