From: Marek Belisko <marek@goldelico.com>
To: tony@atomide.com, linux@arm.linux.org.uk, tomi.valkeinen@ti.com,
plagnioj@jcrosoft.com
Cc: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org,
neilb@suse.de, hns@goldelico.com,
Marek Belisko <marek@goldelico.com>
Subject: [PATCH 2/3] video: venc: Add new callback and handling for bypass and acbias setup.
Date: Mon, 14 Oct 2013 23:02:34 +0200 [thread overview]
Message-ID: <1381784555-18344-3-git-send-email-marek@goldelico.com> (raw)
In-Reply-To: <1381784555-18344-1-git-send-email-marek@goldelico.com>
Add new callback to set bypass and acbias. During venc enble disable those
bit are updated in devconf1 register.
Signed-off-by: Marek Belisko <marek@goldelico.com>
---
drivers/video/omap2/dss/venc.c | 21 +++++++++++++++++++++
include/video/omapdss.h | 2 ++
2 files changed, 23 insertions(+)
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
index 5f88ac4..17bd45b 100644
--- a/drivers/video/omap2/dss/venc.c
+++ b/drivers/video/omap2/dss/venc.c
@@ -34,6 +34,7 @@
#include <linux/platform_device.h>
#include <linux/regulator/consumer.h>
#include <linux/pm_runtime.h>
+#include <linux/omap-tvout.h>
#include <video/omapdss.h>
@@ -303,6 +304,8 @@ static struct {
struct omap_video_timings timings;
enum omap_dss_venc_type type;
bool invert_polarity;
+ bool bypass;
+ bool acbias;
struct omap_dss_device output;
} venc;
@@ -455,6 +458,9 @@ static int venc_power_on(struct omap_dss_device *dssdev)
venc_write_reg(VENC_OUTPUT_CONTROL, l);
+ /* apply bypass and acbias */
+ update_bypass_acbias(venc.bypass, venc.acbias);
+
dss_mgr_set_timings(mgr, &venc.timings);
r = regulator_enable(venc.vdda_dac_reg);
@@ -485,6 +491,9 @@ static void venc_power_off(struct omap_dss_device *dssdev)
venc_write_reg(VENC_OUTPUT_CONTROL, 0);
dss_set_dac_pwrdn_bgz(0);
+ /* clear bypass and acbias */
+ update_bypass_acbias(false, false);
+
dss_mgr_disable(mgr);
regulator_disable(venc.vdda_dac_reg);
@@ -629,6 +638,17 @@ static void venc_invert_vid_out_polarity(struct omap_dss_device *dssdev,
mutex_unlock(&venc.venc_lock);
}
+static void venc_bypass_and_acbias(struct omap_dss_device *dssdev,
+ bool bypass, bool acbias)
+{
+ mutex_lock(&venc.venc_lock);
+
+ venc.bypass = bypass;
+ venc.acbias = acbias;
+
+ mutex_unlock(&venc.venc_lock);
+}
+
static int venc_init_regulator(void)
{
struct regulator *vdda_dac;
@@ -777,6 +797,7 @@ static const struct omapdss_atv_ops venc_ops = {
.set_type = venc_set_type,
.invert_vid_out_polarity = venc_invert_vid_out_polarity,
+ .bypass_and_acbias = venc_bypass_and_acbias,
.set_wss = venc_set_wss,
.get_wss = venc_get_wss,
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index 3d7c51a..54a185f 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -607,6 +607,8 @@ struct omapdss_atv_ops {
enum omap_dss_venc_type type);
void (*invert_vid_out_polarity)(struct omap_dss_device *dssdev,
bool invert_polarity);
+ void (*bypass_and_acbias)(struct omap_dss_device *dssdev,
+ bool bypass, bool acbias);
int (*set_wss)(struct omap_dss_device *dssdev, u32 wss);
u32 (*get_wss)(struct omap_dss_device *dssdev);
--
1.8.1.2
next prev parent reply other threads:[~2013-10-14 21:03 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-14 21:02 [PATCH 0/3] omapdss: venc: Add support for bypass and acbias Marek Belisko
2013-10-14 21:02 ` [PATCH 1/3] arm: omap2: Export devconf1 " Marek Belisko
2013-11-11 16:49 ` Tony Lindgren
2013-11-11 22:00 ` Belisko Marek
2013-11-11 23:31 ` Tony Lindgren
2013-12-10 22:11 ` Belisko Marek
2013-12-10 22:46 ` Tony Lindgren
2013-12-12 8:31 ` Belisko Marek
2013-12-12 19:19 ` Tony Lindgren
2013-11-11 22:20 ` Belisko Marek
2013-11-11 23:34 ` Tony Lindgren
2013-10-14 21:02 ` Marek Belisko [this message]
2013-10-14 21:02 ` [PATCH 3/3] omapdss: Add OPA362 analog video amplifier driver Marek Belisko
2013-11-05 7:24 ` [PATCH 0/3] omapdss: venc: Add support for bypass and acbias Belisko Marek
2013-11-11 13:29 ` Tomi Valkeinen
2013-11-11 13:57 ` Dr. H. Nikolaus Schaller
2013-11-11 14:13 ` Tomi Valkeinen
2013-11-11 14:30 ` Dr. H. Nikolaus Schaller
2013-11-11 16:54 ` Tony Lindgren
2013-11-18 13:29 ` Tomi Valkeinen
2013-11-18 14:00 ` Dr. H. Nikolaus Schaller
2013-11-11 14:39 ` Dr. H. Nikolaus Schaller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1381784555-18344-3-git-send-email-marek@goldelico.com \
--to=marek@goldelico.com \
--cc=hns@goldelico.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=neilb@suse.de \
--cc=plagnioj@jcrosoft.com \
--cc=tomi.valkeinen@ti.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®