You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
drm/i915: Rework intel_crtc_page_flip to be almost atomic, v3.
Create a work structure that will be used for all changes. This will be used later on in the atomic commit function. Changes since v1: - Free old_crtc_state from unpin_work_fn properly. Changes since v2: - Add hunk for calling hw state verifier. - Add missing support for color spaces. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1463490484-19540-12-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Patrik Jakobsson <patrik.jakobsson@linux.intel.com>
This commit is contained in:
@@ -598,29 +598,43 @@ static void i915_dump_pageflip(struct seq_file *m,
|
||||
struct intel_flip_work *work)
|
||||
{
|
||||
const char pipe = pipe_name(crtc->pipe);
|
||||
const char plane = plane_name(crtc->plane);
|
||||
u32 pending;
|
||||
u32 addr;
|
||||
int i;
|
||||
|
||||
pending = atomic_read(&work->pending);
|
||||
if (pending) {
|
||||
seq_printf(m, "Flip ioctl preparing on pipe %c (plane %c)\n",
|
||||
pipe, plane);
|
||||
pipe, plane_name(crtc->plane));
|
||||
} else {
|
||||
seq_printf(m, "Flip pending (waiting for vsync) on pipe %c (plane %c)\n",
|
||||
pipe, plane);
|
||||
pipe, plane_name(crtc->plane));
|
||||
}
|
||||
if (work->flip_queued_req) {
|
||||
struct intel_engine_cs *engine = i915_gem_request_get_engine(work->flip_queued_req);
|
||||
|
||||
seq_printf(m, "Flip queued on %s at seqno %x, next seqno %x [current breadcrumb %x], completed? %d\n",
|
||||
|
||||
for (i = 0; i < work->num_planes; i++) {
|
||||
struct intel_plane_state *old_plane_state = work->old_plane_state[i];
|
||||
struct drm_plane *plane = old_plane_state->base.plane;
|
||||
struct drm_i915_gem_request *req = old_plane_state->wait_req;
|
||||
struct intel_engine_cs *engine;
|
||||
|
||||
seq_printf(m, "[PLANE:%i] part of flip.\n", plane->base.id);
|
||||
|
||||
if (!req) {
|
||||
seq_printf(m, "Plane not associated with any engine\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
engine = i915_gem_request_get_engine(req);
|
||||
|
||||
seq_printf(m, "Plane blocked on %s at seqno %x, next seqno %x [current breadcrumb %x], completed? %d\n",
|
||||
engine->name,
|
||||
i915_gem_request_get_seqno(work->flip_queued_req),
|
||||
i915_gem_request_get_seqno(req),
|
||||
dev_priv->next_seqno,
|
||||
engine->get_seqno(engine),
|
||||
i915_gem_request_completed(work->flip_queued_req, true));
|
||||
} else
|
||||
seq_printf(m, "Flip not associated with any ring\n");
|
||||
i915_gem_request_completed(req, true));
|
||||
}
|
||||
|
||||
seq_printf(m, "Flip queued on frame %d, (was ready on frame %d), now %d\n",
|
||||
work->flip_queued_vblank,
|
||||
work->flip_ready_vblank,
|
||||
@@ -633,7 +647,7 @@ static void i915_dump_pageflip(struct seq_file *m,
|
||||
addr = I915_READ(DSPADDR(crtc->plane));
|
||||
seq_printf(m, "Current scanout address 0x%08x\n", addr);
|
||||
|
||||
if (work->pending_flip_obj) {
|
||||
if (work->flip_queued_req) {
|
||||
seq_printf(m, "New framebuffer address 0x%08lx\n", (long)work->gtt_offset);
|
||||
seq_printf(m, "MMIO update completed? %d\n", addr == work->gtt_offset);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -975,9 +975,6 @@ struct intel_flip_work {
|
||||
struct work_struct unpin_work;
|
||||
struct work_struct mmio_work;
|
||||
|
||||
struct drm_crtc *crtc;
|
||||
struct drm_framebuffer *old_fb;
|
||||
struct drm_i915_gem_object *pending_flip_obj;
|
||||
struct drm_pending_vblank_event *event;
|
||||
atomic_t pending;
|
||||
u32 flip_count;
|
||||
@@ -985,6 +982,16 @@ struct intel_flip_work {
|
||||
struct drm_i915_gem_request *flip_queued_req;
|
||||
u32 flip_queued_vblank;
|
||||
u32 flip_ready_vblank;
|
||||
|
||||
unsigned put_power_domains;
|
||||
unsigned num_planes;
|
||||
|
||||
bool can_async_unpin, flip_prepared;
|
||||
unsigned fb_bits;
|
||||
|
||||
struct intel_crtc_state *old_crtc_state, *new_crtc_state;
|
||||
struct intel_plane_state *old_plane_state[I915_MAX_PLANES + 1];
|
||||
struct intel_plane_state *new_plane_state[I915_MAX_PLANES + 1];
|
||||
};
|
||||
|
||||
struct intel_load_detect_pipe {
|
||||
|
||||
Reference in New Issue
Block a user