linux/drivers/gpu/drm/panel/panel-novatek-nt35950.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Novatek NT35950 DriverIC panels driver
 *
 * Copyright (c) 2021 AngeloGioacchino Del Regno
 *                    <[email protected]>
 */
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_graph.h>
#include <linux/regulator/consumer.h>

#include <drm/drm_connector.h>
#include <drm/drm_crtc.h>
#include <drm/drm_mipi_dsi.h>
#include <drm/drm_modes.h>
#include <drm/drm_panel.h>

#define MCS_CMD_MAUCCTR
#define MCS_PARAM_SCALER_FUNCTION
#define MCS_PARAM_SCALEUP_MODE
 #define MCS_SCALEUP_SIMPLE
 #define MCS_SCALEUP_BILINEAR
 #define MCS_SCALEUP_DUPLICATE

/* VESA Display Stream Compression param */
#define MCS_PARAM_VESA_DSC_ON

/* Data Compression mode */
#define MCS_PARAM_DATA_COMPRESSION
 #define MCS_DATA_COMPRESSION_NONE
 #define MCS_DATA_COMPRESSION_FBC
 #define MCS_DATA_COMPRESSION_DSC

/* Display Output control */
#define MCS_PARAM_DISP_OUTPUT_CTRL
 #define MCS_DISP_OUT_SRAM_EN
 #define MCS_DISP_OUT_VIDEO_MODE

/* VESA Display Stream Compression setting */
#define MCS_PARAM_VESA_DSC_SETTING

/* SubPixel Rendering (SPR) */
#define MCS_PARAM_SPR_EN
#define MCS_PARAM_SPR_MODE
 #define MCS_SPR_MODE_YYG_RAINBOW_RGB

#define NT35950_VREG_MAX

struct nt35950 {};

struct nt35950_panel_mode {};

struct nt35950_panel_desc {};

static inline struct nt35950 *to_nt35950(struct drm_panel *panel)
{}

static void nt35950_reset(struct nt35950 *nt)
{}

/*
 * nt35950_set_cmd2_page - Select manufacturer control (CMD2) page
 * @dsi_ctx: context for mipi_dsi functions
 * @nt:   Main driver structure
 * @page: Page number (0-7)
 */
static void nt35950_set_cmd2_page(struct mipi_dsi_multi_context *dsi_ctx,
				  struct nt35950 *nt, u8 page)
{}

/*
 * nt35950_set_data_compression - Set data compression mode
 * @dsi_ctx: context for mipi_dsi functions
 * @nt:        Main driver structure
 * @comp_mode: Compression mode
 */
static void nt35950_set_data_compression(struct mipi_dsi_multi_context *dsi_ctx,
					 struct nt35950 *nt, u8 comp_mode)
{}

/*
 * nt35950_set_scaler - Enable/disable resolution upscaling
 * @dsi_ctx: context for mipi_dsi functions
 * @scale_up:  Scale up function control
 */
static void nt35950_set_scaler(struct mipi_dsi_multi_context *dsi_ctx,
			       u8 scale_up)
{}

/*
 * nt35950_set_scale_mode - Resolution upscaling mode
 * @dsi_ctx: context for mipi_dsi functions
 * @mode: Scaler mode (MCS_DATA_COMPRESSION_*)
 */
static void nt35950_set_scale_mode(struct mipi_dsi_multi_context *dsi_ctx,
				   u8 mode)
{}

/*
 * nt35950_inject_black_image - Display a completely black image
 * @dsi_ctx: context for mipi_dsi functions
 *
 * After IC setup, the attached panel may show random data
 * due to driveric behavior changes (resolution, compression,
 * scaling, etc). This function, called after parameters setup,
 * makes the driver ic to output a completely black image to
 * the display.
 * It makes sense to push a black image before sending the sleep-out
 * and display-on commands.
 */
static void nt35950_inject_black_image(struct mipi_dsi_multi_context *dsi_ctx)
{}

/*
 * nt35950_set_dispout - Set Display Output register parameters
 * @nt:    Main driver structure
 * @dsi_ctx: context for mipi_dsi functions
 */
static void nt35950_set_dispout(struct mipi_dsi_multi_context *dsi_ctx,
				struct nt35950 *nt)
{}

static int nt35950_get_current_mode(struct nt35950 *nt)
{}

static int nt35950_on(struct nt35950 *nt)
{}

static void nt35950_off(struct nt35950 *nt)
{}

static int nt35950_sharp_init_vregs(struct nt35950 *nt, struct device *dev)
{}

static int nt35950_prepare(struct drm_panel *panel)
{}

static int nt35950_unprepare(struct drm_panel *panel)
{}

static int nt35950_get_modes(struct drm_panel *panel,
			     struct drm_connector *connector)
{}

static const struct drm_panel_funcs nt35950_panel_funcs =;

static int nt35950_probe(struct mipi_dsi_device *dsi)
{}

static void nt35950_remove(struct mipi_dsi_device *dsi)
{}

static const struct nt35950_panel_mode sharp_ls055d1sx04_modes[] =;

static const struct nt35950_panel_desc sharp_ls055d1sx04 =;

static const struct of_device_id nt35950_of_match[] =;
MODULE_DEVICE_TABLE(of, nt35950_of_match);

static struct mipi_dsi_driver nt35950_driver =;
module_mipi_dsi_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();