linux/drivers/gpu/drm/msm/disp/mdp_kms.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (C) 2013 Red Hat
 * Author: Rob Clark <[email protected]>
 */

#ifndef __MDP_KMS_H__
#define __MDP_KMS_H__

#include <linux/clk.h>
#include <linux/platform_device.h>
#include <linux/regulator/consumer.h>

#include "mdp_format.h"
#include "msm_drv.h"
#include "msm_kms.h"
#include "mdp_common.xml.h"

struct mdp_kms;

struct mdp_kms_funcs {};

struct mdp_kms {};
#define to_mdp_kms(x)

static inline int mdp_kms_init(struct mdp_kms *mdp_kms,
		const struct mdp_kms_funcs *funcs)
{}

static inline void mdp_kms_destroy(struct mdp_kms *mdp_kms)
{}

/*
 * irq helpers:
 */

/* For transiently registering for different MDP irqs that various parts
 * of the KMS code need during setup/configuration.  These are not
 * necessarily the same as what drm_vblank_get/put() are requesting, and
 * the hysteresis in drm_vblank_put() is not necessarily desirable for
 * internal housekeeping related irq usage.
 */
struct mdp_irq {};

void mdp_dispatch_irqs(struct mdp_kms *mdp_kms, uint32_t status);
void mdp_update_vblank_mask(struct mdp_kms *mdp_kms, uint32_t mask, bool enable);
void mdp_irq_wait(struct mdp_kms *mdp_kms, uint32_t irqmask);
void mdp_irq_register(struct mdp_kms *mdp_kms, struct mdp_irq *irq);
void mdp_irq_unregister(struct mdp_kms *mdp_kms, struct mdp_irq *irq);
void mdp_irq_update(struct mdp_kms *mdp_kms);

/*
 * pixel format helpers:
 */

/* MDP capabilities */
#define MDP_CAP_SMP
#define MDP_CAP_DSC
#define MDP_CAP_CDM
#define MDP_CAP_SRC_SPLIT

/* MDP pipe capabilities */
#define MDP_PIPE_CAP_HFLIP
#define MDP_PIPE_CAP_VFLIP
#define MDP_PIPE_CAP_SCALE
#define MDP_PIPE_CAP_CSC
#define MDP_PIPE_CAP_DECIMATION
#define MDP_PIPE_CAP_SW_PIX_EXT
#define MDP_PIPE_CAP_CURSOR

/* MDP layer mixer caps */
#define MDP_LM_CAP_DISPLAY
#define MDP_LM_CAP_WB
#define MDP_LM_CAP_PAIR

static inline bool pipe_supports_yuv(uint32_t pipe_caps)
{}

enum csc_type {};

struct csc_cfg {};

struct csc_cfg *mdp_get_default_csc_cfg(enum csc_type);

#endif /* __MDP_KMS_H__ */