The caller should more or less know how many DSB commands it wants to emit into the command buffer, so allow it to specify the size of the command buffer rather than having the low level DSB code guess it. Technically we can emit as many as 134+1033 (for adl+ degamma + 10bit gamma) register writes but thanks to the DSB indexed register write command we get significant space savings so the current size estimate of 8KiB (~1024 DSB commands) is sufficient for now. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221216003810.13338-11-ville.syrjala@linux.intel.com Reviewed-by: Animesh Manna <animesh.manna@intel.com>
23 lines
486 B
C
23 lines
486 B
C
/* SPDX-License-Identifier: MIT
|
|
*
|
|
* Copyright © 2019 Intel Corporation
|
|
*/
|
|
|
|
#ifndef _INTEL_DSB_H
|
|
#define _INTEL_DSB_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
#include "i915_reg_defs.h"
|
|
|
|
struct intel_crtc;
|
|
struct intel_dsb;
|
|
|
|
struct intel_dsb *intel_dsb_prepare(struct intel_crtc *crtc,
|
|
unsigned int max_cmds);
|
|
void intel_dsb_cleanup(struct intel_dsb *dsb);
|
|
void intel_dsb_reg_write(struct intel_dsb *dsb,
|
|
i915_reg_t reg, u32 val);
|
|
void intel_dsb_commit(struct intel_dsb *dsb);
|
|
|
|
#endif
|