#include "sun4i_backend.h"
#include "sun4i_crtc.h"
#include "sun4i_drv.h"
+#include "sun4i_layer.h"
#include "sun4i_tcon.h"
static void sun4i_crtc_atomic_begin(struct drm_crtc *crtc,
return ERR_PTR(-ENOMEM);
scrtc->drv = drv;
+ /* Create our layers */
+ scrtc->layers = sun4i_layers_init(drm);
+ if (IS_ERR(scrtc->layers)) {
+ dev_err(drm->dev, "Couldn't create the planes\n");
+ return ERR_CAST(scrtc->layers);
+ }
+
ret = drm_crtc_init_with_planes(drm, &scrtc->crtc,
drv->primary,
NULL,
struct drm_pending_vblank_event *event;
struct sun4i_drv *drv;
+ struct sun4i_layer **layers;
};
static inline struct sun4i_crtc *drm_crtc_to_sun4i_crtc(struct drm_crtc *crtc)
#include "sun4i_crtc.h"
#include "sun4i_drv.h"
#include "sun4i_framebuffer.h"
-#include "sun4i_layer.h"
+#include "sun4i_tcon.h"
static const struct file_operations sun4i_drv_fops = {
.owner = THIS_MODULE,
goto cleanup_mode_config;
}
- /* Create our layers */
- drv->layers = sun4i_layers_init(drm);
- if (IS_ERR(drv->layers)) {
- dev_err(drm->dev, "Couldn't create the planes\n");
- ret = PTR_ERR(drv->layers);
- goto cleanup_mode_config;
- }
-
/* Create our CRTC */
drv->crtc = sun4i_crtc_init(drm);
if (IS_ERR(drv->crtc)) {
struct drm_plane *primary;
struct drm_fbdev_cma *fbdev;
-
- struct sun4i_layer **layers;
};
#endif /* _SUN4I_DRV_H_ */