gpu: host1x: drm: Rename host1x to host1x_drm
Both host1x and drm drivers have host1x structures. This patch renames the host1x structure under drm to follow name host1x_drm. Signed-off-by: Arto Merilainen <amerilainen@nvidia.com> Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
This commit is contained in:
parent
4231c6b01a
commit
c89c0ea63f
@ -1097,7 +1097,7 @@ static const struct host1x_client_ops dc_client_ops = {
|
|||||||
|
|
||||||
static int tegra_dc_probe(struct platform_device *pdev)
|
static int tegra_dc_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct host1x *host1x = dev_get_drvdata(pdev->dev.parent);
|
struct host1x_drm *host1x = dev_get_drvdata(pdev->dev.parent);
|
||||||
struct resource *regs;
|
struct resource *regs;
|
||||||
struct tegra_dc *dc;
|
struct tegra_dc *dc;
|
||||||
int err;
|
int err;
|
||||||
@ -1160,7 +1160,7 @@ static int tegra_dc_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
static int tegra_dc_remove(struct platform_device *pdev)
|
static int tegra_dc_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct host1x *host1x = dev_get_drvdata(pdev->dev.parent);
|
struct host1x_drm *host1x = dev_get_drvdata(pdev->dev.parent);
|
||||||
struct tegra_dc *dc = platform_get_drvdata(pdev);
|
struct tegra_dc *dc = platform_get_drvdata(pdev);
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
static int tegra_drm_load(struct drm_device *drm, unsigned long flags)
|
static int tegra_drm_load(struct drm_device *drm, unsigned long flags)
|
||||||
{
|
{
|
||||||
struct device *dev = drm->dev;
|
struct device *dev = drm->dev;
|
||||||
struct host1x *host1x;
|
struct host1x_drm *host1x;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
host1x = dev_get_drvdata(dev);
|
host1x = dev_get_drvdata(dev);
|
||||||
@ -69,7 +69,7 @@ static int tegra_drm_open(struct drm_device *drm, struct drm_file *filp)
|
|||||||
|
|
||||||
static void tegra_drm_lastclose(struct drm_device *drm)
|
static void tegra_drm_lastclose(struct drm_device *drm)
|
||||||
{
|
{
|
||||||
struct host1x *host1x = drm->dev_private;
|
struct host1x_drm *host1x = drm->dev_private;
|
||||||
|
|
||||||
drm_fbdev_cma_restore_mode(host1x->fbdev);
|
drm_fbdev_cma_restore_mode(host1x->fbdev);
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include <drm/drm_fb_cma_helper.h>
|
#include <drm/drm_fb_cma_helper.h>
|
||||||
#include <drm/drm_fixed.h>
|
#include <drm/drm_fixed.h>
|
||||||
|
|
||||||
struct host1x {
|
struct host1x_drm {
|
||||||
struct drm_device *drm;
|
struct drm_device *drm;
|
||||||
struct device *dev;
|
struct device *dev;
|
||||||
void __iomem *regs;
|
void __iomem *regs;
|
||||||
@ -44,7 +44,7 @@ struct host1x_client_ops {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct host1x_client {
|
struct host1x_client {
|
||||||
struct host1x *host1x;
|
struct host1x_drm *host1x;
|
||||||
struct device *dev;
|
struct device *dev;
|
||||||
|
|
||||||
const struct host1x_client_ops *ops;
|
const struct host1x_client_ops *ops;
|
||||||
@ -52,12 +52,12 @@ struct host1x_client {
|
|||||||
struct list_head list;
|
struct list_head list;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern int host1x_drm_init(struct host1x *host1x, struct drm_device *drm);
|
extern int host1x_drm_init(struct host1x_drm *host1x, struct drm_device *drm);
|
||||||
extern int host1x_drm_exit(struct host1x *host1x);
|
extern int host1x_drm_exit(struct host1x_drm *host1x);
|
||||||
|
|
||||||
extern int host1x_register_client(struct host1x *host1x,
|
extern int host1x_register_client(struct host1x_drm *host1x,
|
||||||
struct host1x_client *client);
|
struct host1x_client *client);
|
||||||
extern int host1x_unregister_client(struct host1x *host1x,
|
extern int host1x_unregister_client(struct host1x_drm *host1x,
|
||||||
struct host1x_client *client);
|
struct host1x_client *client);
|
||||||
|
|
||||||
struct tegra_output;
|
struct tegra_output;
|
||||||
@ -66,7 +66,7 @@ struct tegra_dc {
|
|||||||
struct host1x_client client;
|
struct host1x_client client;
|
||||||
spinlock_t lock;
|
spinlock_t lock;
|
||||||
|
|
||||||
struct host1x *host1x;
|
struct host1x_drm *host1x;
|
||||||
struct device *dev;
|
struct device *dev;
|
||||||
|
|
||||||
struct drm_crtc base;
|
struct drm_crtc base;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
static void tegra_drm_fb_output_poll_changed(struct drm_device *drm)
|
static void tegra_drm_fb_output_poll_changed(struct drm_device *drm)
|
||||||
{
|
{
|
||||||
struct host1x *host1x = drm->dev_private;
|
struct host1x_drm *host1x = drm->dev_private;
|
||||||
|
|
||||||
drm_fbdev_cma_hotplug_event(host1x->fbdev);
|
drm_fbdev_cma_hotplug_event(host1x->fbdev);
|
||||||
}
|
}
|
||||||
@ -23,7 +23,7 @@ static const struct drm_mode_config_funcs tegra_drm_mode_funcs = {
|
|||||||
|
|
||||||
int tegra_drm_fb_init(struct drm_device *drm)
|
int tegra_drm_fb_init(struct drm_device *drm)
|
||||||
{
|
{
|
||||||
struct host1x *host1x = drm->dev_private;
|
struct host1x_drm *host1x = drm->dev_private;
|
||||||
struct drm_fbdev_cma *fbdev;
|
struct drm_fbdev_cma *fbdev;
|
||||||
|
|
||||||
drm->mode_config.min_width = 0;
|
drm->mode_config.min_width = 0;
|
||||||
@ -46,7 +46,7 @@ int tegra_drm_fb_init(struct drm_device *drm)
|
|||||||
|
|
||||||
void tegra_drm_fb_exit(struct drm_device *drm)
|
void tegra_drm_fb_exit(struct drm_device *drm)
|
||||||
{
|
{
|
||||||
struct host1x *host1x = drm->dev_private;
|
struct host1x_drm *host1x = drm->dev_private;
|
||||||
|
|
||||||
drm_fbdev_cma_fini(host1x->fbdev);
|
drm_fbdev_cma_fini(host1x->fbdev);
|
||||||
}
|
}
|
||||||
|
@ -1189,7 +1189,7 @@ static const struct host1x_client_ops hdmi_client_ops = {
|
|||||||
|
|
||||||
static int tegra_hdmi_probe(struct platform_device *pdev)
|
static int tegra_hdmi_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct host1x *host1x = dev_get_drvdata(pdev->dev.parent);
|
struct host1x_drm *host1x = dev_get_drvdata(pdev->dev.parent);
|
||||||
struct tegra_hdmi *hdmi;
|
struct tegra_hdmi *hdmi;
|
||||||
struct resource *regs;
|
struct resource *regs;
|
||||||
int err;
|
int err;
|
||||||
@ -1278,7 +1278,7 @@ static int tegra_hdmi_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
static int tegra_hdmi_remove(struct platform_device *pdev)
|
static int tegra_hdmi_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct host1x *host1x = dev_get_drvdata(pdev->dev.parent);
|
struct host1x_drm *host1x = dev_get_drvdata(pdev->dev.parent);
|
||||||
struct tegra_hdmi *hdmi = platform_get_drvdata(pdev);
|
struct tegra_hdmi *hdmi = platform_get_drvdata(pdev);
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
|
@ -21,7 +21,8 @@ struct host1x_drm_client {
|
|||||||
struct list_head list;
|
struct list_head list;
|
||||||
};
|
};
|
||||||
|
|
||||||
static int host1x_add_drm_client(struct host1x *host1x, struct device_node *np)
|
static int host1x_add_drm_client(struct host1x_drm *host1x,
|
||||||
|
struct device_node *np)
|
||||||
{
|
{
|
||||||
struct host1x_drm_client *client;
|
struct host1x_drm_client *client;
|
||||||
|
|
||||||
@ -37,7 +38,7 @@ static int host1x_add_drm_client(struct host1x *host1x, struct device_node *np)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int host1x_activate_drm_client(struct host1x *host1x,
|
static int host1x_activate_drm_client(struct host1x_drm *host1x,
|
||||||
struct host1x_drm_client *drm,
|
struct host1x_drm_client *drm,
|
||||||
struct host1x_client *client)
|
struct host1x_client *client)
|
||||||
{
|
{
|
||||||
@ -50,7 +51,7 @@ static int host1x_activate_drm_client(struct host1x *host1x,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int host1x_remove_drm_client(struct host1x *host1x,
|
static int host1x_remove_drm_client(struct host1x_drm *host1x,
|
||||||
struct host1x_drm_client *client)
|
struct host1x_drm_client *client)
|
||||||
{
|
{
|
||||||
mutex_lock(&host1x->drm_clients_lock);
|
mutex_lock(&host1x->drm_clients_lock);
|
||||||
@ -63,7 +64,7 @@ static int host1x_remove_drm_client(struct host1x *host1x,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int host1x_parse_dt(struct host1x *host1x)
|
static int host1x_parse_dt(struct host1x_drm *host1x)
|
||||||
{
|
{
|
||||||
static const char * const compat[] = {
|
static const char * const compat[] = {
|
||||||
"nvidia,tegra20-dc",
|
"nvidia,tegra20-dc",
|
||||||
@ -92,7 +93,7 @@ static int host1x_parse_dt(struct host1x *host1x)
|
|||||||
|
|
||||||
static int tegra_host1x_probe(struct platform_device *pdev)
|
static int tegra_host1x_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct host1x *host1x;
|
struct host1x_drm *host1x;
|
||||||
struct resource *regs;
|
struct resource *regs;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
@ -156,14 +157,14 @@ err:
|
|||||||
|
|
||||||
static int tegra_host1x_remove(struct platform_device *pdev)
|
static int tegra_host1x_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct host1x *host1x = platform_get_drvdata(pdev);
|
struct host1x_drm *host1x = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
clk_disable_unprepare(host1x->clk);
|
clk_disable_unprepare(host1x->clk);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int host1x_drm_init(struct host1x *host1x, struct drm_device *drm)
|
int host1x_drm_init(struct host1x_drm *host1x, struct drm_device *drm)
|
||||||
{
|
{
|
||||||
struct host1x_client *client;
|
struct host1x_client *client;
|
||||||
|
|
||||||
@ -186,7 +187,7 @@ int host1x_drm_init(struct host1x *host1x, struct drm_device *drm)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int host1x_drm_exit(struct host1x *host1x)
|
int host1x_drm_exit(struct host1x_drm *host1x)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = to_platform_device(host1x->dev);
|
struct platform_device *pdev = to_platform_device(host1x->dev);
|
||||||
struct host1x_client *client;
|
struct host1x_client *client;
|
||||||
@ -216,7 +217,8 @@ int host1x_drm_exit(struct host1x *host1x)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int host1x_register_client(struct host1x *host1x, struct host1x_client *client)
|
int host1x_register_client(struct host1x_drm *host1x,
|
||||||
|
struct host1x_client *client)
|
||||||
{
|
{
|
||||||
struct host1x_drm_client *drm, *tmp;
|
struct host1x_drm_client *drm, *tmp;
|
||||||
int err;
|
int err;
|
||||||
@ -244,7 +246,7 @@ int host1x_register_client(struct host1x *host1x, struct host1x_client *client)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int host1x_unregister_client(struct host1x *host1x,
|
int host1x_unregister_client(struct host1x_drm *host1x,
|
||||||
struct host1x_client *client)
|
struct host1x_client *client)
|
||||||
{
|
{
|
||||||
struct host1x_drm_client *drm, *tmp;
|
struct host1x_drm_client *drm, *tmp;
|
||||||
|
Loading…
Reference in New Issue
Block a user