mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-23 19:14:30 +08:00
54ac836b16
Since commit 987d65d013
(drm: debugfs: make
drm_debugfs_create_files() never fail), drm_debugfs_create_files() never
fails, and should return void. This change therefore removes it uses as
a return value in various functions across drm/sti.
With these changes, the affected functions have been changed to use a void
return value.
v2: convert sti_mixer_debugfs_init() and sti_compositor_debugfs_init()
to return void too. Also have sti_drm_dbg_init() to return 0 to avoid
build issues.
References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200310133121.27913-10-wambui.karugax@gmail.com
70 lines
1.6 KiB
C
70 lines
1.6 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (C) STMicroelectronics SA 2014
|
|
* Authors: Benjamin Gaignard <benjamin.gaignard@st.com>
|
|
* Fabien Dessenne <fabien.dessenne@st.com>
|
|
* for STMicroelectronics.
|
|
*/
|
|
|
|
#ifndef _STI_MIXER_H_
|
|
#define _STI_MIXER_H_
|
|
|
|
#include <drm/drm_crtc.h>
|
|
|
|
#include <drm/drm_debugfs.h>
|
|
#include <drm/drm_file.h>
|
|
|
|
#include "sti_plane.h"
|
|
|
|
struct device;
|
|
|
|
#define to_sti_mixer(x) container_of(x, struct sti_mixer, drm_crtc)
|
|
|
|
enum sti_mixer_status {
|
|
STI_MIXER_READY,
|
|
STI_MIXER_DISABLING,
|
|
STI_MIXER_DISABLED,
|
|
};
|
|
|
|
/**
|
|
* STI Mixer subdevice structure
|
|
*
|
|
* @dev: driver device
|
|
* @regs: mixer registers
|
|
* @id: id of the mixer
|
|
* @drm_crtc: crtc object link to the mixer
|
|
* @status: to know the status of the mixer
|
|
*/
|
|
struct sti_mixer {
|
|
struct device *dev;
|
|
void __iomem *regs;
|
|
int id;
|
|
struct drm_crtc drm_crtc;
|
|
enum sti_mixer_status status;
|
|
};
|
|
|
|
const char *sti_mixer_to_str(struct sti_mixer *mixer);
|
|
|
|
struct sti_mixer *sti_mixer_create(struct device *dev,
|
|
struct drm_device *drm_dev,
|
|
int id,
|
|
void __iomem *baseaddr);
|
|
|
|
int sti_mixer_set_plane_status(struct sti_mixer *mixer,
|
|
struct sti_plane *plane, bool status);
|
|
int sti_mixer_set_plane_depth(struct sti_mixer *mixer, struct sti_plane *plane);
|
|
int sti_mixer_active_video_area(struct sti_mixer *mixer,
|
|
struct drm_display_mode *mode);
|
|
|
|
void sti_mixer_set_background_status(struct sti_mixer *mixer, bool enable);
|
|
|
|
void sti_mixer_debugfs_init(struct sti_mixer *mixer, struct drm_minor *minor);
|
|
|
|
/* depth in Cross-bar control = z order */
|
|
#define GAM_MIXER_NB_DEPTH_LEVEL 6
|
|
|
|
#define STI_MIXER_MAIN 0
|
|
#define STI_MIXER_AUX 1
|
|
|
|
#endif
|