linux/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c

// SPDX-License-Identifier: GPL-2.0 OR MIT
/**************************************************************************
 *
 * Copyright (c) 2009-2024 Broadcom. All Rights Reserved. The term
 * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sub license, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice (including the
 * next paragraph) shall be included in all copies or substantial portions
 * of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
 * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
 * USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 **************************************************************************/

#include "vmwgfx_bo.h"
#include "vmwgfx_kms.h"
#include "vmwgfx_vkms.h"

#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_fourcc.h>


#define vmw_crtc_to_ldu(x)
#define vmw_encoder_to_ldu(x)
#define vmw_connector_to_ldu(x)

struct vmw_legacy_display {};

/*
 * Display unit using the legacy register interface.
 */
struct vmw_legacy_display_unit {};

static void vmw_ldu_destroy(struct vmw_legacy_display_unit *ldu)
{}


/*
 * Legacy Display Unit CRTC functions
 */

static void vmw_ldu_crtc_destroy(struct drm_crtc *crtc)
{}

static int vmw_ldu_commit_list(struct vmw_private *dev_priv)
{}

/*
 * Pin the buffer in a location suitable for access by the
 * display system.
 */
static int vmw_ldu_fb_pin(struct vmw_framebuffer *vfb)
{}

static int vmw_ldu_fb_unpin(struct vmw_framebuffer *vfb)
{}

static int vmw_ldu_del_active(struct vmw_private *vmw_priv,
			      struct vmw_legacy_display_unit *ldu)
{}

static int vmw_ldu_add_active(struct vmw_private *vmw_priv,
			      struct vmw_legacy_display_unit *ldu,
			      struct vmw_framebuffer *vfb)
{}

/**
 * vmw_ldu_crtc_mode_set_nofb - Enable svga
 *
 * @crtc: CRTC associated with the new screen
 *
 * For LDU, just enable the svga
 */
static void vmw_ldu_crtc_mode_set_nofb(struct drm_crtc *crtc)
{}

static const struct drm_crtc_funcs vmw_legacy_crtc_funcs =;


/*
 * Legacy Display Unit encoder functions
 */

static void vmw_ldu_encoder_destroy(struct drm_encoder *encoder)
{}

static const struct drm_encoder_funcs vmw_legacy_encoder_funcs =;

/*
 * Legacy Display Unit connector functions
 */

static void vmw_ldu_connector_destroy(struct drm_connector *connector)
{}

static const struct drm_connector_funcs vmw_legacy_connector_funcs =;

static const struct
drm_connector_helper_funcs vmw_ldu_connector_helper_funcs =;

static int vmw_kms_ldu_do_bo_dirty(struct vmw_private *dev_priv,
				   struct vmw_framebuffer *framebuffer,
				   unsigned int flags, unsigned int color,
				   struct drm_mode_rect *clips,
				   unsigned int num_clips);

/*
 * Legacy Display Plane Functions
 */

static void
vmw_ldu_primary_plane_atomic_update(struct drm_plane *plane,
				    struct drm_atomic_state *state)
{}

static const struct drm_plane_funcs vmw_ldu_plane_funcs =;

static const struct drm_plane_funcs vmw_ldu_cursor_funcs =;

/*
 * Atomic Helpers
 */
static const struct
drm_plane_helper_funcs vmw_ldu_cursor_plane_helper_funcs =;

static const struct
drm_plane_helper_funcs vmw_ldu_primary_plane_helper_funcs =;

static const struct drm_crtc_helper_funcs vmw_ldu_crtc_helper_funcs =;


static int vmw_ldu_init(struct vmw_private *dev_priv, unsigned unit)
{}

int vmw_kms_ldu_init_display(struct vmw_private *dev_priv)
{}

int vmw_kms_ldu_close_display(struct vmw_private *dev_priv)
{}


static int vmw_kms_ldu_do_bo_dirty(struct vmw_private *dev_priv,
				   struct vmw_framebuffer *framebuffer,
				   unsigned int flags, unsigned int color,
				   struct drm_mode_rect *clips,
				   unsigned int num_clips)
{}