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

Commit 8edbeb6e authored by Florian Tobias Schandinat's avatar Florian Tobias Schandinat
Browse files

Merge branch 'sh-mobile-lcdc' of git://linuxtv.org/pinchartl/fbdev into fbdev-next

parents d4a7dbfd 8a20974f
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -1583,6 +1583,7 @@ static void __init mackerel_init(void)


	sh7372_add_device_to_domain(&sh7372_a4lc, &lcdc_device);
	sh7372_add_device_to_domain(&sh7372_a4lc, &lcdc_device);
	sh7372_add_device_to_domain(&sh7372_a4lc, &hdmi_lcdc_device);
	sh7372_add_device_to_domain(&sh7372_a4lc, &hdmi_lcdc_device);
	sh7372_add_device_to_domain(&sh7372_a4lc, &meram_device);
	sh7372_add_device_to_domain(&sh7372_a4mp, &fsi_device);
	sh7372_add_device_to_domain(&sh7372_a4mp, &fsi_device);


	hdmi_init_pm_clock();
	hdmi_init_pm_clock();
+263 −329

File changed.

Preview size limit exceeded, changes collapsed.

+11 −1
Original line number Original line Diff line number Diff line
@@ -18,6 +18,13 @@ struct sh_mobile_lcdc_priv;
struct fb_info;
struct fb_info;
struct backlight_device;
struct backlight_device;


/*
 * struct sh_mobile_lcdc_chan - LCDC display channel
 *
 * @base_addr_y: Frame buffer viewport base address (luma component)
 * @base_addr_c: Frame buffer viewport base address (chroma component)
 * @pitch: Frame buffer line pitch
 */
struct sh_mobile_lcdc_chan {
struct sh_mobile_lcdc_chan {
	struct sh_mobile_lcdc_priv *lcdc;
	struct sh_mobile_lcdc_priv *lcdc;
	unsigned long *reg_offs;
	unsigned long *reg_offs;
@@ -25,7 +32,6 @@ struct sh_mobile_lcdc_chan {
	unsigned long enabled; /* ME and SE in LDCNT2R */
	unsigned long enabled; /* ME and SE in LDCNT2R */
	struct sh_mobile_lcdc_chan_cfg cfg;
	struct sh_mobile_lcdc_chan_cfg cfg;
	u32 pseudo_palette[PALETTE_NR];
	u32 pseudo_palette[PALETTE_NR];
	unsigned long saved_ch_regs[NR_CH_REGS];
	struct fb_info *info;
	struct fb_info *info;
	struct backlight_device *bl;
	struct backlight_device *bl;
	dma_addr_t dma_handle;
	dma_addr_t dma_handle;
@@ -40,6 +46,10 @@ struct sh_mobile_lcdc_chan {
	int blank_status;
	int blank_status;
	struct mutex open_lock;		/* protects the use counter */
	struct mutex open_lock;		/* protects the use counter */
	int meram_enabled;
	int meram_enabled;

	unsigned long base_addr_y;
	unsigned long base_addr_c;
	unsigned int pitch;
};
};


#endif
#endif
+165 −37

File changed.

Preview size limit exceeded, changes collapsed.

drivers/video/sh_mobile_meram.h

deleted100644 → 0
+0 −41
Original line number Original line Diff line number Diff line
#ifndef __sh_mobile_meram_h__
#define __sh_mobile_meram_h__

#include <linux/mutex.h>
#include <video/sh_mobile_meram.h>

/*
 * MERAM private
 */

#define MERAM_ICB_Y 0x1
#define MERAM_ICB_C 0x2

/* MERAM cache size */
#define SH_MOBILE_MERAM_ICB_NUM		32

#define SH_MOBILE_MERAM_CACHE_OFFSET(p)	((p) >> 16)
#define SH_MOBILE_MERAM_CACHE_SIZE(p)	((p) & 0xffff)

struct sh_mobile_meram_priv {
	void __iomem	*base;
	struct mutex	lock;
	unsigned long	used_icb;
	int		used_meram_cache_regions;
	unsigned long	used_meram_cache[SH_MOBILE_MERAM_ICB_NUM];
};

int sh_mobile_meram_alloc_icb(const struct sh_mobile_meram_cfg *cfg,
		   int xres,
		   int yres,
		   unsigned int base_addr,
		   int yuv_mode,
		   int *marker_icb,
		   int *out_pitch);

void sh_mobile_meram_free_icb(int marker_icb);

#define SH_MOBILE_MERAM_START(ind, ab) \
	(0xC0000000 | ((ab & 0x1) << 23) | ((ind & 0x1F) << 24))

#endif /* !__sh_mobile_meram_h__ */
Loading