Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e1f05b2 authored by Vincent Abriou's avatar Vincent Abriou Committed by Benjamin Gaignard
Browse files

drm/sti: rename files and functions



replace all "sti_drm_" occurences by "sti_"

Signed-off-by: default avatarVincent Abriou <vincent.abriou@st.com>
Reviewed-by: default avatarBenjamin Gaignard <benjamin.gaignard@linaro.org>
parent 871bcdfe
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -4,8 +4,8 @@ sticompositor-y := \
	sti_vid.o \
	sti_cursor.o \
	sti_compositor.o \
	sti_drm_crtc.o \
	sti_drm_plane.o
	sti_crtc.o \
	sti_plane.o

stihdmi-y := sti_hdmi.o \
	sti_hdmi_tx3g0c55phy.o \
@@ -23,4 +23,4 @@ obj-$(CONFIG_DRM_STI) = \
	sticompositor.o \
	sti_hqvdp.o \
	stidvo.o \
	sti_drm_drv.o
	sti_drv.o
+12 −12
Original line number Diff line number Diff line
@@ -14,11 +14,11 @@
#include <drm/drmP.h>

#include "sti_compositor.h"
#include "sti_crtc.h"
#include "sti_cursor.h"
#include "sti_drm_crtc.h"
#include "sti_drm_drv.h"
#include "sti_drm_plane.h"
#include "sti_drv.h"
#include "sti_gdp.h"
#include "sti_plane.h"
#include "sti_vid.h"
#include "sti_vtg.h"

