summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/mgag200/mgag200_drv.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/mgag200/mgag200_drv.h')
-rw-r--r--drivers/gpu/drm/mgag200/mgag200_drv.h46
1 files changed, 17 insertions, 29 deletions
diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.h b/drivers/gpu/drm/mgag200/mgag200_drv.h
index 58a0e62eaf18..7f7dfbd0f013 100644
--- a/drivers/gpu/drm/mgag200/mgag200_drv.h
+++ b/drivers/gpu/drm/mgag200/mgag200_drv.h
@@ -10,9 +10,6 @@
#ifndef __MGAG200_DRV_H__
#define __MGAG200_DRV_H__
-#include <linux/i2c-algo-bit.h>
-#include <linux/i2c.h>
-
#include <video/vga.h>
#include <drm/drm_connector.h>
@@ -189,11 +186,9 @@ static inline struct mgag200_crtc_state *to_mgag200_crtc_state(struct drm_crtc_s
return container_of(base, struct mgag200_crtc_state, base);
}
-struct mga_i2c_chan {
- struct i2c_adapter adapter;
- struct drm_device *dev;
- struct i2c_algo_bit_data bit;
- int data, clock;
+struct mgag200_bmc_connector {
+ struct drm_connector base;
+ struct drm_connector *physical_connector;
};
enum mga_type {
@@ -293,9 +288,16 @@ struct mga_device {
struct drm_plane primary_plane;
struct drm_crtc crtc;
- struct drm_encoder encoder;
- struct mga_i2c_chan i2c;
- struct drm_connector connector;
+ struct {
+ struct {
+ struct drm_encoder encoder;
+ struct drm_connector connector;
+ } vga;
+ struct {
+ struct drm_encoder encoder;
+ struct mgag200_bmc_connector bmc_connector;
+ } bmc;
+ } output;
};
static inline struct mga_device *to_mga_device(struct drm_device *dev)
@@ -428,32 +430,18 @@ void mgag200_crtc_atomic_destroy_state(struct drm_crtc *crtc, struct drm_crtc_st
.atomic_duplicate_state = mgag200_crtc_atomic_duplicate_state, \
.atomic_destroy_state = mgag200_crtc_atomic_destroy_state
-#define MGAG200_DAC_ENCODER_FUNCS \
- .destroy = drm_encoder_cleanup
-
-int mgag200_vga_connector_helper_get_modes(struct drm_connector *connector);
-
-#define MGAG200_VGA_CONNECTOR_HELPER_FUNCS \
- .get_modes = mgag200_vga_connector_helper_get_modes
-
-#define MGAG200_VGA_CONNECTOR_FUNCS \
- .reset = drm_atomic_helper_connector_reset, \
- .fill_modes = drm_helper_probe_single_connector_modes, \
- .destroy = drm_connector_cleanup, \
- .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, \
- .atomic_destroy_state = drm_atomic_helper_connector_destroy_state
-
void mgag200_set_mode_regs(struct mga_device *mdev, const struct drm_display_mode *mode);
void mgag200_set_format_regs(struct mga_device *mdev, const struct drm_format_info *format);
void mgag200_enable_display(struct mga_device *mdev);
void mgag200_init_registers(struct mga_device *mdev);
int mgag200_mode_config_init(struct mga_device *mdev, resource_size_t vram_available);
+/* mgag200_vga.c */
+int mgag200_vga_output_init(struct mga_device *mdev);
+
/* mgag200_bmc.c */
void mgag200_bmc_disable_vidrst(struct mga_device *mdev);
void mgag200_bmc_enable_vidrst(struct mga_device *mdev);
-
- /* mgag200_i2c.c */
-int mgag200_i2c_init(struct mga_device *mdev, struct mga_i2c_chan *i2c);
+int mgag200_bmc_output_init(struct mga_device *mdev, struct drm_connector *physical_connector);
#endif /* __MGAG200_DRV_H__ */