linux/drivers/gpu/drm/gud/gud_pipe.c

// SPDX-License-Identifier: MIT
/*
 * Copyright 2020 Noralf Trønnes
 */

#include <linux/lz4.h>
#include <linux/usb.h>
#include <linux/vmalloc.h>
#include <linux/workqueue.h>

#include <drm/drm_atomic.h>
#include <drm/drm_connector.h>
#include <drm/drm_damage_helper.h>
#include <drm/drm_drv.h>
#include <drm/drm_format_helper.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_gem.h>
#include <drm/drm_gem_atomic_helper.h>
#include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_print.h>
#include <drm/drm_rect.h>
#include <drm/drm_simple_kms_helper.h>
#include <drm/gud.h>

#include "gud_internal.h"

/*
 * Some userspace rendering loops run all displays in the same loop.
 * This means that a fast display will have to wait for a slow one.
 * Such users might want to enable this module parameter.
 */
static bool gud_async_flush;
module_param_named(async_flush, gud_async_flush, bool, 0644);
MODULE_PARM_DESC();

/*
 * FIXME: The driver is probably broken on Big Endian machines.
 * See discussion:
 * https://lore.kernel.org/dri-devel/CAKb7UvihLX0hgBOP3VBG7O+atwZcUVCPVuBdfmDMpg0NjXe-cQ@mail.gmail.com/
 */

static bool gud_is_big_endian(void)
{}

static size_t gud_xrgb8888_to_r124(u8 *dst, const struct drm_format_info *format,
				   void *src, struct drm_framebuffer *fb,
				   struct drm_rect *rect,
				   struct drm_format_conv_state *fmtcnv_state)
{}

static size_t gud_xrgb8888_to_color(u8 *dst, const struct drm_format_info *format,
				    void *src, struct drm_framebuffer *fb,
				    struct drm_rect *rect)
{}

static int gud_prep_flush(struct gud_device *gdrm, struct drm_framebuffer *fb,
			  const struct iosys_map *src, bool cached_reads,
			  const struct drm_format_info *format, struct drm_rect *rect,
			  struct gud_set_buffer_req *req,
			  struct drm_format_conv_state *fmtcnv_state)
{}

struct gud_usb_bulk_context {};

static void gud_usb_bulk_timeout(struct timer_list *t)
{}

static int gud_usb_bulk(struct gud_device *gdrm, size_t len)
{}

static int gud_flush_rect(struct gud_device *gdrm, struct drm_framebuffer *fb,
			  const struct iosys_map *src, bool cached_reads,
			  const struct drm_format_info *format, struct drm_rect *rect,
			  struct drm_format_conv_state *fmtcnv_state)
{}

void gud_clear_damage(struct gud_device *gdrm)
{}

static void gud_flush_damage(struct gud_device *gdrm, struct drm_framebuffer *fb,
			     const struct iosys_map *src, bool cached_reads,
			     struct drm_rect *damage)
{}

void gud_flush_work(struct work_struct *work)
{}

static int gud_fb_queue_damage(struct gud_device *gdrm, struct drm_framebuffer *fb,
			       const struct iosys_map *src, struct drm_rect *damage)
{}

static void gud_fb_handle_damage(struct gud_device *gdrm, struct drm_framebuffer *fb,
				 const struct iosys_map *src, struct drm_rect *damage)
{}

int gud_pipe_check(struct drm_simple_display_pipe *pipe,
		   struct drm_plane_state *new_plane_state,
		   struct drm_crtc_state *new_crtc_state)
{}

void gud_pipe_update(struct drm_simple_display_pipe *pipe,
		     struct drm_plane_state *old_state)
{}