All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: RE: [xen-unstable test] 5482: regressions - FAIL
From: Keir Fraser @ 2011-02-01 22:34 UTC (permalink / raw)
  To: Ian Jackson, Kay, Allen M; +Cc: xen-devel@lists.xensource.com
In-Reply-To: <19784.23263.850797.620012@mariner.uk.xensource.com>

On 01/02/2011 20:11, "Ian Jackson" <Ian.Jackson@eu.citrix.com> wrote:

> Kay, Allen M writes ("[Xen-devel] RE: [xen-unstable test] 5482: regressions -
> FAIL"):
>> Attached patch disables pci_vtd_quirk for 32-bit Xen since 32-bit xen does
>> not support MMCFG access.
> 
> Thanks, that looks like a plausible fix to me so I have applied it.
> That way we should avoid getting this failure in our tests again.
> 
> CC'd Keir in case he minds the #ifdef or has some other comment to
> make.

It'll do.

Acked-by: Keir Fraser <keir@xen.org>

 -- Keir

> Ian.

^ permalink raw reply

* Re: [PATCH 11/18] wl1251: configure hardware en-/decryption for monitor mode
From: Kalle Valo @ 2011-02-01 22:35 UTC (permalink / raw)
  To: David Gnedt
  Cc: John W. Linville, linux-wireless, Grazvydas Ignotas,
	Denis 'GNUtoo' Carikli
In-Reply-To: <4D473E9A.9050106@davizone.at>

David Gnedt <david.gnedt@davizone.at> writes:

> Am 2011-01-31 16:43, schrieb Kalle Valo:
>>> Disable hardware encryption (DF_ENCRYPTION_DISABLE) and decryption
>>> (DF_SNIFF_MODE_ENABLE) via wl1251_acx_feature_cfg while monitor interface is
>>> present.
>> 
>> Why? To be able to receive encrypted frames when associated or
>> something else?
>
> DF_SNIFF_MODE_ENABLE is set for receiving encrypted frames when associated.
> DF_ENCRYPTION_DISABLE is set to allow packet injection at all, as my testing
> showed that disabling encryption per-packet doesn't work.

But doesn't this break the case when you are connected to a network
with encryption and you have a separate monitor interface at the same
time? Or even worse, as Johannes pointed out, will the frames sent
unencrypted?

-- 
Kalle Valo

^ permalink raw reply

* Re: [PATCH][SVM] Fix 32bit Windows guest VMs save/restore
From: Keir Fraser @ 2011-02-01 22:35 UTC (permalink / raw)
  To: Wei Huang; +Cc: xen-devel@lists.xensource.com
In-Reply-To: <4D4875BD.5040706@amd.com>

Yeah, good. I'll double check it next week and apply it then for 4.1.x and
4.0.x.

 Thanks,
 Keir

On 01/02/2011 22:06, "Wei Huang" <wei.huang2@amd.com> wrote:

> How does this one look? It should address your concern about duplicating
> data in both vcpu and vmcb. I have tested it with both 32bit and 64bit
> Windows successfully.
> 
> -Wei
> 
> =================
> Fix 32bit guest VM save/restore issues associated with SYSENTER MSRs on
> AMD platforms.
> 
> This patch turn-on SYSENTER MSRs interception for 32bit guest VMs on AMD
> CPUs. With it, hvm_svm.guest_sysenter_xx fields always contain the
> canonical version of SYSENTER MSRs and are used in guest save/restore.
> The data fields in VMCB save area are updated as necessary.
> 
> Reported-by: James Harper <james.harper@bendigoit.com.au>
> Signed-off-by: Wei Huang <wei.huang2@amd.com>
> =================
> 

^ permalink raw reply

* Re: [PATCH 12/18] wl1251: set rate index and preamble flag on received packets
From: Kalle Valo @ 2011-02-01 22:36 UTC (permalink / raw)
  To: David Gnedt
  Cc: John W. Linville, linux-wireless, Grazvydas Ignotas,
	Denis 'GNUtoo' Carikli
In-Reply-To: <4D45A5E7.1040202@davizone.at>

David Gnedt <david.gnedt@davizone.at> writes:

> Set the rate index rate_idx and preamble flag RX_FLAG_SHORTPRE on received
> packets.
>
> Signed-off-by: David Gnedt <david.gnedt@davizone.at>

Acked-by: Kalle Valo <kvalo@adurom.com>

-- 
Kalle Valo

^ permalink raw reply

* + include-asm-generic-vmlinuxldsh-fix-__modver-section-warnings.patch added to -mm tree
From: akpm @ 2011-02-01 22:36 UTC (permalink / raw)
  To: mm-commits; +Cc: dtor, rusty


The patch titled
     include/asm-generic/vmlinux.lds.h: fix __modver section warnings
has been added to the -mm tree.  Its filename is
     include-asm-generic-vmlinuxldsh-fix-__modver-section-warnings.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: include/asm-generic/vmlinux.lds.h: fix __modver section warnings
From: Dmitry Torokhov <dtor@vmware.com>

current mainline, x86_64 allnoconfig:

ld: .tmp_vmlinux1: warning: allocated section `__modver' not in segment
ld: .tmp_vmlinux2: warning: allocated section `__modver' not in segment
ld: vmlinux: warning: allocated section `__modver' not in segment

Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/asm-generic/vmlinux.lds.h |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff -puN include/asm-generic/vmlinux.lds.h~include-asm-generic-vmlinuxldsh-fix-__modver-section-warnings include/asm-generic/vmlinux.lds.h
--- a/include/asm-generic/vmlinux.lds.h~include-asm-generic-vmlinuxldsh-fix-__modver-section-warnings
+++ a/include/asm-generic/vmlinux.lds.h
@@ -359,18 +359,18 @@
 		MEM_KEEP(exit.rodata)					\
 	}								\
 									\
-	/* Built-in module parameters. */				\
-	__param : AT(ADDR(__param) - LOAD_OFFSET) {			\
-		VMLINUX_SYMBOL(__start___param) = .;			\
-		*(__param)						\
-		VMLINUX_SYMBOL(__stop___param) = .;			\
-	}								\
-									\
 	/* Built-in module versions. */					\
 	__modver : AT(ADDR(__modver) - LOAD_OFFSET) {			\
 		VMLINUX_SYMBOL(__start___modver) = .;			\
 		*(__modver)						\
 		VMLINUX_SYMBOL(__stop___modver) = .;			\
+	}								\
+									\
+	/* Built-in module parameters. */				\
+	__param : AT(ADDR(__param) - LOAD_OFFSET) {			\
+		VMLINUX_SYMBOL(__start___param) = .;			\
+		*(__param)						\
+		VMLINUX_SYMBOL(__stop___param) = .;			\
 		. = ALIGN((align));					\
 		VMLINUX_SYMBOL(__end_rodata) = .;			\
 	}								\
_

Patches currently in -mm which might be from dtor@vmware.com are

include-asm-generic-vmlinuxldsh-fix-__modver-section-warnings.patch


^ permalink raw reply

* Re: moving to a git-backed wiki
From: Jay Soffian @ 2011-02-01 22:36 UTC (permalink / raw)
  To: Jeff King; +Cc: Scott Chacon, Junio C Hamano, git
In-Reply-To: <20110201201144.GA16003@sigill.intra.peff.net>

On Tue, Feb 1, 2011 at 3:11 PM, Jeff King <peff@peff.net> wrote:
>  https://github.com/peff/foo/wiki

A git-backed git wiki would be great. As a related matter, the hosting
infrastructure for https://git.wiki.kernel.org/index.php/Main_Page
seems overloaded. About half the time I try to access it, it's either
down completely or very slow to respond. If the wiki were git-backed I
could get to it even if the central site were down. :-)

That said, didn't the wiki just migrate to Mediawiki recently?

j.

^ permalink raw reply

* Re: [Qemu-devel] [RFC][PATCH v6 00/23] virtagent: host/guest RPC communication agent
From: Michael Roth @ 2011-02-01 22:18 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: agl, stefanha, markus_mueller, marcel.mittelstaedt, qemu-devel,
	Jes.Sorensen, Anthony Liguori, ryanh, alevy, abeekhof
In-Reply-To: <4D46CA2D.5050807@linux.vnet.ibm.com>

On 01/31/2011 08:41 AM, Michael Roth wrote:
> On 01/18/2011 08:13 AM, Anthony Liguori wrote:
>> On 01/18/2011 08:02 AM, Gerd Hoffmann wrote:
>>> On 01/17/11 15:53, Michael Roth wrote:
>>>> On 01/17/2011 07:53 AM, Gerd Hoffmann wrote:
>>>>> What is your plan to handle system-level queries+actions (such as
>>>>> reboot) vs. per-user stuff (such as cut+paste)?
>>>
>>> One option would be to have two virtio-serial channels, one for the
>>> system and one for the user stuff. gdm could grant the desktop user
>>> access to the user channel like it does with sound devices and simliar
>>> stuff, so the user agent has access to it.
>>>
>>> Another option is to have some socket where the user agent can talk to
>>> the system agent and have it relay the requests.
>>
>> I think this is the best approach. One requirement we've been working
>> with is that all actions from guest agents are logged. This is to give
>> an administrator confidence that the hypervisor isn't doing anything
>> stupid. If you route all of the user traffic through a privileged
>> daemon, you can log everything to syslog or an appropriate log file.
>>
>
> A brain-dump on how we're planning to do this. I tried to keep it
> concise, but that only went so far :)
>
> We extend qemu-va, the virtagent guest agent, to be able to create a
> unix socket in the guest that listens for connections.
>
> We also extend qemu-va so that it can run as a user-level daemon that
> can connect to the aforementioned socket.
>
> root: qemu-va -c virtio-serial -p /dev/virtio-ports/org.qemu.virtagent
> --user-socket=/var/run/virtagent.user.sock
>
> user: qemu-va -c unix-connect -p /var/run/virtagent.user.sock
> [--username=user] --user-daemon
>
> The user-level daemon will drop priviledges to specified username if
> necessary, or run as the invoking user. User->daemon mappings will be
> determined by the system-level agent using getsockopt on new connections.
>
> The user-level daemon operates in the same manner as the system-level
> daemon: it can execute RPCs in the host, and the host can execute RPCs
> it implements. This should theoretically make it capable of vdagent-like
> functionality by adding the appropriate host/guest-side RPCs. We would
> have to incorporate the X11 fd into the main select() for events and
> such, but that should be fairly straight-forward.
>
> User-specific host->guest RPCs will add an http header,
> "X-Virtagent-Username", specifying the intended recipient. If that
> recipient has no associated running user-level daemon, an error will be
> returned by the system-level daemon. An RPC may be provided so the host
> can query the system-level agent for connected users.
>
> User-generated guest->host RPCs will be routed directly to the host,
> with the same "X-Virtagent-Username" http header inserted by the
> system-level agent. The host will re-insert this header field in it's
> responses so the system-level agent can route the responses back to the
> user.
>
> We will only allow one daemon per user at a time, and enforce this with
> a pid/lock file. If this is circumvented somehow (or we allow a
> user-specifiable pid file), a new connection specifying a user that's
> already been mapped to a user-level daemon will overwrite the existing
> mapping, and the old connection will be closed by the system-level
> daemon if it is still active.
>
> Some caveats to consider however:
>
> 1) There may be user-level RPCs that are generally desirable...such as
> being able to execute a script as an unpriveledged user, or access a
> file in the same way. So it makes sense to invoke user-level agent
> startup with a login script. But for X-related things like Spice, an
> .xsession hook makes more sense. If we do both, the .xsession-spawned
> daemon will "take over", but any existing stateful interactions with
> that user will be effectively reset. This may be undesirable. One option
> is to XOpenDisplay() "on demand", rather than at startup. We won't know
> what $env{DISPLAY} is then, however, and there could be multiple
> displays for that user. I'm not sure if there's a reliable way to query
> such a thing, but assuming you can...we could implement stateful RPCs so
> establish a connection later: There could be multiple displays as well.
> My first inclination would be to have something like:
>
> on host:
> query_displays(user)
> connect_display(user, display_name)
> query_screens(user, display_name)
> etc..
>
> This requires either the host to poll for displays, or for the guest
> agent to do it and then notify the host, however. The only way I see
> around this is to only start the user-level daemon via .xsession or
> similar.

Any thoughts on this?

I'd like to move forward with this approach, but with the goal here 
being that we have one agent to rule them all, I'd like to know whether 
those of you involved with the spice vdagent work think this is a 
reasonable approach.

One thing that would be really useful is if we could outline the basic 
host->guest calls, and guest->host calls, and see how they fit into the 
proposed architecture. I've been looking at vdagent to get an idea, but 
due to the limitations noted above there are some changes that would to 
made in how we identify, and be notified of, new X displays if we have a 
single per-user daemon that is started *before* the X display, and 
persists after the X display is shut down. I can take an initial stab at 
this, but have some questions:

Can spice do anything useful with more than 1 display per user?

If so, should the agent report new displays to the host? Or should the 
host query for available displays for a particular user, then instruct 
the agent about what display it wants the agent to connect to? What 
about when a display is closed?

Thanks,

Mike

^ permalink raw reply

* TSC Decisions
From: Graeme Gregory @ 2011-02-01 22:37 UTC (permalink / raw)
  To: openembedded-devel, openembedded-members

There are at least 3 board members (Philip, Florian, Graeme) at FOSDEM
which is enough to have a meeting and finalise the interim TSC decision.
So expect an answer on these issues after FOSDEM.

Graeme




^ permalink raw reply

* Re: [1.8.0] make two-argument fetch update remote branches
From: Thomas Rast @ 2011-02-01 22:39 UTC (permalink / raw)
  To: A Large Angry SCM; +Cc: Junio C Hamano, git
In-Reply-To: <4D4875B2.4070008@gmail.com>

A Large Angry SCM wrote:
> On 01/31/2011 04:44 PM, Thomas Rast wrote:
> >
> > Since the remote branches in some sense reflect the "last known state"
> > of the remote, it would make sense to also update them to whatever a
> > two-argument fetch got.
> 
> If this is proposing to break:
> 
> 	get-fetch ${REPO} ${SRC_REF}:${DST_REF}
> 
> then I am against this since that form _is_ used and *is* plumbing.

You're mixing up the two proposals.  This one is to teach

  git fetch repo foo

to update refs/remotes/repo/foo with the new value (maybe we should
also have it update in the foo:bar case, but I haven't thought that
through).

The other one is to forbid 'git pull repo foo:bar' and would not
change git-fetch at all.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

^ permalink raw reply

* [PATCH 1/9 v2] ds3000: fill in demod init function
From: Igor M. Liplianin @ 2011-02-01 22:40 UTC (permalink / raw)
  To: mchehab, linux-media

Make some initializations in init, not in tune function

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
---
 drivers/media/dvb/frontends/ds3000.c |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c
index 125dfad..4773916 100644
--- a/drivers/media/dvb/frontends/ds3000.c
+++ b/drivers/media/dvb/frontends/ds3000.c
@@ -1092,10 +1092,6 @@ static int ds3000_tune(struct dvb_frontend *fe,
 		/* Reset status register */
 		status = 0;
 		/* Tune */
-		/* TS2020 init */
-		ds3000_tuner_writereg(state, 0x42, 0x73);
-		ds3000_tuner_writereg(state, 0x05, 0x01);
-		ds3000_tuner_writereg(state, 0x62, 0xf5);
 		/* unknown */
 		ds3000_tuner_writereg(state, 0x07, 0x02);
 		ds3000_tuner_writereg(state, 0x10, 0x00);
@@ -1345,7 +1341,19 @@ static enum dvbfe_algo ds3000_get_algo(struct dvb_frontend *fe)
  */
 static int ds3000_initfe(struct dvb_frontend *fe)
 {
+	struct ds3000_state *state = fe->demodulator_priv;
+	int ret;
+
 	dprintk("%s()\n", __func__);
+	/* hard reset */
+	ds3000_writereg(state, 0x08, 0x01 | ds3000_readreg(state, 0x08));
+	msleep(1);
+
+	/* TS2020 init */
+	ds3000_tuner_writereg(state, 0x42, 0x73);
+	ds3000_tuner_writereg(state, 0x05, 0x01);
+	ds3000_tuner_writereg(state, 0x62, 0xf5);
+
 	return 0;
 }
 
-- 
1.7.1


^ permalink raw reply related

* [PATCH 2/9 v2] ds3000: decrease mpeg clock output
From: Igor M. Liplianin @ 2011-02-01 22:40 UTC (permalink / raw)
  To: mchehab, linux-media

TeVii s480 works fine with that on DVB-S2 channels

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
---
 drivers/media/dvb/frontends/ds3000.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c
index 4773916..b20005c 100644
--- a/drivers/media/dvb/frontends/ds3000.c
+++ b/drivers/media/dvb/frontends/ds3000.c
@@ -1230,7 +1230,7 @@ static int ds3000_tune(struct dvb_frontend *fe,
 				ds3000_writereg(state,
 					ds3000_dvbs2_init_tab[i],
 					ds3000_dvbs2_init_tab[i + 1]);
-			ds3000_writereg(state, 0xfe, 0x54);
+			ds3000_writereg(state, 0xfe, 0x98);
 			break;
 		default:
 			return 1;
-- 
1.7.1


^ permalink raw reply related

* [PATCH 3/9 v2] ds3000: loading firmware in bigger chunks
From: Igor M. Liplianin @ 2011-02-01 22:40 UTC (permalink / raw)
  To: mchehab, linux-media

Decrease firmware loading time. Before it is ~4000 i2c calls,
now it is ~256 i2c calls to load ds3000 firmware.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
---
 drivers/media/dvb/frontends/ds3000.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c
index b20005c..02ba759 100644
--- a/drivers/media/dvb/frontends/ds3000.c
+++ b/drivers/media/dvb/frontends/ds3000.c
@@ -305,7 +305,7 @@ static int ds3000_writeFW(struct ds3000_state *state, int reg,
 	struct i2c_msg msg;
 	u8 *buf;
 
-	buf = kmalloc(3, GFP_KERNEL);
+	buf = kmalloc(33, GFP_KERNEL);
 	if (buf == NULL) {
 		printk(KERN_ERR "Unable to kmalloc\n");
 		ret = -ENOMEM;
@@ -317,10 +317,10 @@ static int ds3000_writeFW(struct ds3000_state *state, int reg,
 	msg.addr = state->config->demod_address;
 	msg.flags = 0;
 	msg.buf = buf;
-	msg.len = 3;
+	msg.len = 33;
 
-	for (i = 0; i < len; i += 2) {
-		memcpy(buf + 1, data + i, 2);
+	for (i = 0; i < len; i += 32) {
+		memcpy(buf + 1, data + i, 32);
 
 		dprintk("%s: write reg 0x%02x, len = %d\n", __func__, reg, len);
 
-- 
1.7.1


^ permalink raw reply related

* [Bug 15220] Kernel freezes when playing DVB stream and having 3D acceleration in the same time
From: bugzilla-daemon @ 2011-02-01 22:41 UTC (permalink / raw)
  To: dri-devel
In-Reply-To: <bug-15220-2300@https.bugzilla.kernel.org/>

https://bugzilla.kernel.org/show_bug.cgi?id=15220


Cijoml Cijomlovic Cijomlov <cijoml@volny.cz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |CLOSED
         Resolution|                            |CODE_FIX




--- Comment #7 from Cijoml Cijomlovic Cijomlov <cijoml@volny.cz>  2011-02-01 22:40:43 ---
nope it works with Vanilla 2.6.37.

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

^ permalink raw reply

* [PATCH 5/9 v2] ds3000: clean up in tune procedure
From: Igor M. Liplianin @ 2011-02-01 22:40 UTC (permalink / raw)
  To: mchehab, linux-media

Variable 'retune' does not make sense.
Loop is not needed for only one try.
Remove unnecessary dprintk's.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
---
 drivers/media/dvb/frontends/ds3000.c |  442 +++++++++++++++++-----------------
 1 files changed, 216 insertions(+), 226 deletions(-)

diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c
index 3373890..7c61936 100644
--- a/drivers/media/dvb/frontends/ds3000.c
+++ b/drivers/media/dvb/frontends/ds3000.c
@@ -1049,7 +1049,7 @@ static int ds3000_tune(struct dvb_frontend *fe,
 	struct ds3000_state *state = fe->demodulator_priv;
 	struct dtv_frontend_properties *c = &fe->dtv_property_cache;
 
-	int ret = 0, retune, i;
+	int ret = 0, i;
 	u8 status, mlpf, mlpf_new, mlpf_max, mlpf_min, nlpf;
 	u16 value, ndiv;
 	u32 f3db;
@@ -1072,249 +1072,239 @@ static int ds3000_tune(struct dvb_frontend *fe,
 	/* discard the 'current' tuning parameters and prepare to tune */
 	ds3000_clone_params(fe);
 
-	retune = 1;	/* try 1 times */
-	dprintk("%s:   retune = %d\n", __func__, retune);
-	dprintk("%s:   frequency   = %d\n", __func__, state->dcur.frequency);
-	dprintk("%s:   symbol_rate = %d\n", __func__, state->dcur.symbol_rate);
-	dprintk("%s:   FEC	 = %d \n", __func__,
-		state->dcur.fec);
-	dprintk("%s:   Inversion   = %d\n", __func__, state->dcur.inversion);
-
-	do {
-		/* Reset status register */
-		status = 0;
-		/* Tune */
-		/* unknown */
-		ds3000_tuner_writereg(state, 0x07, 0x02);
-		ds3000_tuner_writereg(state, 0x10, 0x00);
-		ds3000_tuner_writereg(state, 0x60, 0x79);
-		ds3000_tuner_writereg(state, 0x08, 0x01);
-		ds3000_tuner_writereg(state, 0x00, 0x01);
-		/* calculate and set freq divider */
-		if (state->dcur.frequency < 1146000) {
-			ds3000_tuner_writereg(state, 0x10, 0x11);
-			ndiv = ((state->dcur.frequency * (6 + 8) * 4) +
-					(DS3000_XTAL_FREQ / 2)) /
-					DS3000_XTAL_FREQ - 1024;
-		} else {
-			ds3000_tuner_writereg(state, 0x10, 0x01);
-			ndiv = ((state->dcur.frequency * (6 + 8) * 2) +
-					(DS3000_XTAL_FREQ / 2)) /
-					DS3000_XTAL_FREQ - 1024;
-		}
+	/* Reset status register */
+	status = 0;
+	/* Tune */
+	/* unknown */
+	ds3000_tuner_writereg(state, 0x07, 0x02);
+	ds3000_tuner_writereg(state, 0x10, 0x00);
+	ds3000_tuner_writereg(state, 0x60, 0x79);
+	ds3000_tuner_writereg(state, 0x08, 0x01);
+	ds3000_tuner_writereg(state, 0x00, 0x01);
+	/* calculate and set freq divider */
+	if (state->dcur.frequency < 1146000) {
+		ds3000_tuner_writereg(state, 0x10, 0x11);
+		ndiv = ((state->dcur.frequency * (6 + 8) * 4) +
+				(DS3000_XTAL_FREQ / 2)) /
+				DS3000_XTAL_FREQ - 1024;
+	} else {
+		ds3000_tuner_writereg(state, 0x10, 0x01);
+		ndiv = ((state->dcur.frequency * (6 + 8) * 2) +
+				(DS3000_XTAL_FREQ / 2)) /
+				DS3000_XTAL_FREQ - 1024;
+	}
 
-		ds3000_tuner_writereg(state, 0x01, (ndiv & 0x0f00) >> 8);
-		ds3000_tuner_writereg(state, 0x02, ndiv & 0x00ff);
-
-		/* set pll */
-		ds3000_tuner_writereg(state, 0x03, 0x06);
-		ds3000_tuner_writereg(state, 0x51, 0x0f);
-		ds3000_tuner_writereg(state, 0x51, 0x1f);
-		ds3000_tuner_writereg(state, 0x50, 0x10);
-		ds3000_tuner_writereg(state, 0x50, 0x00);
-		msleep(5);
-
-		/* unknown */
-		ds3000_tuner_writereg(state, 0x51, 0x17);
-		ds3000_tuner_writereg(state, 0x51, 0x1f);
-		ds3000_tuner_writereg(state, 0x50, 0x08);
-		ds3000_tuner_writereg(state, 0x50, 0x00);
-		msleep(5);
-
-		value = ds3000_tuner_readreg(state, 0x3d);
-		value &= 0x0f;
-		if ((value > 4) && (value < 15)) {
-			value -= 3;
-			if (value < 4)
-				value = 4;
-			value = ((value << 3) | 0x01) & 0x79;
-		}
+	ds3000_tuner_writereg(state, 0x01, (ndiv & 0x0f00) >> 8);
+	ds3000_tuner_writereg(state, 0x02, ndiv & 0x00ff);
+
+	/* set pll */
+	ds3000_tuner_writereg(state, 0x03, 0x06);
+	ds3000_tuner_writereg(state, 0x51, 0x0f);
+	ds3000_tuner_writereg(state, 0x51, 0x1f);
+	ds3000_tuner_writereg(state, 0x50, 0x10);
+	ds3000_tuner_writereg(state, 0x50, 0x00);
+	msleep(5);
+
+	/* unknown */
+	ds3000_tuner_writereg(state, 0x51, 0x17);
+	ds3000_tuner_writereg(state, 0x51, 0x1f);
+	ds3000_tuner_writereg(state, 0x50, 0x08);
+	ds3000_tuner_writereg(state, 0x50, 0x00);
+	msleep(5);
+
+	value = ds3000_tuner_readreg(state, 0x3d);
+	value &= 0x0f;
+	if ((value > 4) && (value < 15)) {
+		value -= 3;
+		if (value < 4)
+			value = 4;
+		value = ((value << 3) | 0x01) & 0x79;
+	}
 
-		ds3000_tuner_writereg(state, 0x60, value);
-		ds3000_tuner_writereg(state, 0x51, 0x17);
-		ds3000_tuner_writereg(state, 0x51, 0x1f);
-		ds3000_tuner_writereg(state, 0x50, 0x08);
-		ds3000_tuner_writereg(state, 0x50, 0x00);
-
-		/* set low-pass filter period */
-		ds3000_tuner_writereg(state, 0x04, 0x2e);
-		ds3000_tuner_writereg(state, 0x51, 0x1b);
-		ds3000_tuner_writereg(state, 0x51, 0x1f);
-		ds3000_tuner_writereg(state, 0x50, 0x04);
-		ds3000_tuner_writereg(state, 0x50, 0x00);
-		msleep(5);
-
-		f3db = ((state->dcur.symbol_rate / 1000) << 2) / 5 + 2000;
-		if ((state->dcur.symbol_rate / 1000) < 5000)
-			f3db += 3000;
-		if (f3db < 7000)
-			f3db = 7000;
-		if (f3db > 40000)
-			f3db = 40000;
-
-		/* set low-pass filter baseband */
-		value = ds3000_tuner_readreg(state, 0x26);
-		mlpf = 0x2e * 207 / ((value << 1) + 151);
-		mlpf_max = mlpf * 135 / 100;
-		mlpf_min = mlpf * 78 / 100;
-		if (mlpf_max > 63)
-			mlpf_max = 63;
-
-		/* rounded to the closest integer */
-		nlpf = ((mlpf * f3db * 1000) + (2766 * DS3000_XTAL_FREQ / 2))
-				/ (2766 * DS3000_XTAL_FREQ);
-		if (nlpf > 23)
-			nlpf = 23;
-		if (nlpf < 1)
-			nlpf = 1;
-
-		/* rounded to the closest integer */
+	ds3000_tuner_writereg(state, 0x60, value);
+	ds3000_tuner_writereg(state, 0x51, 0x17);
+	ds3000_tuner_writereg(state, 0x51, 0x1f);
+	ds3000_tuner_writereg(state, 0x50, 0x08);
+	ds3000_tuner_writereg(state, 0x50, 0x00);
+
+	/* set low-pass filter period */
+	ds3000_tuner_writereg(state, 0x04, 0x2e);
+	ds3000_tuner_writereg(state, 0x51, 0x1b);
+	ds3000_tuner_writereg(state, 0x51, 0x1f);
+	ds3000_tuner_writereg(state, 0x50, 0x04);
+	ds3000_tuner_writereg(state, 0x50, 0x00);
+	msleep(5);
+
+	f3db = ((state->dcur.symbol_rate / 1000) << 2) / 5 + 2000;
+	if ((state->dcur.symbol_rate / 1000) < 5000)
+		f3db += 3000;
+	if (f3db < 7000)
+		f3db = 7000;
+	if (f3db > 40000)
+		f3db = 40000;
+
+	/* set low-pass filter baseband */
+	value = ds3000_tuner_readreg(state, 0x26);
+	mlpf = 0x2e * 207 / ((value << 1) + 151);
+	mlpf_max = mlpf * 135 / 100;
+	mlpf_min = mlpf * 78 / 100;
+	if (mlpf_max > 63)
+		mlpf_max = 63;
+
+	/* rounded to the closest integer */
+	nlpf = ((mlpf * f3db * 1000) + (2766 * DS3000_XTAL_FREQ / 2))
+			/ (2766 * DS3000_XTAL_FREQ);
+	if (nlpf > 23)
+		nlpf = 23;
+	if (nlpf < 1)
+		nlpf = 1;
+
+	/* rounded to the closest integer */
+	mlpf_new = ((DS3000_XTAL_FREQ * nlpf * 2766) +
+			(1000 * f3db / 2)) / (1000 * f3db);
+
+	if (mlpf_new < mlpf_min) {
+		nlpf++;
 		mlpf_new = ((DS3000_XTAL_FREQ * nlpf * 2766) +
 				(1000 * f3db / 2)) / (1000 * f3db);
+	}
 
-		if (mlpf_new < mlpf_min) {
-			nlpf++;
-			mlpf_new = ((DS3000_XTAL_FREQ * nlpf * 2766) +
-					(1000 * f3db / 2)) / (1000 * f3db);
-		}
+	if (mlpf_new > mlpf_max)
+		mlpf_new = mlpf_max;
+
+	ds3000_tuner_writereg(state, 0x04, mlpf_new);
+	ds3000_tuner_writereg(state, 0x06, nlpf);
+	ds3000_tuner_writereg(state, 0x51, 0x1b);
+	ds3000_tuner_writereg(state, 0x51, 0x1f);
+	ds3000_tuner_writereg(state, 0x50, 0x04);
+	ds3000_tuner_writereg(state, 0x50, 0x00);
+	msleep(5);
+
+	/* unknown */
+	ds3000_tuner_writereg(state, 0x51, 0x1e);
+	ds3000_tuner_writereg(state, 0x51, 0x1f);
+	ds3000_tuner_writereg(state, 0x50, 0x01);
+	ds3000_tuner_writereg(state, 0x50, 0x00);
+	msleep(60);
+
+	/* ds3000 global reset */
+	ds3000_writereg(state, 0x07, 0x80);
+	ds3000_writereg(state, 0x07, 0x00);
+	/* ds3000 build-in uC reset */
+	ds3000_writereg(state, 0xb2, 0x01);
+	/* ds3000 software reset */
+	ds3000_writereg(state, 0x00, 0x01);
+
+	switch (c->delivery_system) {
+	case SYS_DVBS:
+		/* initialise the demod in DVB-S mode */
+		for (i = 0; i < sizeof(ds3000_dvbs_init_tab); i += 2)
+			ds3000_writereg(state,
+				ds3000_dvbs_init_tab[i],
+				ds3000_dvbs_init_tab[i + 1]);
+		value = ds3000_readreg(state, 0xfe);
+		value &= 0xc0;
+		value |= 0x1b;
+		ds3000_writereg(state, 0xfe, value);
+		break;
+	case SYS_DVBS2:
+		/* initialise the demod in DVB-S2 mode */
+		for (i = 0; i < sizeof(ds3000_dvbs2_init_tab); i += 2)
+			ds3000_writereg(state,
+				ds3000_dvbs2_init_tab[i],
+				ds3000_dvbs2_init_tab[i + 1]);
+		ds3000_writereg(state, 0xfe, 0x98);
+		break;
+	default:
+		return 1;
+	}
 
-		if (mlpf_new > mlpf_max)
-			mlpf_new = mlpf_max;
-
-		ds3000_tuner_writereg(state, 0x04, mlpf_new);
-		ds3000_tuner_writereg(state, 0x06, nlpf);
-		ds3000_tuner_writereg(state, 0x51, 0x1b);
-		ds3000_tuner_writereg(state, 0x51, 0x1f);
-		ds3000_tuner_writereg(state, 0x50, 0x04);
-		ds3000_tuner_writereg(state, 0x50, 0x00);
-		msleep(5);
-
-		/* unknown */
-		ds3000_tuner_writereg(state, 0x51, 0x1e);
-		ds3000_tuner_writereg(state, 0x51, 0x1f);
-		ds3000_tuner_writereg(state, 0x50, 0x01);
-		ds3000_tuner_writereg(state, 0x50, 0x00);
-		msleep(60);
-
-		/* ds3000 global reset */
-		ds3000_writereg(state, 0x07, 0x80);
-		ds3000_writereg(state, 0x07, 0x00);
-		/* ds3000 build-in uC reset */
-		ds3000_writereg(state, 0xb2, 0x01);
-		/* ds3000 software reset */
-		ds3000_writereg(state, 0x00, 0x01);
+	/* enable 27MHz clock output */
+	ds3000_writereg(state, 0x29, 0x80);
+	/* enable ac coupling */
+	ds3000_writereg(state, 0x25, 0x8a);
+
+	/* enhance symbol rate performance */
+	if ((state->dcur.symbol_rate / 1000) <= 5000) {
+		value = 29777 / (state->dcur.symbol_rate / 1000) + 1;
+		if (value % 2 != 0)
+			value++;
+		ds3000_writereg(state, 0xc3, 0x0d);
+		ds3000_writereg(state, 0xc8, value);
+		ds3000_writereg(state, 0xc4, 0x10);
+		ds3000_writereg(state, 0xc7, 0x0e);
+	} else if ((state->dcur.symbol_rate / 1000) <= 10000) {
+		value = 92166 / (state->dcur.symbol_rate / 1000) + 1;
+		if (value % 2 != 0)
+			value++;
+		ds3000_writereg(state, 0xc3, 0x07);
+		ds3000_writereg(state, 0xc8, value);
+		ds3000_writereg(state, 0xc4, 0x09);
+		ds3000_writereg(state, 0xc7, 0x12);
+	} else if ((state->dcur.symbol_rate / 1000) <= 20000) {
+		value = 64516 / (state->dcur.symbol_rate / 1000) + 1;
+		ds3000_writereg(state, 0xc3, value);
+		ds3000_writereg(state, 0xc8, 0x0e);
+		ds3000_writereg(state, 0xc4, 0x07);
+		ds3000_writereg(state, 0xc7, 0x18);
+	} else {
+		value = 129032 / (state->dcur.symbol_rate / 1000) + 1;
+		ds3000_writereg(state, 0xc3, value);
+		ds3000_writereg(state, 0xc8, 0x0a);
+		ds3000_writereg(state, 0xc4, 0x05);
+		ds3000_writereg(state, 0xc7, 0x24);
+	}
+
+	/* normalized symbol rate rounded to the closest integer */
+	value = (((state->dcur.symbol_rate / 1000) << 16) +
+			(DS3000_SAMPLE_RATE / 2)) / DS3000_SAMPLE_RATE;
+	ds3000_writereg(state, 0x61, value & 0x00ff);
+	ds3000_writereg(state, 0x62, (value & 0xff00) >> 8);
+
+	/* co-channel interference cancellation disabled */
+	ds3000_writereg(state, 0x56, 0x00);
+
+	/* equalizer disabled */
+	ds3000_writereg(state, 0x76, 0x00);
+
+	/*ds3000_writereg(state, 0x08, 0x03);
+	ds3000_writereg(state, 0xfd, 0x22);
+	ds3000_writereg(state, 0x08, 0x07);
+	ds3000_writereg(state, 0xfd, 0x42);
+	ds3000_writereg(state, 0x08, 0x07);*/
 
+	if (state->config->ci_mode) {
 		switch (c->delivery_system) {
 		case SYS_DVBS:
-			/* initialise the demod in DVB-S mode */
-			for (i = 0; i < sizeof(ds3000_dvbs_init_tab); i += 2)
-				ds3000_writereg(state,
-					ds3000_dvbs_init_tab[i],
-					ds3000_dvbs_init_tab[i + 1]);
-			value = ds3000_readreg(state, 0xfe);
-			value &= 0xc0;
-			value |= 0x1b;
-			ds3000_writereg(state, 0xfe, value);
-			break;
+		default:
+			ds3000_writereg(state, 0xfd, 0x80);
+		break;
 		case SYS_DVBS2:
-			/* initialise the demod in DVB-S2 mode */
-			for (i = 0; i < sizeof(ds3000_dvbs2_init_tab); i += 2)
-				ds3000_writereg(state,
-					ds3000_dvbs2_init_tab[i],
-					ds3000_dvbs2_init_tab[i + 1]);
-			ds3000_writereg(state, 0xfe, 0x98);
+			ds3000_writereg(state, 0xfd, 0x01);
 			break;
-		default:
-			return 1;
 		}
+	}
 
-		/* enable 27MHz clock output */
-		ds3000_writereg(state, 0x29, 0x80);
-		/* enable ac coupling */
-		ds3000_writereg(state, 0x25, 0x8a);
-
-		/* enhance symbol rate performance */
-		if ((state->dcur.symbol_rate / 1000) <= 5000) {
-			value = 29777 / (state->dcur.symbol_rate / 1000) + 1;
-			if (value % 2 != 0)
-				value++;
-			ds3000_writereg(state, 0xc3, 0x0d);
-			ds3000_writereg(state, 0xc8, value);
-			ds3000_writereg(state, 0xc4, 0x10);
-			ds3000_writereg(state, 0xc7, 0x0e);
-		} else if ((state->dcur.symbol_rate / 1000) <= 10000) {
-			value = 92166 / (state->dcur.symbol_rate / 1000) + 1;
-			if (value % 2 != 0)
-				value++;
-			ds3000_writereg(state, 0xc3, 0x07);
-			ds3000_writereg(state, 0xc8, value);
-			ds3000_writereg(state, 0xc4, 0x09);
-			ds3000_writereg(state, 0xc7, 0x12);
-		} else if ((state->dcur.symbol_rate / 1000) <= 20000) {
-			value = 64516 / (state->dcur.symbol_rate / 1000) + 1;
-			ds3000_writereg(state, 0xc3, value);
-			ds3000_writereg(state, 0xc8, 0x0e);
-			ds3000_writereg(state, 0xc4, 0x07);
-			ds3000_writereg(state, 0xc7, 0x18);
-		} else {
-			value = 129032 / (state->dcur.symbol_rate / 1000) + 1;
-			ds3000_writereg(state, 0xc3, value);
-			ds3000_writereg(state, 0xc8, 0x0a);
-			ds3000_writereg(state, 0xc4, 0x05);
-			ds3000_writereg(state, 0xc7, 0x24);
-		}
+	/* ds3000 out of software reset */
+	ds3000_writereg(state, 0x00, 0x00);
+	/* start ds3000 build-in uC */
+	ds3000_writereg(state, 0xb2, 0x00);
 
-		/* normalized symbol rate rounded to the closest integer */
-		value = (((state->dcur.symbol_rate / 1000) << 16) +
-				(DS3000_SAMPLE_RATE / 2)) / DS3000_SAMPLE_RATE;
-		ds3000_writereg(state, 0x61, value & 0x00ff);
-		ds3000_writereg(state, 0x62, (value & 0xff00) >> 8);
-
-		/* co-channel interference cancellation disabled */
-		ds3000_writereg(state, 0x56, 0x00);
-
-		/* equalizer disabled */
-		ds3000_writereg(state, 0x76, 0x00);
-
-		/*ds3000_writereg(state, 0x08, 0x03);
-		ds3000_writereg(state, 0xfd, 0x22);
-		ds3000_writereg(state, 0x08, 0x07);
-		ds3000_writereg(state, 0xfd, 0x42);
-		ds3000_writereg(state, 0x08, 0x07);*/
-
-		if (state->config->ci_mode) {
-			switch (c->delivery_system) {
-			case SYS_DVBS:
-			default:
-				ds3000_writereg(state, 0xfd, 0x80);
-			break;
-			case SYS_DVBS2:
-				ds3000_writereg(state, 0xfd, 0x01);
-				break;
-			}
-		}
+	/* TODO: calculate and set carrier offset */
 
-		/* ds3000 out of software reset */
-		ds3000_writereg(state, 0x00, 0x00);
-		/* start ds3000 build-in uC */
-		ds3000_writereg(state, 0xb2, 0x00);
-
-		/* TODO: calculate and set carrier offset */
-
-		/* wait before retrying */
-		for (i = 0; i < 30 ; i++) {
-			if (ds3000_is_tuned(fe)) {
-				dprintk("%s: Tuned\n", __func__);
-				ds3000_dump_registers(fe);
-				goto tuned;
-			}
-			msleep(1);
+	/* wait before retrying */
+	for (i = 0; i < 30 ; i++) {
+		if (ds3000_is_tuned(fe)) {
+			dprintk("%s: Tuned\n", __func__);
+			ds3000_dump_registers(fe);
+			goto tuned;
 		}
+		msleep(1);
+	}
 
-		dprintk("%s: Not tuned\n", __func__);
-		ds3000_dump_registers(fe);
+	dprintk("%s: Not tuned\n", __func__);
+	ds3000_dump_registers(fe);
 
-	} while (--retune);
 
 tuned:
 	return ret;
-- 
1.7.1


^ permalink raw reply related

* [PATCH 4/9 v2] ds3000: loading firmware during demod init
From: Igor M. Liplianin @ 2011-02-01 22:40 UTC (permalink / raw)
  To: mchehab, linux-media

Speed up tuning, as firmware is not necessary to load every attempt to tune

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
---
 drivers/media/dvb/frontends/ds3000.c |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c
index 02ba759..3373890 100644
--- a/drivers/media/dvb/frontends/ds3000.c
+++ b/drivers/media/dvb/frontends/ds3000.c
@@ -1056,14 +1056,6 @@ static int ds3000_tune(struct dvb_frontend *fe,
 
 	dprintk("%s() ", __func__);
 
-	/* Load the firmware if required */
-	ret = ds3000_firmware_ondemand(fe);
-	if (ret != 0) {
-		printk(KERN_ERR "%s: Unable initialise the firmware\n",
-								__func__);
-		return ret;
-	}
-
 	state->dnxt.delivery = c->modulation;
 	state->dnxt.frequency = c->frequency;
 	state->dnxt.rolloff = 2; /* fixme */
@@ -1353,6 +1345,12 @@ static int ds3000_initfe(struct dvb_frontend *fe)
 	ds3000_tuner_writereg(state, 0x42, 0x73);
 	ds3000_tuner_writereg(state, 0x05, 0x01);
 	ds3000_tuner_writereg(state, 0x62, 0xf5);
+	/* Load the firmware if required */
+	ret = ds3000_firmware_ondemand(fe);
+	if (ret != 0) {
+		printk(KERN_ERR "%s: Unable initialize firmware\n", __func__);
+		return ret;
+	}
 
 	return 0;
 }
-- 
1.7.1


^ permalink raw reply related

* [PATCH 6/9 v2] ds3000: yet clean up in tune procedure
From: Igor M. Liplianin @ 2011-02-01 22:40 UTC (permalink / raw)
  To: mchehab, linux-media

Remove a lot of debug messages and delays.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
---
 drivers/media/dvb/frontends/ds3000.c |   50 +++++-----------------------------
 1 files changed, 7 insertions(+), 43 deletions(-)

diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c
index 7c61936..11f1aa2 100644
--- a/drivers/media/dvb/frontends/ds3000.c
+++ b/drivers/media/dvb/frontends/ds3000.c
@@ -536,25 +536,6 @@ static int ds3000_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t 
voltage)
 	return 0;
 }
 
-static void ds3000_dump_registers(struct dvb_frontend *fe)
-{
-	struct ds3000_state *state = fe->demodulator_priv;
-	int x, y, reg = 0, val;
-
-	for (y = 0; y < 16; y++) {
-		dprintk("%s: %02x: ", __func__, y);
-		for (x = 0; x < 16; x++) {
-			reg = (y << 4) + x;
-			val = ds3000_readreg(state, reg);
-			if (x != 15)
-				dprintk("%02x ",  val);
-			else
-				dprintk("%02x\n", val);
-		}
-	}
-	dprintk("%s: -- DS3000 DUMP DONE --\n", __func__);
-}
-
 static int ds3000_read_status(struct dvb_frontend *fe, fe_status_t* status)
 {
 	struct ds3000_state *state = fe->demodulator_priv;
@@ -589,16 +570,6 @@ static int ds3000_read_status(struct dvb_frontend *fe, fe_status_t* status)
 	return 0;
 }
 
-#define FE_IS_TUNED (FE_HAS_SIGNAL + FE_HAS_LOCK)
-static int ds3000_is_tuned(struct dvb_frontend *fe)
-{
-	fe_status_t tunerstat;
-
-	ds3000_read_status(fe, &tunerstat);
-
-	return ((tunerstat & FE_IS_TUNED) == FE_IS_TUNED);
-}
-
 /* read DS3000 BER value */
 static int ds3000_read_ber(struct dvb_frontend *fe, u32* ber)
 {
@@ -1049,7 +1020,7 @@ static int ds3000_tune(struct dvb_frontend *fe,
 	struct ds3000_state *state = fe->demodulator_priv;
 	struct dtv_frontend_properties *c = &fe->dtv_property_cache;
 
-	int ret = 0, i;
+	int i;
 	u8 status, mlpf, mlpf_new, mlpf_max, mlpf_min, nlpf;
 	u16 value, ndiv;
 	u32 f3db;
@@ -1292,22 +1263,15 @@ static int ds3000_tune(struct dvb_frontend *fe,
 
 	/* TODO: calculate and set carrier offset */
 
-	/* wait before retrying */
 	for (i = 0; i < 30 ; i++) {
-		if (ds3000_is_tuned(fe)) {
-			dprintk("%s: Tuned\n", __func__);
-			ds3000_dump_registers(fe);
-			goto tuned;
-		}
-		msleep(1);
-	}
-
-	dprintk("%s: Not tuned\n", __func__);
-	ds3000_dump_registers(fe);
+		ds3000_read_status(fe, &status);
+		if (status && FE_HAS_LOCK)
+			return 0;
 
+		msleep(10);
+	}
 
-tuned:
-	return ret;
+	return 1;
 }
 
 static enum dvbfe_algo ds3000_get_algo(struct dvb_frontend *fe)
-- 
1.7.1


^ permalink raw reply related

* [PATCH] cgroups: respect cgroup timer slack value in prctl
From: jacob.jun.pan-VuQAYsv1563Yd54FQh9/CA @ 2011-02-01 22:41 UTC (permalink / raw)
  To: LKML, Li Zefan, Arjan van de Ven, Paul Menage, Kirill ; +Cc: Jacob Pan

From: Jacob Pan <jacob.jun.pan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>

Per cgroup timer slack value is used to manage task groups
for more friendly power management behavior. Once a task is
attached to a cgroup, we should not allow user to change
(escape) the per cgroup restriction unless a more relaxed
timer slack value is given by user via prctl.

Signed-off-by: Jacob Pan <jacob.jun.pan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
---
 include/linux/cgroup.h      |   13 +++++++++++++
 kernel/cgroup_timer_slack.c |    4 ----
 kernel/sys.c                |   21 ++++++++++++++++++++-
 3 files changed, 33 insertions(+), 5 deletions(-)

diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index ed4ba11..4405666 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -627,6 +627,19 @@ bool css_is_ancestor(struct cgroup_subsys_state *cg,
 unsigned short css_id(struct cgroup_subsys_state *css);
 unsigned short css_depth(struct cgroup_subsys_state *css);
 
+#ifdef CONFIG_CGROUP_TIMER_SLACK
+struct timer_slack_cgroup {
+	struct cgroup_subsys_state css;
+	unsigned long timer_slack_ns;
+};
+
+static inline struct timer_slack_cgroup *task_timer_slack(struct task_struct *task)
+{
+	return container_of(task_subsys_state(task, timer_slack_subsys_id),
+			    struct timer_slack_cgroup, css);
+}
+#endif
+
 #else /* !CONFIG_CGROUPS */
 
 static inline int cgroup_init_early(void) { return 0; }
diff --git a/kernel/cgroup_timer_slack.c b/kernel/cgroup_timer_slack.c
index daa452d..1de122a 100644
--- a/kernel/cgroup_timer_slack.c
+++ b/kernel/cgroup_timer_slack.c
@@ -4,10 +4,6 @@
 #include <linux/slab.h>
 
 struct cgroup_subsys timer_slack_subsys;
-struct timer_slack_cgroup {
-	struct cgroup_subsys_state css;
-	unsigned long timer_slack_ns;
-};
 
 static struct timer_slack_cgroup *cgroup_to_tslack_cgroup(struct cgroup *cgroup)
 {
diff --git a/kernel/sys.c b/kernel/sys.c
index 7f5a0cd..433fcdb 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -37,6 +37,8 @@
 #include <linux/ptrace.h>
 #include <linux/fs_struct.h>
 #include <linux/gfp.h>
+#include <linux/cgroup.h>
+#include <linux/init_task.h>
 
 #include <linux/compat.h>
 #include <linux/syscalls.h>
@@ -1688,8 +1690,25 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
 			if (arg2 <= 0)
 				current->timer_slack_ns =
 					current->default_timer_slack_ns;
-			else
+			else {
+#ifdef CONFIG_CGROUP_TIMER_SLACK
+				/* only allow more relaxed slack value than
+				 * the attached timer slack cgroup allows.
+				 */
+				unsigned long cg_timer_slack;
+
+				rcu_read_lock();
+				cg_timer_slack = task_timer_slack(current)->timer_slack_ns;
+				rcu_read_unlock();
+				if (cg_timer_slack < arg2 || cg_timer_slack
+					== TIMER_SLACK_NS_DEFAULT)
+					current->timer_slack_ns = arg2;
+				else
+					return -EINVAL;
+#else
 				current->timer_slack_ns = arg2;
+#endif
+			}
 			error = 0;
 			break;
 		case PR_MCE_KILL:
-- 
1.7.0.4

^ permalink raw reply related

* [PATCH 8/9 v2] ds3000: add carrier offset calculation
From: Igor M. Liplianin @ 2011-02-01 22:41 UTC (permalink / raw)
  To: mchehab, linux-media

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
---
 drivers/media/dvb/frontends/ds3000.c |   30 ++++++++++++++++++++++++++++--
 1 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c
index b2ba5f4..e2037b5 100644
--- a/drivers/media/dvb/frontends/ds3000.c
+++ b/drivers/media/dvb/frontends/ds3000.c
@@ -948,6 +948,25 @@ static int ds3000_get_property(struct dvb_frontend *fe,
 	return 0;
 }
 
+static int ds3000_set_carrier_offset(struct dvb_frontend *fe,
+					s32 carrier_offset_khz)
+{
+	struct ds3000_state *state = fe->demodulator_priv;
+	s32 tmp;
+
+	tmp = carrier_offset_khz;
+	tmp *= 65536;
+	tmp = (2 * tmp + DS3000_SAMPLE_RATE) / (2 * DS3000_SAMPLE_RATE);
+
+	if (tmp < 0)
+		tmp += 65536;
+
+	ds3000_writereg(state, 0x5f, tmp >> 8);
+	ds3000_writereg(state, 0x5e, tmp & 0xff);
+
+	return 0;
+}
+
 static int ds3000_tune(struct dvb_frontend *fe,
 				struct dvb_frontend_parameters *p)
 {
@@ -955,7 +974,8 @@ static int ds3000_tune(struct dvb_frontend *fe,
 	struct dtv_frontend_properties *c = &fe->dtv_property_cache;
 
 	int i;
-	u8 status, mlpf, mlpf_new, mlpf_max, mlpf_min, nlpf;
+	u8 status, mlpf, mlpf_new, mlpf_max, mlpf_min, nlpf, div4;
+	s32 offset_khz;
 	u16 value, ndiv;
 	u32 f3db;
 
@@ -970,9 +990,12 @@ static int ds3000_tune(struct dvb_frontend *fe,
 	ds3000_tuner_writereg(state, 0x60, 0x79);
 	ds3000_tuner_writereg(state, 0x08, 0x01);
 	ds3000_tuner_writereg(state, 0x00, 0x01);
+	div4 = 0;
+
 	/* calculate and set freq divider */
 	if (p->frequency < 1146000) {
 		ds3000_tuner_writereg(state, 0x10, 0x11);
+		div4 = 1;
 		ndiv = ((p->frequency * (6 + 8) * 4) +
 				(DS3000_XTAL_FREQ / 2)) /
 				DS3000_XTAL_FREQ - 1024;
@@ -1076,6 +1099,9 @@ static int ds3000_tune(struct dvb_frontend *fe,
 	ds3000_tuner_writereg(state, 0x50, 0x00);
 	msleep(60);
 
+	offset_khz = (ndiv - ndiv % 2 + 1024) * DS3000_XTAL_FREQ
+		/ (6 + 8) / (div4 + 1) / 2 - p->frequency;
+
 	/* ds3000 global reset */
 	ds3000_writereg(state, 0x07, 0x80);
 	ds3000_writereg(state, 0x07, 0x00);
@@ -1179,7 +1205,7 @@ static int ds3000_tune(struct dvb_frontend *fe,
 	/* start ds3000 build-in uC */
 	ds3000_writereg(state, 0xb2, 0x00);
 
-	/* TODO: calculate and set carrier offset */
+	ds3000_set_carrier_offset(fe, offset_khz);
 
 	for (i = 0; i < 30 ; i++) {
 		ds3000_read_status(fe, &status);
-- 
1.7.1


^ permalink raw reply related

* [PATCH 9/9 v2] ds3000: hardware tune algorithm
From: Igor M. Liplianin @ 2011-02-01 22:41 UTC (permalink / raw)
  To: mchehab, linux-media

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
---
 drivers/media/dvb/frontends/ds3000.c |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c
index e2037b5..3c6e08e 100644
--- a/drivers/media/dvb/frontends/ds3000.c
+++ b/drivers/media/dvb/frontends/ds3000.c
@@ -967,22 +967,21 @@ static int ds3000_set_carrier_offset(struct dvb_frontend *fe,
 	return 0;
 }
 
-static int ds3000_tune(struct dvb_frontend *fe,
+static int ds3000_set_frontend(struct dvb_frontend *fe,
 				struct dvb_frontend_parameters *p)
 {
 	struct ds3000_state *state = fe->demodulator_priv;
 	struct dtv_frontend_properties *c = &fe->dtv_property_cache;
 
 	int i;
-	u8 status, mlpf, mlpf_new, mlpf_max, mlpf_min, nlpf, div4;
+	fe_status_t status;
+	u8 mlpf, mlpf_new, mlpf_max, mlpf_min, nlpf, div4;
 	s32 offset_khz;
 	u16 value, ndiv;
 	u32 f3db;
 
 	dprintk("%s() ", __func__);
 
-	/* Reset status register */
-	status = 0;
 	/* Tune */
 	/* unknown */
 	ds3000_tuner_writereg(state, 0x07, 0x02);
@@ -1218,10 +1217,16 @@ static int ds3000_tune(struct dvb_frontend *fe,
 	return 1;
 }
 
+static int ds3000_tune(struct dvb_frontend *fe,
+			struct dvb_frontend_parameters *p)
+{
+	return ds3000_set_frontend(fe, p);
+}
+
 static enum dvbfe_algo ds3000_get_algo(struct dvb_frontend *fe)
 {
 	dprintk("%s()\n", __func__);
-	return DVBFE_ALGO_SW;
+	return DVBFE_ALGO_HW;
 }
 
 /*
@@ -1296,7 +1301,8 @@ static struct dvb_frontend_ops ds3000_ops = {
 
 	.set_property = ds3000_set_property,
 	.get_property = ds3000_get_property,
-	.set_frontend = ds3000_tune,
+	.set_frontend = ds3000_set_frontend,
+	.tune = ds3000_tune,
 };
 
 module_param(debug, int, 0644);
-- 
1.7.1


^ permalink raw reply related

* 2.6.38-rc3: nouveau nv50 screen freeze
From: Alexey Dobriyan @ 2011-02-01 22:41 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, bskeggs
In-Reply-To: <AANLkTik4Ko==G5s3WR8HT3ALW_Yf6ybmC78=VgrS91G6@mail.gmail.com>

nv50 (GeForce 8800 GTX) is broken.
No switching to high-resolution fbcon occurs, screen freezes
with 80x25 mode right before the switch (PCI bridge info in my case).

Otherwise, box boots normally, allowing blind reboot.

6d86951a45013ac5b060c5e6307b11b7c685c76f is the first bad commit
commit 6d86951a45013ac5b060c5e6307b11b7c685c76f
Author: Ben Skeggs <bskeggs@redhat.com>
Date:   Wed Dec 8 11:19:30 2010 +1000

    drm/nvc0: initial support for tiled buffer objects
    
    Signed-off-by: Ben Skeggs <bskeggs@redhat.com>

diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 5dc639e..74d0ef4 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -120,9 +120,6 @@ nouveau_bo_new(struct drm_device *dev, struct nouveau_channel *chan,
 	align >>= PAGE_SHIFT;
 
 	if (!nvbo->no_vm && dev_priv->chan_vm) {
-		if (dev_priv->card_type == NV_C0)
-			page_shift = 12;
-
 		ret = nouveau_vm_get(dev_priv->chan_vm, size, page_shift,
 				     NV_MEM_ACCESS_RW, &nvbo->vma);
 		if (ret) {
diff --git a/drivers/gpu/drm/nouveau/nouveau_dma.h b/drivers/gpu/drm/nouveau/nouveau_dma.h
index c118a33..c36f176 100644
--- a/drivers/gpu/drm/nouveau/nouveau_dma.h
+++ b/drivers/gpu/drm/nouveau/nouveau_dma.h
@@ -77,7 +77,8 @@ enum {
 	/* G80+ display objects */
 	NvEvoVRAM	= 0x01000000,
 	NvEvoFB16	= 0x01000001,
-	NvEvoFB32	= 0x01000002
+	NvEvoFB32	= 0x01000002,
+	NvEvoVRAM_LP	= 0x01000003
 };
 
 #define NV_MEMORY_TO_MEMORY_FORMAT                                    0x00000039
diff --git a/drivers/gpu/drm/nouveau/nv50_crtc.c b/drivers/gpu/drm/nouveau/nv50_crtc.c
index 2c346f7..9023c4d 100644
--- a/drivers/gpu/drm/nouveau/nv50_crtc.c
+++ b/drivers/gpu/drm/nouveau/nv50_crtc.c
@@ -115,15 +115,16 @@ nv50_crtc_blank(struct nouveau_crtc *nv_crtc, bool blanked)
 		OUT_RING(evo, 0);
 		BEGIN_RING(evo, 0, NV50_EVO_CRTC(index, FB_DMA), 1);
 		if (dev_priv->chipset != 0x50)
-			if (nv_crtc->fb.tile_flags == 0x7a00)
+			if (nv_crtc->fb.tile_flags == 0x7a00 ||
+			    nv_crtc->fb.tile_flags == 0xfe00)
 				OUT_RING(evo, NvEvoFB32);
 			else
 			if (nv_crtc->fb.tile_flags == 0x7000)
 				OUT_RING(evo, NvEvoFB16);
 			else
-				OUT_RING(evo, NvEvoVRAM);
+				OUT_RING(evo, NvEvoVRAM_LP);
 		else
-			OUT_RING(evo, NvEvoVRAM);
+			OUT_RING(evo, NvEvoVRAM_LP);
 	}
 
 	nv_crtc->fb.blanked = blanked;
@@ -555,13 +556,14 @@ nv50_crtc_do_mode_set_base(struct drm_crtc *crtc,
 			return ret;
 
 		BEGIN_RING(evo, 0, NV50_EVO_CRTC(nv_crtc->index, FB_DMA), 1);
-		if (nv_crtc->fb.tile_flags == 0x7a00)
+		if (nv_crtc->fb.tile_flags == 0x7a00 ||
+		    nv_crtc->fb.tile_flags == 0xfe00)
 			OUT_RING(evo, NvEvoFB32);
 		else
 		if (nv_crtc->fb.tile_flags == 0x7000)
 			OUT_RING(evo, NvEvoFB16);
 		else
-			OUT_RING(evo, NvEvoVRAM);
+			OUT_RING(evo, NvEvoVRAM_LP);
 	}
 
 	ret = RING_SPACE(evo, 12);
@@ -575,8 +577,10 @@ nv50_crtc_do_mode_set_base(struct drm_crtc *crtc,
 	if (!nv_crtc->fb.tile_flags) {
 		OUT_RING(evo, drm_fb->pitch | (1 << 20));
 	} else {
-		OUT_RING(evo, ((drm_fb->pitch / 4) << 4) |
-				  fb->nvbo->tile_mode);
+		u32 tile_mode = fb->nvbo->tile_mode;
+		if (dev_priv->card_type >= NV_C0)
+			tile_mode >>= 4;
+		OUT_RING(evo, ((drm_fb->pitch / 4) << 4) | tile_mode);
 	}
 	if (dev_priv->chipset == 0x50)
 		OUT_RING(evo, (nv_crtc->fb.tile_flags << 8) | format);
diff --git a/drivers/gpu/drm/nouveau/nv50_evo.c b/drivers/gpu/drm/nouveau/nv50_evo.c
index 887b2a9..14e24e9 100644
--- a/drivers/gpu/drm/nouveau/nv50_evo.c
+++ b/drivers/gpu/drm/nouveau/nv50_evo.c
@@ -53,7 +53,8 @@ nv50_evo_channel_del(struct nouveau_channel **pevo)
 
 int
 nv50_evo_dmaobj_new(struct nouveau_channel *evo, u32 class, u32 name,
-		    u32 tile_flags, u32 magic_flags, u32 offset, u32 limit)
+		    u32 tile_flags, u32 magic_flags, u32 offset, u32 limit,
+		    u32 flags5)
 {
 	struct drm_nouveau_private *dev_priv = evo->dev->dev_private;
 	struct drm_device *dev = evo->dev;
@@ -70,10 +71,7 @@ nv50_evo_dmaobj_new(struct nouveau_channel *evo, u32 class, u32 name,
 	nv_wo32(obj,  8, offset);
 	nv_wo32(obj, 12, 0x00000000);
 	nv_wo32(obj, 16, 0x00000000);
-	if (dev_priv->card_type < NV_C0)
-		nv_wo32(obj, 20, 0x00010000);
-	else
-		nv_wo32(obj, 20, 0x00020000);
+	nv_wo32(obj, 20, flags5);
 	dev_priv->engine.instmem.flush(dev);
 
 	ret = nouveau_ramht_insert(evo, name, obj);
@@ -264,9 +262,31 @@ nv50_evo_create(struct drm_device *dev)
 	}
 
 	/* create some default objects for the scanout memtypes we support */
+	if (dev_priv->card_type >= NV_C0) {
+		ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoFB32, 0xfe, 0x19,
+					  0, 0xffffffff, 0x00000000);
+		if (ret) {
+			nv50_evo_channel_del(&dev_priv->evo);
+			return ret;
+		}
+
+		ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoVRAM, 0, 0x19,
+					  0, dev_priv->vram_size, 0x00020000);
+		if (ret) {
+			nv50_evo_channel_del(&dev_priv->evo);
+			return ret;
+		}
+
+		ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoVRAM_LP, 0, 0x19,
+					  0, dev_priv->vram_size, 0x00000000);
+		if (ret) {
+			nv50_evo_channel_del(&dev_priv->evo);
+			return ret;
+		}
+	} else
 	if (dev_priv->chipset != 0x50) {
 		ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoFB16, 0x70, 0x19,
-					  0, 0xffffffff);
+					  0, 0xffffffff, 0x00010000);
 		if (ret) {
 			nv50_evo_channel_del(&dev_priv->evo);
 			return ret;
@@ -274,18 +294,25 @@ nv50_evo_create(struct drm_device *dev)
 
 
 		ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoFB32, 0x7a, 0x19,
-					  0, 0xffffffff);
+					  0, 0xffffffff, 0x00010000);
 		if (ret) {
 			nv50_evo_channel_del(&dev_priv->evo);
 			return ret;
 		}
-	}
 
-	ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoVRAM, 0, 0x19,
-				  0, dev_priv->vram_size);
-	if (ret) {
-		nv50_evo_channel_del(&dev_priv->evo);
-		return ret;
+		ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoVRAM, 0, 0x19,
+					  0, dev_priv->vram_size, 0x00010000);
+		if (ret) {
+			nv50_evo_channel_del(&dev_priv->evo);
+			return ret;
+		}
+
+		ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoVRAM_LP, 0, 0x19,
+					  0, dev_priv->vram_size, 0x00010000);
+		if (ret) {
+			nv50_evo_channel_del(&dev_priv->evo);
+			return ret;
+		}
 	}
 
 	return 0;
diff --git a/drivers/gpu/drm/nouveau/nvc0_vram.c b/drivers/gpu/drm/nouveau/nvc0_vram.c
index 41fcae5..858eda5 100644
--- a/drivers/gpu/drm/nouveau/nvc0_vram.c
+++ b/drivers/gpu/drm/nouveau/nvc0_vram.c
@@ -29,8 +29,16 @@
 bool
 nvc0_vram_flags_valid(struct drm_device *dev, u32 tile_flags)
 {
-	if (likely(!(tile_flags & NOUVEAU_GEM_TILE_LAYOUT_MASK)))
+	switch (tile_flags & NOUVEAU_GEM_TILE_LAYOUT_MASK) {
+	case 0x0000:
+	case 0xfe00:
+	case 0xdb00:
+	case 0x1100:
 		return true;
+	default:
+		break;
+	}
+
 	return false;
 }
 

^ permalink raw reply related

* Re: [PATCH V2] OMAP3: PM: Set/reset T2 bit for Smartreflex on TWL.
From: Kevin Hilman @ 2011-02-01 22:41 UTC (permalink / raw)
  To: Shweta Gulati; +Cc: linux-omap, Thara Gopinath
In-Reply-To: <1295847446-20667-1-git-send-email-shweta.gulati@ti.com>

Shweta Gulati <shweta.gulati@ti.com> writes:

> From: Thara Gopinath <thara@ti.com>
>
> The smartreflex bit on twl4030 needs to be enabled by default irrespective
> of whether smartreflex module is enabled on the OMAP side or not.
> This is because without this bit enabled the voltage scaling through
> vp forceupdate does not function properly on OMAP3.API added
> 'omap3_twl_set_sr_bit' with parameter to set/clear SR bit. It is cleared
> for platforms where voltage is not scaled using vpforceupdate
> or vc_bypass Method. In those cases 'omap3_twl_set_sr_bit' is called
> from board file, to make sure this bit is not overwritten in
> 'omap3_twl_init', a flag 'twl_sr_enable'
> is added.

As Sanjeev pointed out, the use of 'irrespective' above is confusing, in
fact the whole changelog is kind of confusing.

The changelog states that it has to always be enabled, but then goes on
to describe the situation(s) where it would be disabled.

Here's my rephrasing of how I understand the above changelog

- enable: *always* be enabled
- enable: needed for VP force update
- disable: platforms using VP forced update or VP bypass

-ECONFUSED

Kevin

> This patch is based on LO PM Branch and Smartreflex has been
> tested on OMAP3430 SDP, OMAP3630 SDP and boot tested on
> OMAP2430 SDP.
>
> Signed-off-by: Thara Gopinath <thara@ti.com>
> Signed-off-by: Shweta Gulati <shweta.gulati@ti.com>
> ---
>  arch/arm/mach-omap2/omap_twl.c |   62 ++++++++++++++++++++++++++++++++++++++++
>  arch/arm/mach-omap2/pm.h       |    1 +
>  2 files changed, 63 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/omap_twl.c b/arch/arm/mach-omap2/omap_twl.c
> index 00e1d2b..871a349 100644
> --- a/arch/arm/mach-omap2/omap_twl.c
> +++ b/arch/arm/mach-omap2/omap_twl.c
> @@ -59,8 +59,15 @@
>  
>  static bool is_offset_valid;
>  static u8 smps_offset;
> +/*
> + * Flag to ensure Smartreflex bit in TWL
> + * being cleared in board file is not overwritten.
> + */
> +static bool twl_sr_enable = true;
>  
> +#define TWL4030_DCDC_GLOBAL_CFG        0x06
>  #define REG_SMPS_OFFSET         0xE0
> +#define SMARTREFLEX_ENABLE     BIT(3)
>  
>  static unsigned long twl4030_vsel_to_uv(const u8 vsel)
>  {
> @@ -269,6 +276,16 @@ int __init omap3_twl_init(void)
>  		omap3_core_volt_info.vp_vddmax = OMAP3630_VP2_VLIMITTO_VDDMAX;
>  	}
>  
> +	/*
> +	 * The smartreflex bit on twl4030 needs to be enabled by
> +	 * default irrespective of whether smartreflex module is
> +	 * enabled on the OMAP side or not. This is because without
> +	 * this bit enabled the voltage scaling through
> +	 * vp forceupdate does not function properly on OMAP3.
> +	 */
> +	if (twl_sr_enable)
> +		omap3_twl_set_sr_bit(1);
> +
>  	voltdm = omap_voltage_domain_lookup("mpu");
>  	omap_voltage_register_pmic(voltdm, &omap3_mpu_volt_info);
>  
> @@ -277,3 +294,48 @@ int __init omap3_twl_init(void)
>  
>  	return 0;
>  }
> +
> +/**
> + * omap3_twl_set_sr_bit() - API to Set/Clear SR bit on TWL
> + * @flag: Flag to Set/Clear SR bit
> + *
> + * If flag is non zero, enables Smartreflex bit on TWL 4030
> + * to make sure voltage scaling through Vp forceupdate works.
> + * Else, the smartreflex bit on twl4030 is
> + * cleared as there are platforms which use
> + * OMAP3 and T2 but use Synchronized Scaling Hardware
> + * Strategy (ENABLE_VMODE=1) and Direct Strategy Software
> + * Scaling Mode (ENABLE_VMODE=0), for setting the voltages,
> + * in those scenarios this bit is to be cleared.
> + * API returns 0 on sucess,  error is returned
> + * if I2C read/write fails.
> + */
> +
> +int omap3_twl_set_sr_bit(u8 flag)
> +{
> +	u8 temp;
> +	int ret;
> +
> +	ret = twl_i2c_read_u8(TWL4030_MODULE_PM_RECEIVER, &temp,
> +				TWL4030_DCDC_GLOBAL_CFG);
> +	if (ret)
> +		goto err;
> +
> +	if (flag) {
> +		temp |= SMARTREFLEX_ENABLE;
> +		twl_sr_enable = true;
> +	} else {
> +		temp &= ~SMARTREFLEX_ENABLE;
> +		twl_sr_enable = false;
> +	}
> +
> +	ret = twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, temp,
> +			TWL4030_DCDC_GLOBAL_CFG);
> +	if (ret) {
> +err:
> +		pr_err("%s: Unable to Read/Write to TWL4030 through I2C bus "
> +				"\n", __func__);
> +		return -EINVAL;
> +	}
> +	return 0;
> +}
> diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
> index 704766b..c98be66 100644
> --- a/arch/arm/mach-omap2/pm.h
> +++ b/arch/arm/mach-omap2/pm.h
> @@ -127,6 +127,7 @@ static inline void omap_enable_smartreflex_on_init(void) {}
>  #ifdef CONFIG_TWL4030_CORE
>  extern int omap3_twl_init(void);
>  extern int omap4_twl_init(void);
> +extern int omap3_twl_set_sr_bit(u8 flag);
>  #else
>  static inline int omap3_twl_init(void)
>  {

^ permalink raw reply

* Re: Call for testers: V4L1 support dropped from xawtv - Was: Re: Call for testers: V4L1 support dropped from tvtime
From: Mauro Carvalho Chehab @ 2011-02-01 22:41 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Dmitry Butskoy
In-Reply-To: <4D483044.4030303@redhat.com>

Em 01-02-2011 14:09, Mauro Carvalho Chehab escreveu:
> Em 01-02-2011 12:51, Devin Heitmueller escreveu:
>> I know this is the linux-media mailing list and not the tvtime mailing
>> list, but it seems relevant given the overlap in the user base and the
>> fact that these changes are specifically in response to recent events
>> with v4l-dvb.
>>
>> I have modified the KernelLabs build of tvtime to no longer depend on V4L1.
>>
>> The tree can be found here:
>>
>> http://www.kernellabs.com/hg/~dheitmueller/tvtime
>>
>> More info including build instructions can be found here:
>>
>> http://www.kernellabs.com/blog
> 
> Let me take a ride at Devin's call for tests ;)
> 
> I've also dropped V4L1 support from xawtv3 a few days ago. It would be
> wonderful if people could test it. The upstream git tree is at:
> 	http://git.linuxtv.org/xawtv3.git
> 
> A tarball for the latest version is at:
> 	http://linuxtv.org/downloads/xawtv/xawtv-3.99.rc1.tar.bz2
> 
> For those that use Fedora, there are some rpm available For FC14/FC15 at:
> 	http://kojipkgs.fedoraproject.org/packages/xawtv/3.99.rc1/
> 
> There's just one know caveat that affects mostly webcam usage. Xawtv now has two 
> V4L2 plugins, one with libv4l and another with just v4l2. Currently, there's no 
> way to select between them. I need some time to do a research about it and write
> a patch to address this issue.

Ok, I've added a patch fixing the libv4l issue, and released a -rc2 version of it.

All patches that were found in Fedora for F14 are now upstream. There's just one
patch at F15 that it is not upstream yet (a compilation breakage).

The new tarball is available at:
	http://linuxtv.org/downloads/xawtv/

And the Fedora packages are at:
	http://kojipkgs.fedoraproject.org/packages/xawtv/

Dmitry is looking some patches at Debian to apply upstream. After having them applied,
and getting some feedback, I'll release xawtv version 3.100.

Cheers,
Mauro.

^ permalink raw reply

* [RFC PATCH 3/5] of: add clock providers
From: Rob Herring @ 2011-02-01 22:42 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20110126044416.16410.68942.stgit@localhost6.localdomain6>

Grant,

On 01/25/2011 10:44 PM, Grant Likely wrote:
> +struct clk *of_clk_get(struct device *dev, const char *id)

It would help if this took a struct device_node rather than struct 
device. This would allow using of_clk_get directly for cases where you 
don't have a struct device. This is fairly common in core platform core 
which are not full drivers. The case I have run into is the timer init 
code. To make clk_get work, I would have to create a dummy struct device.

Alternatively, an of_clk_get_sys function is needed.

 > +{
> +	struct device_node *provnode;
> +	u32 provhandle;
> +	int sz;
> +	struct clk *clk;
> +	char prop_name[32]; /* 32 is max size of property name */
> +	const void *prop;
> +
> +	dev_dbg(dev, "Looking up %s-clock from device tree\n", id);
> +
> +	snprintf(prop_name, 32, "%s-clock", id ? id : "bus");

Many times a module just has 1 clock and id will be NULL. Is "bus-clock" 
really the best choice of name? A bus clock may exist, but be 
transparent to s/w. How about allowing "clock" or "%s-clock"?

If bus-clock is the default, then you should add this to the clock 
binding wiki page.

Rob

^ permalink raw reply

* Re: [RFC PATCH 3/5] of: add clock providers
From: Rob Herring @ 2011-02-01 22:42 UTC (permalink / raw)
  To: Grant Likely
  Cc: devicetree-discuss, jeremy.kerr, linux-kernel, linux-arm-kernel,
	nicolas.pitre
In-Reply-To: <20110126044416.16410.68942.stgit@localhost6.localdomain6>

Grant,

On 01/25/2011 10:44 PM, Grant Likely wrote:
> +struct clk *of_clk_get(struct device *dev, const char *id)

It would help if this took a struct device_node rather than struct 
device. This would allow using of_clk_get directly for cases where you 
don't have a struct device. This is fairly common in core platform core 
which are not full drivers. The case I have run into is the timer init 
code. To make clk_get work, I would have to create a dummy struct device.

Alternatively, an of_clk_get_sys function is needed.

 > +{
> +	struct device_node *provnode;
> +	u32 provhandle;
> +	int sz;
> +	struct clk *clk;
> +	char prop_name[32]; /* 32 is max size of property name */
> +	const void *prop;
> +
> +	dev_dbg(dev, "Looking up %s-clock from device tree\n", id);
> +
> +	snprintf(prop_name, 32, "%s-clock", id ? id : "bus");

Many times a module just has 1 clock and id will be NULL. Is "bus-clock" 
really the best choice of name? A bus clock may exist, but be 
transparent to s/w. How about allowing "clock" or "%s-clock"?

If bus-clock is the default, then you should add this to the clock 
binding wiki page.

Rob

^ permalink raw reply

* [PATCH 0/6] mklibs library size optimization commits
From: Nitin A Kamble @ 2011-02-01 22:43 UTC (permalink / raw)
  To: poky

From: Nitin A Kamble <nitin.a.kamble@intel.com>

Here are the commits implementing the mklibs library size optimization for 
images. More information in the commit logs.

Pull URL: git://git.pokylinux.org/poky-contrib.git
  Branch: nitin/mklibs
  Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=nitin/mklibs

Thanks,
    Nitin A Kamble <nitin.a.kamble@intel.com>
---


Nitin A Kamble (6):
  distro_tracking: update latest upstream versions
  elfutils: add a missing depedancy
  mklibs-native: new recipe for optimizing size of library files
  image-mklibs.bbclass: add the library optimization functionality
  subversion: upgrade from 1.6.13 to 1.6 15
  distro_Tracking: update as per current devel/toolchain recipes

 meta/classes/image-mklibs.bbclass                  |   70 ++++++++++++++++++++
 .../conf/distro/include/distro_tracking_fields.inc |   41 ++++++-----
 meta/conf/local.conf.sample                        |   10 +++-
 meta/recipes-devtools/elfutils/elfutils_0.148.bb   |    3 +-
 .../mklibs/files/ac_init_fix.patch                 |   17 +++++
 .../mklibs/mklibs-native_0.1.31.bb                 |   23 +++++++
 .../subversion/disable-revision-install.patch      |   24 +++++--
 .../{subversion_1.6.13.bb => subversion_1.6.15.bb} |    6 +-
 8 files changed, 164 insertions(+), 30 deletions(-)
 create mode 100644 meta/classes/image-mklibs.bbclass
 create mode 100644 meta/recipes-devtools/mklibs/files/ac_init_fix.patch
 create mode 100644 meta/recipes-devtools/mklibs/mklibs-native_0.1.31.bb
 rename meta/recipes-devtools/subversion/{subversion_1.6.13.bb => subversion_1.6.15.bb} (86%)

-- 
1.7.3.4



^ permalink raw reply


This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.