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

Commit 762f7cc9 authored by Laurent Pinchart's avatar Laurent Pinchart
Browse files

fbdev: sh_mobile_meram: Don't inline everything



Let the compiler decide which complex functions to inline, and constify
constant static arrays.

Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
parent 2a618e03
Loading
Loading
Loading
Loading
+15 −15
Original line number Diff line number Diff line
@@ -83,14 +83,14 @@

#define SH_MOBILE_MERAM_ICB_NUM		32

static unsigned long common_regs[] = {
static const unsigned long common_regs[] = {
	MEVCR1,
	MEQSEL1,
	MEQSEL2,
};
#define CMN_REGS_SIZE ARRAY_SIZE(common_regs)

static unsigned long icb_regs[] = {
static const unsigned long icb_regs[] = {
	MExxCTL,
	MExxBSIZE,
	MExxMNCF,
@@ -180,7 +180,7 @@ static inline unsigned long meram_read_reg(void __iomem *base, unsigned int off)
 * check if there's no overlaps in MERAM allocation.
 */

static inline int meram_check_overlap(struct sh_mobile_meram_priv *priv,
static int meram_check_overlap(struct sh_mobile_meram_priv *priv,
			       const struct sh_mobile_meram_icb_cfg *new)
{
	unsigned int used_start, used_end, meram_start, meram_end;
@@ -215,7 +215,7 @@ static inline int meram_check_overlap(struct sh_mobile_meram_priv *priv,
 * mark the specified ICB as used
 */

static inline void meram_mark(struct sh_mobile_meram_priv *priv,
static void meram_mark(struct sh_mobile_meram_priv *priv,
		       const struct sh_mobile_meram_icb_cfg *new,
		       int pixelformat)
{
@@ -234,7 +234,7 @@ static inline void meram_mark(struct sh_mobile_meram_priv *priv,
 * unmark the specified ICB as used
 */

static inline void meram_unmark(struct sh_mobile_meram_priv *priv,
static void meram_unmark(struct sh_mobile_meram_priv *priv,
			 const struct sh_mobile_meram_icb_cfg *icb)
{
	__clear_bit(icb->marker_icb, &priv->used_icb);
@@ -244,7 +244,7 @@ static inline void meram_unmark(struct sh_mobile_meram_priv *priv,
/*
 * is this a YCbCr(NV12, NV16 or NV24) colorspace
 */
static inline int is_nvcolor(int cspace)
static int is_nvcolor(int cspace)
{
	if (cspace == SH_MOBILE_MERAM_PF_NV ||
	    cspace == SH_MOBILE_MERAM_PF_NV24)
@@ -255,7 +255,7 @@ static inline int is_nvcolor(int cspace)
/*
 * set the next address to fetch
 */
static inline void meram_set_next_addr(struct sh_mobile_meram_priv *priv,
static void meram_set_next_addr(struct sh_mobile_meram_priv *priv,
				const struct sh_mobile_meram_cfg *cfg,
				unsigned long base_addr_y,
				unsigned long base_addr_c)
@@ -285,7 +285,7 @@ static inline void meram_set_next_addr(struct sh_mobile_meram_priv *priv,
/*
 * get the next ICB address
 */
static inline void
static void
meram_get_next_icb_addr(struct sh_mobile_meram_info *pdata,
			const struct sh_mobile_meram_cfg *cfg,
			unsigned long *icb_addr_y, unsigned long *icb_addr_c)