|
@@ -121,9 +121,10 @@ static int mgag200fb_create_object(struct mga_fbdev *afbdev,
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
-static int mgag200fb_create(struct mga_fbdev *mfbdev,
|
|
|
|
|
|
+static int mgag200fb_create(struct drm_fb_helper *helper,
|
|
struct drm_fb_helper_surface_size *sizes)
|
|
struct drm_fb_helper_surface_size *sizes)
|
|
{
|
|
{
|
|
|
|
+ struct mga_fbdev *mfbdev = (struct mga_fbdev *)helper;
|
|
struct drm_device *dev = mfbdev->helper.dev;
|
|
struct drm_device *dev = mfbdev->helper.dev;
|
|
struct drm_mode_fb_cmd2 mode_cmd;
|
|
struct drm_mode_fb_cmd2 mode_cmd;
|
|
struct mga_device *mdev = dev->dev_private;
|
|
struct mga_device *mdev = dev->dev_private;
|
|
@@ -210,23 +211,6 @@ out:
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
-static int mga_fb_find_or_create_single(struct drm_fb_helper *helper,
|
|
|
|
- struct drm_fb_helper_surface_size
|
|
|
|
- *sizes)
|
|
|
|
-{
|
|
|
|
- struct mga_fbdev *mfbdev = (struct mga_fbdev *)helper;
|
|
|
|
- int new_fb = 0;
|
|
|
|
- int ret;
|
|
|
|
-
|
|
|
|
- if (!helper->fb) {
|
|
|
|
- ret = mgag200fb_create(mfbdev, sizes);
|
|
|
|
- if (ret)
|
|
|
|
- return ret;
|
|
|
|
- new_fb = 1;
|
|
|
|
- }
|
|
|
|
- return new_fb;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
static int mga_fbdev_destroy(struct drm_device *dev,
|
|
static int mga_fbdev_destroy(struct drm_device *dev,
|
|
struct mga_fbdev *mfbdev)
|
|
struct mga_fbdev *mfbdev)
|
|
{
|
|
{
|
|
@@ -257,7 +241,7 @@ static int mga_fbdev_destroy(struct drm_device *dev,
|
|
static struct drm_fb_helper_funcs mga_fb_helper_funcs = {
|
|
static struct drm_fb_helper_funcs mga_fb_helper_funcs = {
|
|
.gamma_set = mga_crtc_fb_gamma_set,
|
|
.gamma_set = mga_crtc_fb_gamma_set,
|
|
.gamma_get = mga_crtc_fb_gamma_get,
|
|
.gamma_get = mga_crtc_fb_gamma_get,
|
|
- .fb_probe = mga_fb_find_or_create_single,
|
|
|
|
|
|
+ .fb_probe = mgag200fb_create,
|
|
};
|
|
};
|
|
|
|
|
|
int mgag200_fbdev_init(struct mga_device *mdev)
|
|
int mgag200_fbdev_init(struct mga_device *mdev)
|