Exemple #1
0
static int s5ptvfb_release(struct fb_info *fb, int user)
{
/*
 * Following block is deleted for enabling multiple open of TV frame buffer
 *
 *	struct s5ptvfb_window *win = fb->par;
 */
	int ret;
	struct s5ptvfb_window *win = fb->par;

	s5ptvfb_release_window(fb);

/*
 * Following block is deleted for enabling multiple open of TV frame buffer
 *
 *	mutex_lock(&s5ptv_status.fb_lock);
 *	atomic_dec(&win->in_use);
 *	mutex_unlock(&s5ptv_status.fb_lock);
 */

	_s5p_vlayer_stop();
	_s5p_tv_if_stop();

	s5ptv_status.hdcp_en = false;

	s5ptv_status.tvout_output_enable = false;

	/*
	* drv. release
	*        - just check drv. state reg. or not.
	*/

	ret = s5p_tv_clk_gate(false);
	if (ret < 0) {
		printk(KERN_ERR "[Error]Cannot release\n");
		return -1;
	}
	tv_phy_power(false);

	mutex_lock(&s5ptv_status.fb_lock);
	atomic_dec(&win->in_use);
	mutex_unlock(&s5ptv_status.fb_lock);

	return 0;
}
Exemple #2
0
static int s5ptvfb_release(struct fb_info *fb, int user)
{
	int ret;
	struct s5ptvfb_window *win = fb->par;

	s5ptvfb_release_window(fb);

/*
 * Following block is deleted for enabling multiple open of TV frame buffer
 *
 *	mutex_lock(&g_s5ptv_status.fb_lock);
 *	atomic_dec(&win->in_use);
 *	mutex_unlock(&g_s5ptv_status.fb_lock);
 */

	s5p_vlayer_stop();
	s5p_tv_if_stop();

	g_s5ptv_status.hdcp_en = false;

	g_s5ptv_status.tvout_output_enable = false;

	/*
	* drv. release
	*        - just check drv. state reg. or not.
	*/

	ret = s5p_tv_base_clk_gate(false);
	if (ret < 0) {
		pr_err("%s::s5p_tv_base_clk_gate(false) fail\n",
			__func__);
		return -1;
	}
	s5p_tv_base_phy_power(false);

	mutex_lock(&g_s5ptv_status.fb_lock);
	atomic_dec(&win->in_use);
	mutex_unlock(&g_s5ptv_status.fb_lock);

	return 0;
}