#include <linux/delay.h>
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_gem_atomic_helper.h>
#include "lsdc_drv.h"
#include "lsdc_regs.h"
#include "lsdc_ttm.h"
static const u32 lsdc_primary_formats[] = …;
static const u32 lsdc_cursor_formats[] = …;
static const u64 lsdc_fb_format_modifiers[] = …;
static unsigned int lsdc_get_fb_offset(struct drm_framebuffer *fb,
struct drm_plane_state *state)
{ … }
static u64 lsdc_fb_base_addr(struct drm_framebuffer *fb)
{ … }
static int lsdc_primary_atomic_check(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static void lsdc_primary_atomic_update(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static void lsdc_primary_atomic_disable(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static int lsdc_plane_prepare_fb(struct drm_plane *plane,
struct drm_plane_state *new_state)
{ … }
static void lsdc_plane_cleanup_fb(struct drm_plane *plane,
struct drm_plane_state *old_state)
{ … }
static const struct drm_plane_helper_funcs lsdc_primary_helper_funcs = …;
static int lsdc_cursor_plane_atomic_async_check(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static void lsdc_cursor_plane_atomic_async_update(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static int ls7a1000_cursor_plane_atomic_check(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static void ls7a1000_cursor_plane_atomic_update(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static void ls7a1000_cursor_plane_atomic_disable(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static const struct drm_plane_helper_funcs ls7a1000_cursor_plane_helper_funcs = …;
static int ls7a2000_cursor_plane_atomic_check(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static void ls7a2000_cursor_plane_atomic_update(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static void ls7a2000_cursor_plane_atomic_disable(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static const struct drm_plane_helper_funcs ls7a2000_cursor_plane_helper_funcs = …;
static void lsdc_plane_atomic_print_state(struct drm_printer *p,
const struct drm_plane_state *state)
{ … }
static const struct drm_plane_funcs lsdc_plane_funcs = …;
static void lsdc_primary0_update_fb_addr(struct lsdc_primary *primary, u64 addr)
{ … }
static void lsdc_primary0_update_fb_stride(struct lsdc_primary *primary, u32 stride)
{ … }
static void lsdc_primary0_update_fb_format(struct lsdc_primary *primary,
const struct drm_format_info *format)
{ … }
static void lsdc_primary1_update_fb_addr(struct lsdc_primary *primary, u64 addr)
{ … }
static void lsdc_primary1_update_fb_stride(struct lsdc_primary *primary, u32 stride)
{ … }
static void lsdc_primary1_update_fb_format(struct lsdc_primary *primary,
const struct drm_format_info *format)
{ … }
static const struct lsdc_primary_plane_ops lsdc_primary_plane_hw_ops[2] = …;
static void lsdc_cursor0_update_bo_addr(struct lsdc_cursor *cursor, u64 addr)
{ … }
static void lsdc_cursor0_update_position(struct lsdc_cursor *cursor, int x, int y)
{ … }
static void lsdc_cursor0_update_cfg(struct lsdc_cursor *cursor,
enum lsdc_cursor_size cursor_size,
enum lsdc_cursor_format fmt)
{ … }
static void lsdc_cursor1_update_bo_addr(struct lsdc_cursor *cursor, u64 addr)
{ … }
static void lsdc_cursor1_update_position(struct lsdc_cursor *cursor, int x, int y)
{ … }
static void lsdc_cursor1_update_cfg(struct lsdc_cursor *cursor,
enum lsdc_cursor_size cursor_size,
enum lsdc_cursor_format fmt)
{ … }
static const struct lsdc_cursor_plane_ops ls7a2000_cursor_hw_ops[2] = …;
static void lsdc_cursor1_update_bo_addr_quirk(struct lsdc_cursor *cursor, u64 addr)
{ … }
static void lsdc_cursor1_update_position_quirk(struct lsdc_cursor *cursor, int x, int y)
{ … }
static void lsdc_cursor1_update_cfg_quirk(struct lsdc_cursor *cursor,
enum lsdc_cursor_size cursor_size,
enum lsdc_cursor_format fmt)
{ … }
static const struct lsdc_cursor_plane_ops ls7a1000_cursor_hw_ops[2] = …;
int lsdc_primary_plane_init(struct drm_device *ddev,
struct drm_plane *plane,
unsigned int index)
{ … }
int ls7a1000_cursor_plane_init(struct drm_device *ddev,
struct drm_plane *plane,
unsigned int index)
{ … }
int ls7a2000_cursor_plane_init(struct drm_device *ddev,
struct drm_plane *plane,
unsigned int index)
{ … }