2019-09-20 17:29:22 +05:30
|
|
|
/* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
* Copyright © 2019 Intel Corporation
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _INTEL_DSB_H
|
|
|
|
#define _INTEL_DSB_H
|
|
|
|
|
|
|
|
#include <linux/types.h>
|
|
|
|
|
2022-01-27 15:43:34 -08:00
|
|
|
#include "i915_reg_defs.h"
|
2019-09-23 10:09:23 +03:00
|
|
|
|
2024-06-11 16:33:39 +03:00
|
|
|
struct intel_atomic_state;
|
2022-11-23 17:26:34 +02:00
|
|
|
struct intel_crtc;
|
2023-06-06 22:15:02 +03:00
|
|
|
struct intel_crtc_state;
|
2024-06-25 16:58:52 +03:00
|
|
|
struct intel_display;
|
2022-11-23 17:26:34 +02:00
|
|
|
struct intel_dsb;
|
2019-09-20 17:29:22 +05:30
|
|
|
|
2024-06-25 16:58:52 +03:00
|
|
|
enum pipe;
|
|
|
|
|
2024-05-31 14:40:59 +03:00
|
|
|
enum intel_dsb_id {
|
|
|
|
INTEL_DSB_0,
|
|
|
|
INTEL_DSB_1,
|
|
|
|
INTEL_DSB_2,
|
|
|
|
|
|
|
|
I915_MAX_DSBS,
|
|
|
|
};
|
|
|
|
|
2025-06-12 17:50:14 +03:00
|
|
|
unsigned int intel_dsb_size(struct intel_dsb *dsb);
|
|
|
|
unsigned int intel_dsb_head(struct intel_dsb *dsb);
|
2024-06-11 16:33:39 +03:00
|
|
|
struct intel_dsb *intel_dsb_prepare(struct intel_atomic_state *state,
|
|
|
|
struct intel_crtc *crtc,
|
2024-05-31 14:41:00 +03:00
|
|
|
enum intel_dsb_id dsb_id,
|
2022-12-16 02:38:07 +02:00
|
|
|
unsigned int max_cmds);
|
2023-01-18 18:30:31 +02:00
|
|
|
void intel_dsb_finish(struct intel_dsb *dsb);
|
2025-05-23 11:50:35 +05:30
|
|
|
void intel_dsb_gosub_finish(struct intel_dsb *dsb);
|
2022-11-23 17:26:34 +02:00
|
|
|
void intel_dsb_cleanup(struct intel_dsb *dsb);
|
2025-06-12 17:50:15 +03:00
|
|
|
int intel_dsb_exec_time_us(void);
|
2022-11-23 17:26:34 +02:00
|
|
|
void intel_dsb_reg_write(struct intel_dsb *dsb,
|
2020-05-20 18:37:37 +05:30
|
|
|
i915_reg_t reg, u32 val);
|
2024-11-20 18:41:20 +02:00
|
|
|
void intel_dsb_reg_write_indexed(struct intel_dsb *dsb,
|
|
|
|
i915_reg_t reg, u32 val);
|
2023-06-06 22:14:54 +03:00
|
|
|
void intel_dsb_reg_write_masked(struct intel_dsb *dsb,
|
|
|
|
i915_reg_t reg, u32 mask, u32 val);
|
2023-06-06 22:14:53 +03:00
|
|
|
void intel_dsb_noop(struct intel_dsb *dsb, int count);
|
2023-06-06 22:14:55 +03:00
|
|
|
void intel_dsb_nonpost_start(struct intel_dsb *dsb);
|
|
|
|
void intel_dsb_nonpost_end(struct intel_dsb *dsb);
|
2024-09-30 20:04:06 +03:00
|
|
|
void intel_dsb_interrupt(struct intel_dsb *dsb);
|
2024-09-30 20:04:08 +03:00
|
|
|
void intel_dsb_wait_usec(struct intel_dsb *dsb, int count);
|
2024-09-30 20:04:09 +03:00
|
|
|
void intel_dsb_wait_vblanks(struct intel_dsb *dsb, int count);
|
2024-09-30 20:04:11 +03:00
|
|
|
void intel_dsb_wait_vblank_delay(struct intel_atomic_state *state,
|
|
|
|
struct intel_dsb *dsb);
|
2024-06-24 22:10:27 +03:00
|
|
|
void intel_dsb_wait_scanline_in(struct intel_atomic_state *state,
|
|
|
|
struct intel_dsb *dsb,
|
|
|
|
int lower, int upper);
|
|
|
|
void intel_dsb_wait_scanline_out(struct intel_atomic_state *state,
|
|
|
|
struct intel_dsb *dsb,
|
|
|
|
int lower, int upper);
|
2024-09-30 20:04:07 +03:00
|
|
|
void intel_dsb_vblank_evade(struct intel_atomic_state *state,
|
|
|
|
struct intel_dsb *dsb);
|
2025-02-08 00:31:56 +02:00
|
|
|
void intel_dsb_poll(struct intel_dsb *dsb,
|
|
|
|
i915_reg_t reg, u32 mask, u32 val,
|
|
|
|
int wait_us, int count);
|
2025-05-23 11:50:34 +05:30
|
|
|
void intel_dsb_gosub(struct intel_dsb *dsb,
|
|
|
|
struct intel_dsb *sub_dsb);
|
2024-06-24 22:10:28 +03:00
|
|
|
void intel_dsb_chain(struct intel_atomic_state *state,
|
|
|
|
struct intel_dsb *dsb,
|
2024-06-24 22:10:29 +03:00
|
|
|
struct intel_dsb *chained_dsb,
|
|
|
|
bool wait_for_vblank);
|
2023-06-06 22:14:55 +03:00
|
|
|
|
2025-06-12 17:50:16 +03:00
|
|
|
void intel_dsb_commit(struct intel_dsb *dsb);
|
2023-01-18 18:30:30 +02:00
|
|
|
void intel_dsb_wait(struct intel_dsb *dsb);
|
2019-09-20 17:29:22 +05:30
|
|
|
|
2024-06-25 16:58:52 +03:00
|
|
|
void intel_dsb_irq_handler(struct intel_display *display,
|
|
|
|
enum pipe pipe, enum intel_dsb_id dsb_id);
|
|
|
|
|
2019-09-20 17:29:22 +05:30
|
|
|
#endif
|