@@ -149,7 +149,7 @@ static void armada_fbdev_client_unregister(struct drm_client_dev *client)
static int armada_fbdev_client_restore(struct drm_client_dev *client)
{
- drm_fb_helper_lastclose(client->dev);
+ drm_fb_helper_lastclose(client->drm);
return 0;
}
@@ -157,7 +157,7 @@ static int armada_fbdev_client_restore(struct drm_client_dev *client)
static int armada_fbdev_client_hotplug(struct drm_client_dev *client)
{
struct drm_fb_helper *fbh = drm_fb_helper_from_client(client);
- struct drm_device *dev = client->dev;
+ struct drm_device *dev = client->drm;
int ret;
if (dev->fb_helper)
@@ -34,7 +34,7 @@
static int drm_client_open(struct drm_client_dev *client)
{
- struct drm_device *dev = client->dev;
+ struct drm_device *dev = client->drm;
struct drm_file *file;
file = drm_file_alloc(dev->primary);
@@ -52,7 +52,7 @@ static int drm_client_open(struct drm_client_dev *client)
static void drm_client_close(struct drm_client_dev *client)
{
- struct drm_device *dev = client->dev;
+ struct drm_device *dev = client->drm;
mutex_lock(&dev->filelist_mutex);
list_del(&client->file->lhead);
@@ -87,7 +87,7 @@ int drm_client_init(struct drm_device *dev, struct drm_client_dev *client,
if (funcs && !try_module_get(funcs->owner))
return -ENODEV;
- client->dev = dev;
+ client->drm = dev;
client->name = name;
client->funcs = funcs;
@@ -125,7 +125,7 @@ EXPORT_SYMBOL(drm_client_init);
*/
void drm_client_register(struct drm_client_dev *client)
{
- struct drm_device *dev = client->dev;
+ struct drm_device *dev = client->drm;
mutex_lock(&dev->clientlist_mutex);
list_add(&client->list, &dev->clientlist);
@@ -149,7 +149,7 @@ EXPORT_SYMBOL(drm_client_register);
*/
void drm_client_release(struct drm_client_dev *client)
{
- struct drm_device *dev = client->dev;
+ struct drm_device *dev = client->drm;
drm_dbg_kms(dev, "%s\n", client->name);
@@ -257,7 +257,7 @@ drm_client_buffer_create(struct drm_client_dev *client, u32 width, u32 height,
{
const struct drm_format_info *info = drm_format_info(format);
struct drm_mode_create_dumb dumb_args = { };
- struct drm_device *dev = client->dev;
+ struct drm_device *dev = client->drm;
struct drm_client_buffer *buffer;
struct drm_gem_object *obj;
int ret;
@@ -361,9 +361,10 @@ static void drm_client_buffer_rmfb(struct drm_client_buffer *buffer)
if (!buffer->fb)
return;
- ret = drm_mode_rmfb(buffer->client->dev, buffer->fb->base.id, buffer->client->file);
+ ret = drm_mode_rmfb(buffer->client->drm, buffer->fb->base.id,
+ buffer->client->file);
if (ret)
- drm_err(buffer->client->dev,
+ drm_err(buffer->client->drm,
"Error removing FB:%u (%d)\n", buffer->fb->base.id, ret);
buffer->fb = NULL;
@@ -386,11 +387,12 @@ static int drm_client_buffer_addfb(struct drm_client_buffer *buffer,
fb_req.handle = handle;
fb_req.pitch = buffer->pitch;
- ret = drm_mode_addfb(client->dev, &fb_req, client->file);
+ ret = drm_mode_addfb(client->drm, &fb_req, client->file);
if (ret)
return ret;
- buffer->fb = drm_framebuffer_lookup(client->dev, buffer->client->file, fb_req.fb_id);
+ buffer->fb = drm_framebuffer_lookup(client->drm, buffer->client->file,
+ fb_req.fb_id);
if (WARN_ON(!buffer->fb))
return -ENOENT;
@@ -436,7 +438,7 @@ drm_client_framebuffer_create(struct drm_client_dev *client, u32 width, u32 heig
* object as DMA-buf. The framebuffer and our buffer structure are still
* holding references to the GEM object to prevent its destruction.
*/
- drm_mode_destroy_dumb(client->dev, handle, client->file);
+ drm_mode_destroy_dumb(client->drm, handle, client->file);
if (ret) {
drm_client_buffer_delete(buffer);
@@ -34,7 +34,7 @@ struct drm_client_offset {
int drm_client_modeset_create(struct drm_client_dev *client)
{
- struct drm_device *dev = client->dev;
+ struct drm_device *dev = client->drm;
unsigned int num_crtc = dev->mode_config.num_crtc;
unsigned int max_connector_count = 1;
struct drm_mode_set *modeset;
@@ -76,7 +76,7 @@ static void drm_client_modeset_release(struct drm_client_dev *client)
unsigned int i;
drm_client_for_each_modeset(modeset, client) {
- drm_mode_destroy(client->dev, modeset->mode);
+ drm_mode_destroy(client->drm, modeset->mode);
modeset->mode = NULL;
modeset->fb = NULL;
@@ -490,7 +490,7 @@ static int drm_client_pick_crtcs(struct drm_client_dev *client,
struct drm_display_mode **modes,
int n, int width, int height)
{
- struct drm_device *dev = client->dev;
+ struct drm_device *dev = client->drm;
struct drm_connector *connector;
int my_score, best_score, score;
struct drm_crtc **crtcs, *crtc;
@@ -568,7 +568,7 @@ static bool drm_client_firmware_config(struct drm_client_dev *client,
{
const int count = min_t(unsigned int, connector_count, BITS_PER_LONG);
unsigned long conn_configured, conn_seq, mask;
- struct drm_device *dev = client->dev;
+ struct drm_device *dev = client->drm;
int i, j;
bool *save_enabled;
bool fallback = true, ret = true;
@@ -768,7 +768,7 @@ int drm_client_modeset_probe(struct drm_client_dev *client, unsigned int width,
{
struct drm_connector *connector, **connectors = NULL;
struct drm_connector_list_iter conn_iter;
- struct drm_device *dev = client->dev;
+ struct drm_device *dev = client->drm;
unsigned int total_modes_count = 0;
struct drm_client_offset *offsets;
unsigned int connector_count = 0;
@@ -974,7 +974,7 @@ EXPORT_SYMBOL(drm_client_rotation);
static int drm_client_modeset_commit_atomic(struct drm_client_dev *client, bool active, bool check)
{
- struct drm_device *dev = client->dev;
+ struct drm_device *dev = client->drm;
struct drm_plane *plane;
struct drm_atomic_state *state;
struct drm_modeset_acquire_ctx ctx;
@@ -1064,7 +1064,7 @@ static int drm_client_modeset_commit_atomic(struct drm_client_dev *client, bool
static int drm_client_modeset_commit_legacy(struct drm_client_dev *client)
{
- struct drm_device *dev = client->dev;
+ struct drm_device *dev = client->drm;
struct drm_mode_set *mode_set;
struct drm_plane *plane;
int ret = 0;
@@ -1116,7 +1116,7 @@ int drm_client_modeset_check(struct drm_client_dev *client)
{
int ret;
- if (!drm_drv_uses_atomic_modeset(client->dev))
+ if (!drm_drv_uses_atomic_modeset(client->drm))
return 0;
mutex_lock(&client->modeset_mutex);
@@ -1140,7 +1140,7 @@ EXPORT_SYMBOL(drm_client_modeset_check);
*/
int drm_client_modeset_commit_locked(struct drm_client_dev *client)
{
- struct drm_device *dev = client->dev;
+ struct drm_device *dev = client->drm;
int ret;
mutex_lock(&client->modeset_mutex);
@@ -1165,7 +1165,7 @@ EXPORT_SYMBOL(drm_client_modeset_commit_locked);
*/
int drm_client_modeset_commit(struct drm_client_dev *client)
{
- struct drm_device *dev = client->dev;
+ struct drm_device *dev = client->drm;
int ret;
if (!drm_master_internal_acquire(dev))
@@ -1181,7 +1181,7 @@ EXPORT_SYMBOL(drm_client_modeset_commit);
static void drm_client_modeset_dpms_legacy(struct drm_client_dev *client, int dpms_mode)
{
- struct drm_device *dev = client->dev;
+ struct drm_device *dev = client->drm;
struct drm_connector *connector;
struct drm_mode_set *modeset;
struct drm_modeset_acquire_ctx ctx;
@@ -1215,7 +1215,7 @@ static void drm_client_modeset_dpms_legacy(struct drm_client_dev *client, int dp
*/
int drm_client_modeset_dpms(struct drm_client_dev *client, int mode)
{
- struct drm_device *dev = client->dev;
+ struct drm_device *dev = client->drm;
int ret = 0;
if (!drm_master_internal_acquire(dev))
@@ -168,7 +168,7 @@ static void drm_fbdev_dma_client_unregister(struct drm_client_dev *client)
static int drm_fbdev_dma_client_restore(struct drm_client_dev *client)
{
- drm_fb_helper_lastclose(client->dev);
+ drm_fb_helper_lastclose(client->drm);
return 0;
}
@@ -176,7 +176,7 @@ static int drm_fbdev_dma_client_restore(struct drm_client_dev *client)
static int drm_fbdev_dma_client_hotplug(struct drm_client_dev *client)
{
struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client);
- struct drm_device *dev = client->dev;
+ struct drm_device *dev = client->drm;
int ret;
if (dev->fb_helper)
@@ -256,7 +256,7 @@ static void drm_fbdev_generic_client_unregister(struct drm_client_dev *client)
static int drm_fbdev_generic_client_restore(struct drm_client_dev *client)
{
- drm_fb_helper_lastclose(client->dev);
+ drm_fb_helper_lastclose(client->drm);
return 0;
}
@@ -264,7 +264,7 @@ static int drm_fbdev_generic_client_restore(struct drm_client_dev *client)
static int drm_fbdev_generic_client_hotplug(struct drm_client_dev *client)
{
struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client);
- struct drm_device *dev = client->dev;
+ struct drm_device *dev = client->drm;
int ret;
if (dev->fb_helper)
@@ -157,7 +157,7 @@ static void exynos_drm_fbdev_client_unregister(struct drm_client_dev *client)
static int exynos_drm_fbdev_client_restore(struct drm_client_dev *client)
{
- drm_fb_helper_lastclose(client->dev);
+ drm_fb_helper_lastclose(client->drm);
return 0;
}
@@ -165,7 +165,7 @@ static int exynos_drm_fbdev_client_restore(struct drm_client_dev *client)
static int exynos_drm_fbdev_client_hotplug(struct drm_client_dev *client)
{
struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client);
- struct drm_device *dev = client->dev;
+ struct drm_device *dev = client->drm;
int ret;
if (dev->fb_helper)
@@ -270,7 +270,7 @@ static void psb_fbdev_client_unregister(struct drm_client_dev *client)
static int psb_fbdev_client_restore(struct drm_client_dev *client)
{
- drm_fb_helper_lastclose(client->dev);
+ drm_fb_helper_lastclose(client->drm);
return 0;
}
@@ -278,7 +278,7 @@ static int psb_fbdev_client_restore(struct drm_client_dev *client)
static int psb_fbdev_client_hotplug(struct drm_client_dev *client)
{
struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client);
- struct drm_device *dev = client->dev;
+ struct drm_device *dev = client->drm;
int ret;
if (dev->fb_helper)
@@ -182,7 +182,7 @@ static void msm_fbdev_client_unregister(struct drm_client_dev *client)
static int msm_fbdev_client_restore(struct drm_client_dev *client)
{
- drm_fb_helper_lastclose(client->dev);
+ drm_fb_helper_lastclose(client->drm);
return 0;
}
@@ -190,7 +190,7 @@ static int msm_fbdev_client_restore(struct drm_client_dev *client)
static int msm_fbdev_client_hotplug(struct drm_client_dev *client)
{
struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client);
- struct drm_device *dev = client->dev;
+ struct drm_device *dev = client->drm;
int ret;
if (dev->fb_helper)
@@ -258,7 +258,7 @@ static void omap_fbdev_client_unregister(struct drm_client_dev *client)
static int omap_fbdev_client_restore(struct drm_client_dev *client)
{
- drm_fb_helper_lastclose(client->dev);
+ drm_fb_helper_lastclose(client->drm);
return 0;
}
@@ -266,7 +266,7 @@ static int omap_fbdev_client_restore(struct drm_client_dev *client)
static int omap_fbdev_client_hotplug(struct drm_client_dev *client)
{
struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client);
- struct drm_device *dev = client->dev;
+ struct drm_device *dev = client->drm;
int ret;
if (dev->fb_helper)
@@ -315,7 +315,7 @@ static void radeon_fbdev_client_unregister(struct drm_client_dev *client)
static int radeon_fbdev_client_restore(struct drm_client_dev *client)
{
- drm_fb_helper_lastclose(client->dev);
+ drm_fb_helper_lastclose(client->drm);
vga_switcheroo_process_delayed_switch();
return 0;
@@ -324,7 +324,7 @@ static int radeon_fbdev_client_restore(struct drm_client_dev *client)
static int radeon_fbdev_client_hotplug(struct drm_client_dev *client)
{
struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client);
- struct drm_device *dev = client->dev;
+ struct drm_device *dev = client->drm;
struct radeon_device *rdev = dev->dev_private;
int ret;
@@ -167,7 +167,7 @@ static void tegra_fbdev_client_unregister(struct drm_client_dev *client)
static int tegra_fbdev_client_restore(struct drm_client_dev *client)
{
- drm_fb_helper_lastclose(client->dev);
+ drm_fb_helper_lastclose(client->drm);
return 0;
}
@@ -175,7 +175,7 @@ static int tegra_fbdev_client_restore(struct drm_client_dev *client)
static int tegra_fbdev_client_hotplug(struct drm_client_dev *client)
{
struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client);
- struct drm_device *dev = client->dev;
+ struct drm_device *dev = client->drm;
int ret;
if (dev->fb_helper)
@@ -70,9 +70,9 @@ struct drm_client_funcs {
*/
struct drm_client_dev {
/**
- * @dev: DRM device
+ * @drm: DRM device
*/
- struct drm_device *dev;
+ struct drm_device *drm;
/**
* @name: Name of the client.
"dev" is usually used for struct device pointers. Using it for struct drm_device pointers is irritating (for me at least). Replace it by "drm" and adapt all users. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> --- drivers/gpu/drm/armada/armada_fbdev.c | 4 ++-- drivers/gpu/drm/drm_client.c | 24 ++++++++++++----------- drivers/gpu/drm/drm_client_modeset.c | 24 +++++++++++------------ drivers/gpu/drm/drm_fbdev_dma.c | 4 ++-- drivers/gpu/drm/drm_fbdev_generic.c | 4 ++-- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 4 ++-- drivers/gpu/drm/gma500/fbdev.c | 4 ++-- drivers/gpu/drm/msm/msm_fbdev.c | 4 ++-- drivers/gpu/drm/omapdrm/omap_fbdev.c | 4 ++-- drivers/gpu/drm/radeon/radeon_fbdev.c | 4 ++-- drivers/gpu/drm/tegra/fbdev.c | 4 ++-- include/drm/drm_client.h | 4 ++-- 12 files changed, 45 insertions(+), 43 deletions(-)