@@ -62,7 +62,7 @@ static int sti_compositor_bind(struct device *dev,
	struct sti_compositor *compo = dev_get_drvdata(dev);
	struct drm_device *drm_dev = data;
	unsigned int i, mixer_id = 0, vid_id = 0, crtc_id = 0, plane_id = 0;
	struct sti_drm_private *dev_priv = drm_dev->dev_private;
	struct sti_private *dev_priv = drm_dev->dev_private;
	struct drm_plane *cursor = NULL;
	struct drm_plane *primary = NULL;
	struct sti_compositor_subdev_descriptor *desc = compo->data.subdev_desc;
@@ -116,7 +116,7 @@ static int sti_compositor_bind(struct device *dev,
				DRM_ERROR("Can't create CURSOR plane\n");
				break;
			}
			cursor = sti_drm_plane_init(drm_dev, plane, 1,
			cursor = sti_plane_init(drm_dev, plane, 1,
						DRM_PLANE_TYPE_CURSOR);
			plane_id++;
			break;
@@ -127,7 +127,7 @@ static int sti_compositor_bind(struct device *dev,
				DRM_ERROR("Can't create GDP plane\n");
				break;
			}
			primary = sti_drm_plane_init(drm_dev, plane,
			primary = sti_plane_init(drm_dev, plane,
						 (1 << mixer_id) - 1,
						 plane_type);
			plane_id++;
@@ -139,7 +139,7 @@ static int sti_compositor_bind(struct device *dev,

		/* The first planes are reserved for primary planes*/
		if (crtc_id < mixer_id && primary) {
			sti_drm_crtc_init(drm_dev, compo->mixer[crtc_id],
			sti_crtc_init(drm_dev, compo->mixer[crtc_id],
				      primary, cursor);
			crtc_id++;
			cursor = NULL;
@@ -196,7 +196,7 @@ static int sti_compositor_probe(struct platform_device *pdev)
		return -ENOMEM;
	}
	compo->dev = dev;
	compo->vtg_vblank_nb.notifier_call = sti_drm_crtc_vblank_cb;
	compo->vtg_vblank_nb.notifier_call = sti_crtc_vblank_cb;

	/* populate data structure depending on compatibility */
	BUG_ON(!of_match_node(compositor_of_match, np)->data);
+1 −1
Original line number Diff line number Diff line
@@ -12,8 +12,8 @@
#include <linux/clk.h>
#include <linux/kernel.h>

#include "sti_drm_plane.h"
#include "sti_mixer.h"
#include "sti_plane.h"

#define WAIT_NEXT_VSYNC_MS      50 /*ms*/

+44 −44
Original line number Diff line number Diff line
@@ -15,16 +15,16 @@
#include <drm/drm_plane_helper.h>

#include "sti_compositor.h"
#include "sti_drm_drv.h"
#include "sti_drm_crtc.h"
#include "sti_crtc.h"
#include "sti_drv.h"
#include "sti_vtg.h"

static void sti_drm_crtc_dpms(struct drm_crtc *crtc, int mode)
static void sti_crtc_dpms(struct drm_crtc *crtc, int mode)
{
	DRM_DEBUG_KMS("\n");
}

static void sti_drm_crtc_prepare(struct drm_crtc *crtc)
static void sti_crtc_prepare(struct drm_crtc *crtc)
{
	struct sti_mixer *mixer = to_sti_mixer(crtc);
	struct device *dev = mixer->dev;
@@ -44,7 +44,7 @@ static void sti_drm_crtc_prepare(struct drm_crtc *crtc)
	sti_mixer_clear_all_planes(mixer);
}

static void sti_drm_crtc_commit(struct drm_crtc *crtc)
static void sti_crtc_commit(struct drm_crtc *crtc)
{
	struct sti_mixer *mixer = to_sti_mixer(crtc);
	struct device *dev = mixer->dev;
@@ -68,7 +68,7 @@ static void sti_drm_crtc_commit(struct drm_crtc *crtc)
	drm_crtc_vblank_on(crtc);
}

static bool sti_drm_crtc_mode_fixup(struct drm_crtc *crtc,
static bool sti_crtc_mode_fixup(struct drm_crtc *crtc,
				const struct drm_display_mode *mode,
				struct drm_display_mode *adjusted_mode)
{
@@ -77,7 +77,7 @@ static bool sti_drm_crtc_mode_fixup(struct drm_crtc *crtc,
}

static int
sti_drm_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode)
sti_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode)
{
	struct sti_mixer *mixer = to_sti_mixer(crtc);
	struct device *dev = mixer->dev;
@@ -127,7 +127,7 @@ sti_drm_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode)
	return res;
}

static void sti_drm_crtc_disable(struct drm_crtc *crtc)
static void sti_crtc_disable(struct drm_crtc *crtc)
{
	struct sti_mixer *mixer = to_sti_mixer(crtc);
	struct device *dev = mixer->dev;
@@ -156,13 +156,13 @@ static void sti_drm_crtc_disable(struct drm_crtc *crtc)
}

static void
sti_drm_crtc_mode_set_nofb(struct drm_crtc *crtc)
sti_crtc_mode_set_nofb(struct drm_crtc *crtc)
{
	sti_drm_crtc_prepare(crtc);
	sti_drm_crtc_mode_set(crtc, &crtc->state->adjusted_mode);
	sti_crtc_prepare(crtc);
	sti_crtc_mode_set(crtc, &crtc->state->adjusted_mode);
}

static void sti_drm_crtc_atomic_begin(struct drm_crtc *crtc)
static void sti_crtc_atomic_begin(struct drm_crtc *crtc)
{
	struct sti_mixer *mixer = to_sti_mixer(crtc);

@@ -176,30 +176,30 @@ static void sti_drm_crtc_atomic_begin(struct drm_crtc *crtc)
	}
}

static void sti_drm_crtc_atomic_flush(struct drm_crtc *crtc)
static void sti_crtc_atomic_flush(struct drm_crtc *crtc)
{
}

static struct drm_crtc_helper_funcs sti_crtc_helper_funcs = {
	.dpms = sti_drm_crtc_dpms,
	.prepare = sti_drm_crtc_prepare,
	.commit = sti_drm_crtc_commit,
	.mode_fixup = sti_drm_crtc_mode_fixup,
	.dpms = sti_crtc_dpms,
	.prepare = sti_crtc_prepare,
	.commit = sti_crtc_commit,
	.mode_fixup = sti_crtc_mode_fixup,
	.mode_set = drm_helper_crtc_mode_set,
	.mode_set_nofb = sti_drm_crtc_mode_set_nofb,
	.mode_set_nofb = sti_crtc_mode_set_nofb,
	.mode_set_base = drm_helper_crtc_mode_set_base,
	.disable = sti_drm_crtc_disable,
	.atomic_begin = sti_drm_crtc_atomic_begin,
	.atomic_flush = sti_drm_crtc_atomic_flush,
	.disable = sti_crtc_disable,
	.atomic_begin = sti_crtc_atomic_begin,
	.atomic_flush = sti_crtc_atomic_flush,
};

static void sti_drm_crtc_destroy(struct drm_crtc *crtc)
static void sti_crtc_destroy(struct drm_crtc *crtc)
{
	DRM_DEBUG_KMS("\n");
	drm_crtc_cleanup(crtc);
}

static int sti_drm_crtc_set_property(struct drm_crtc *crtc,
static int sti_crtc_set_property(struct drm_crtc *crtc,
				 struct drm_property *property,
				 uint64_t val)
{
@@ -207,7 +207,7 @@ static int sti_drm_crtc_set_property(struct drm_crtc *crtc,
	return 0;
}

int sti_drm_crtc_vblank_cb(struct notifier_block *nb,
int sti_crtc_vblank_cb(struct notifier_block *nb,
		       unsigned long event, void *data)
{
	struct drm_device *drm_dev;
@@ -215,7 +215,7 @@ int sti_drm_crtc_vblank_cb(struct notifier_block *nb,
		container_of(nb, struct sti_compositor, vtg_vblank_nb);
	int *crtc = data;
	unsigned long flags;
	struct sti_drm_private *priv;
	struct sti_private *priv;

	drm_dev = compo->mixer[*crtc]->drm_crtc.dev;
	priv = drm_dev->dev_private;
@@ -240,9 +240,9 @@ int sti_drm_crtc_vblank_cb(struct notifier_block *nb,
	return 0;
}

int sti_drm_crtc_enable_vblank(struct drm_device *dev, int crtc)
int sti_crtc_enable_vblank(struct drm_device *dev, int crtc)
{
	struct sti_drm_private *dev_priv = dev->dev_private;
	struct sti_private *dev_priv = dev->dev_private;
	struct sti_compositor *compo = dev_priv->compo;
	struct notifier_block *vtg_vblank_nb = &compo->vtg_vblank_nb;

@@ -257,11 +257,11 @@ int sti_drm_crtc_enable_vblank(struct drm_device *dev, int crtc)

	return 0;
}
EXPORT_SYMBOL(sti_drm_crtc_enable_vblank);
EXPORT_SYMBOL(sti_crtc_enable_vblank);

void sti_drm_crtc_disable_vblank(struct drm_device *dev, int crtc)
void sti_crtc_disable_vblank(struct drm_device *dev, int crtc)
{
	struct sti_drm_private *priv = dev->dev_private;
	struct sti_private *priv = dev->dev_private;
	struct sti_compositor *compo = priv->compo;
	struct notifier_block *vtg_vblank_nb = &compo->vtg_vblank_nb;

@@ -277,19 +277,19 @@ void sti_drm_crtc_disable_vblank(struct drm_device *dev, int crtc)
		compo->mixer[crtc]->pending_event = NULL;
	}
}
EXPORT_SYMBOL(sti_drm_crtc_disable_vblank);
EXPORT_SYMBOL(sti_crtc_disable_vblank);

static struct drm_crtc_funcs sti_crtc_funcs = {
	.set_config = drm_atomic_helper_set_config,
	.page_flip = drm_atomic_helper_page_flip,
	.destroy = sti_drm_crtc_destroy,
	.set_property = sti_drm_crtc_set_property,
	.destroy = sti_crtc_destroy,
	.set_property = sti_crtc_set_property,
	.reset = drm_atomic_helper_crtc_reset,
	.atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state,
	.atomic_destroy_state = drm_atomic_helper_crtc_destroy_state,
};

bool sti_drm_crtc_is_main(struct drm_crtc *crtc)
bool sti_crtc_is_main(struct drm_crtc *crtc)
{
	struct sti_mixer *mixer = to_sti_mixer(crtc);

@@ -298,9 +298,9 @@ bool sti_drm_crtc_is_main(struct drm_crtc *crtc)

	return false;
}
EXPORT_SYMBOL(sti_drm_crtc_is_main);
EXPORT_SYMBOL(sti_crtc_is_main);

int sti_drm_crtc_init(struct drm_device *drm_dev, struct sti_mixer *mixer,
int sti_crtc_init(struct drm_device *drm_dev, struct sti_mixer *mixer,
		  struct drm_plane *primary, struct drm_plane *cursor)
{
	struct drm_crtc *crtc = &mixer->drm_crtc;
+22 −0
Original line number Diff line number Diff line
@@ -4,19 +4,19 @@
 * License terms:  GNU General Public License (GPL), version 2
 */

#ifndef _STI_DRM_CRTC_H_
#define _STI_DRM_CRTC_H_
#ifndef _STI_CRTC_H_
#define _STI_CRTC_H_

#include <drm/drmP.h>

struct sti_mixer;

int sti_drm_crtc_init(struct drm_device *drm_dev, struct sti_mixer *mixer,
int sti_crtc_init(struct drm_device *drm_dev, struct sti_mixer *mixer,
		  struct drm_plane *primary, struct drm_plane *cursor);
int sti_drm_crtc_enable_vblank(struct drm_device *dev, int crtc);
void sti_drm_crtc_disable_vblank(struct drm_device *dev, int crtc);
int sti_drm_crtc_vblank_cb(struct notifier_block *nb,
int sti_crtc_enable_vblank(struct drm_device *dev, int crtc);
void sti_crtc_disable_vblank(struct drm_device *dev, int crtc);
int sti_crtc_vblank_cb(struct notifier_block *nb,
		       unsigned long event, void *data);
bool sti_drm_crtc_is_main(struct drm_crtc *drm_crtc);
bool sti_crtc_is_main(struct drm_crtc *drm_crtc);

#endif
Loading