mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 20:53:53 +08:00
drm/armada: move armada_drm_mode_config_funcs to armada_drv.c
Move the armada_drm_mode_config_funcs to armada_drv.c, since this now has less to do with FBs than it does with general mode configuration. In doing so, we need to make armada_fb_create() visible to armada_drv.c, which reveals a function name clash with armada_fbdev.c. Rename the version in armada_fbdev.c. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
This commit is contained in:
parent
c29277d4e5
commit
3382a6b999
@ -79,8 +79,6 @@ void __armada_drm_queue_unref_work(struct drm_device *,
|
|||||||
void armada_drm_queue_unref_work(struct drm_device *,
|
void armada_drm_queue_unref_work(struct drm_device *,
|
||||||
struct drm_framebuffer *);
|
struct drm_framebuffer *);
|
||||||
|
|
||||||
extern const struct drm_mode_config_funcs armada_drm_mode_config_funcs;
|
|
||||||
|
|
||||||
int armada_fbdev_init(struct drm_device *);
|
int armada_fbdev_init(struct drm_device *);
|
||||||
void armada_fbdev_fini(struct drm_device *);
|
void armada_fbdev_fini(struct drm_device *);
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#include "armada_crtc.h"
|
#include "armada_crtc.h"
|
||||||
#include "armada_drm.h"
|
#include "armada_drm.h"
|
||||||
#include "armada_gem.h"
|
#include "armada_gem.h"
|
||||||
|
#include "armada_fb.h"
|
||||||
#include "armada_hw.h"
|
#include "armada_hw.h"
|
||||||
#include <drm/armada_drm.h>
|
#include <drm/armada_drm.h>
|
||||||
#include "armada_ioctlP.h"
|
#include "armada_ioctlP.h"
|
||||||
@ -77,6 +78,11 @@ static struct drm_driver armada_drm_driver = {
|
|||||||
.fops = &armada_drm_fops,
|
.fops = &armada_drm_fops,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct drm_mode_config_funcs armada_drm_mode_config_funcs = {
|
||||||
|
.fb_create = armada_fb_create,
|
||||||
|
.output_poll_changed = drm_fb_helper_output_poll_changed,
|
||||||
|
};
|
||||||
|
|
||||||
static int armada_drm_bind(struct device *dev)
|
static int armada_drm_bind(struct device *dev)
|
||||||
{
|
{
|
||||||
struct armada_private *priv;
|
struct armada_private *priv;
|
||||||
|
@ -84,7 +84,7 @@ struct armada_framebuffer *armada_framebuffer_create(struct drm_device *dev,
|
|||||||
return dfb;
|
return dfb;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct drm_framebuffer *armada_fb_create(struct drm_device *dev,
|
struct drm_framebuffer *armada_fb_create(struct drm_device *dev,
|
||||||
struct drm_file *dfile, const struct drm_mode_fb_cmd2 *mode)
|
struct drm_file *dfile, const struct drm_mode_fb_cmd2 *mode)
|
||||||
{
|
{
|
||||||
struct armada_gem_object *obj;
|
struct armada_gem_object *obj;
|
||||||
@ -138,8 +138,3 @@ static struct drm_framebuffer *armada_fb_create(struct drm_device *dev,
|
|||||||
DRM_ERROR("failed to initialize framebuffer: %d\n", ret);
|
DRM_ERROR("failed to initialize framebuffer: %d\n", ret);
|
||||||
return ERR_PTR(ret);
|
return ERR_PTR(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct drm_mode_config_funcs armada_drm_mode_config_funcs = {
|
|
||||||
.fb_create = armada_fb_create,
|
|
||||||
.output_poll_changed = drm_fb_helper_output_poll_changed,
|
|
||||||
};
|
|
||||||
|
@ -19,5 +19,6 @@ struct armada_framebuffer {
|
|||||||
|
|
||||||
struct armada_framebuffer *armada_framebuffer_create(struct drm_device *,
|
struct armada_framebuffer *armada_framebuffer_create(struct drm_device *,
|
||||||
const struct drm_mode_fb_cmd2 *, struct armada_gem_object *);
|
const struct drm_mode_fb_cmd2 *, struct armada_gem_object *);
|
||||||
|
struct drm_framebuffer *armada_fb_create(struct drm_device *dev,
|
||||||
|
struct drm_file *dfile, const struct drm_mode_fb_cmd2 *mode);
|
||||||
#endif
|
#endif
|
||||||
|
@ -24,7 +24,7 @@ static /*const*/ struct fb_ops armada_fb_ops = {
|
|||||||
.fb_imageblit = drm_fb_helper_cfb_imageblit,
|
.fb_imageblit = drm_fb_helper_cfb_imageblit,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int armada_fb_create(struct drm_fb_helper *fbh,
|
static int armada_fbdev_create(struct drm_fb_helper *fbh,
|
||||||
struct drm_fb_helper_surface_size *sizes)
|
struct drm_fb_helper_surface_size *sizes)
|
||||||
{
|
{
|
||||||
struct drm_device *dev = fbh->dev;
|
struct drm_device *dev = fbh->dev;
|
||||||
@ -108,7 +108,7 @@ static int armada_fb_probe(struct drm_fb_helper *fbh,
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if (!fbh->fb) {
|
if (!fbh->fb) {
|
||||||
ret = armada_fb_create(fbh, sizes);
|
ret = armada_fbdev_create(fbh, sizes);
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
ret = 1;
|
ret = 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user