40b4db43f7
Drop the deprecated drmP.h header file. Made the header file selfcontained, and dropped unused header files. Fixed fallout in remaining files. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Acked-by: Emil Velikov <emil.velikov@collabora.com> Cc: Xinliang Liu <z.liuxinliang@hisilicon.com> Cc: Rongrong Zou <zourongrong@gmail.com> Cc: Xinwei Kong <kong.kongxinwei@hisilicon.com> Cc: Chen Feng <puck.chen@hisilicon.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Thomas Zimmermann <tzimmermann@suse.de> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Allison Randal <allison@lohutok.net> Cc: Harry Wentland <harry.wentland@amd.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Souptick Joarder <jrdr.linux@gmail.com> Cc: John Garry <john.garry@huawei.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: "Christian König" <christian.koenig@amd.com> Cc: Junwei Zhang <Jerry.Zhang@amd.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: CK Hu <ck.hu@mediatek.com> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Jani Nikula <jani.nikula@intel.com> Cc: Eric Anholt <eric@anholt.net> Cc: "Noralf Trønnes" <noralf@tronnes.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190630061922.7254-34-sam@ravnborg.org
77 lines
1.9 KiB
C
77 lines
1.9 KiB
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/* Hisilicon Hibmc SoC drm driver
|
|
*
|
|
* Based on the bochs drm driver.
|
|
*
|
|
* Copyright (c) 2016 Huawei Limited.
|
|
*
|
|
* Author:
|
|
* Rongrong Zou <zourongrong@huawei.com>
|
|
* Rongrong Zou <zourongrong@gmail.com>
|
|
* Jianhua Li <lijianhua@huawei.com>
|
|
*/
|
|
|
|
#ifndef HIBMC_DRM_DRV_H
|
|
#define HIBMC_DRM_DRV_H
|
|
|
|
#include <drm/drm_fb_helper.h>
|
|
#include <drm/drm_framebuffer.h>
|
|
|
|
struct drm_device;
|
|
struct drm_gem_object;
|
|
|
|
struct hibmc_framebuffer {
|
|
struct drm_framebuffer fb;
|
|
struct drm_gem_object *obj;
|
|
};
|
|
|
|
struct hibmc_fbdev {
|
|
struct drm_fb_helper helper; /* must be first */
|
|
struct hibmc_framebuffer *fb;
|
|
int size;
|
|
};
|
|
|
|
struct hibmc_drm_private {
|
|
/* hw */
|
|
void __iomem *mmio;
|
|
void __iomem *fb_map;
|
|
unsigned long fb_base;
|
|
unsigned long fb_size;
|
|
bool msi_enabled;
|
|
|
|
/* drm */
|
|
struct drm_device *dev;
|
|
bool mode_config_initialized;
|
|
|
|
/* fbdev */
|
|
struct hibmc_fbdev *fbdev;
|
|
};
|
|
|
|
#define to_hibmc_framebuffer(x) container_of(x, struct hibmc_framebuffer, fb)
|
|
|
|
void hibmc_set_power_mode(struct hibmc_drm_private *priv,
|
|
unsigned int power_mode);
|
|
void hibmc_set_current_gate(struct hibmc_drm_private *priv,
|
|
unsigned int gate);
|
|
|
|
int hibmc_de_init(struct hibmc_drm_private *priv);
|
|
int hibmc_vdac_init(struct hibmc_drm_private *priv);
|
|
int hibmc_fbdev_init(struct hibmc_drm_private *priv);
|
|
void hibmc_fbdev_fini(struct hibmc_drm_private *priv);
|
|
|
|
int hibmc_gem_create(struct drm_device *dev, u32 size, bool iskernel,
|
|
struct drm_gem_object **obj);
|
|
struct hibmc_framebuffer *
|
|
hibmc_framebuffer_init(struct drm_device *dev,
|
|
const struct drm_mode_fb_cmd2 *mode_cmd,
|
|
struct drm_gem_object *obj);
|
|
|
|
int hibmc_mm_init(struct hibmc_drm_private *hibmc);
|
|
void hibmc_mm_fini(struct hibmc_drm_private *hibmc);
|
|
int hibmc_dumb_create(struct drm_file *file, struct drm_device *dev,
|
|
struct drm_mode_create_dumb *args);
|
|
|
|
extern const struct drm_mode_config_funcs hibmc_mode_funcs;
|
|
|
|
#endif
|