From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Archit Taneja <archit@ti.com>
Cc: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org
Subject: Re: [PATCH 1/2] OMAPDSS: Features: Maintain dss_feats as a list
Date: Mon, 06 Feb 2012 10:42:23 +0000 [thread overview]
Message-ID: <1328524943.1898.38.camel@deskari> (raw)
In-Reply-To: <1327900959-29198-1-git-send-email-archit@ti.com>
[-- Attachment #1: Type: text/plain, Size: 1499 bytes --]
Hi,
On Mon, 2012-01-30 at 10:52 +0530, Archit Taneja wrote:
> The number of dss_feat_id members has increased to a large value, the current
> way of assigning a subset of these features (for a particular OMAP) as a mask
> is no longer feasible.
>
> Maintain the subset of features supported as lists. Make the function
> dss_has_feature() traverse through this list.
I think this makes the code easier to maintain, so in that sense it is
good. But I do hesitate a bit, I think many features are checked in
often used code paths (the configuration done on each frame when
swapping/panning), and bit compare versus finding an item in a list
could have performance impact.
Then again, I'm purely guessing here, as it could well be that compared
to the other code, checking the features is insignificant. Thus, I'm
fine with this patch, and we can optimize it later if need be.
However, I'm anyway giving a few ideas how this could also be handled:
- 64 bit mask. Would be simple, but we'd still have a hard limit there.
- Variable length bitmask, i.e. an int or byte array from which a
particular bit is checked. There could be a ready made datatype for this
in the kernel.
- Lists like in this patch, but in sorted order. Then, if we're looking
for a feat which has, say, number 4 assigned to it, we can stop
iterating the list when we hit a feat > 4 in the list. Quite simple
optimization, but needs extra maintenance to keep the feat lists sorted.
Tomi
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Archit Taneja <archit@ti.com>
Cc: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org
Subject: Re: [PATCH 1/2] OMAPDSS: Features: Maintain dss_feats as a list
Date: Mon, 06 Feb 2012 12:42:23 +0200 [thread overview]
Message-ID: <1328524943.1898.38.camel@deskari> (raw)
In-Reply-To: <1327900959-29198-1-git-send-email-archit@ti.com>
[-- Attachment #1: Type: text/plain, Size: 1499 bytes --]
Hi,
On Mon, 2012-01-30 at 10:52 +0530, Archit Taneja wrote:
> The number of dss_feat_id members has increased to a large value, the current
> way of assigning a subset of these features (for a particular OMAP) as a mask
> is no longer feasible.
>
> Maintain the subset of features supported as lists. Make the function
> dss_has_feature() traverse through this list.
I think this makes the code easier to maintain, so in that sense it is
good. But I do hesitate a bit, I think many features are checked in
often used code paths (the configuration done on each frame when
swapping/panning), and bit compare versus finding an item in a list
could have performance impact.
Then again, I'm purely guessing here, as it could well be that compared
to the other code, checking the features is insignificant. Thus, I'm
fine with this patch, and we can optimize it later if need be.
However, I'm anyway giving a few ideas how this could also be handled:
- 64 bit mask. Would be simple, but we'd still have a hard limit there.
- Variable length bitmask, i.e. an int or byte array from which a
particular bit is checked. There could be a ready made datatype for this
in the kernel.
- Lists like in this patch, but in sorted order. Then, if we're looking
for a feat which has, say, number 4 assigned to it, we can stop
iterating the list when we hit a feat > 4 in the list. Quite simple
optimization, but needs extra maintenance to keep the feat lists sorted.
Tomi
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-02-06 10:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-30 5:22 [PATCH 1/2] OMAPDSS: Features: Maintain dss_feats as a list Archit Taneja
2012-01-30 5:34 ` Archit Taneja
2012-02-06 10:42 ` Tomi Valkeinen [this message]
2012-02-06 10:42 ` Tomi Valkeinen
2012-02-06 11:24 ` Archit Taneja
2012-02-06 11:36 ` Archit Taneja
2012-02-06 11:28 ` Tomi Valkeinen
2012-02-06 11:28 ` Tomi Valkeinen
2012-02-06 11:39 ` Archit Taneja
2012-02-06 11:51 ` Archit Taneja
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=1328524943.1898.38.camel@deskari \
--to=tomi.valkeinen@ti.com \
--cc=archit@ti.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
/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 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.