All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jordan Crouse" <jordan.crouse@amd.com>
To: linux-fbdev-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, devel@laptop.org
Subject: [PATCH] video: Get the default mode from the right database
Date: Mon, 2 Oct 2006 16:57:38 -0600	[thread overview]
Message-ID: <20061002225738.GD7716@cosmic.amd.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 641 bytes --]

fb_find_mode() is behaving in an non-intuitive way.  When I specify my
own video mode database, and no default mode, I would have expected it
to assume the first mode in my database as the default mode.  Instead, it
uses the built in database:

> if (!db) {
>     db = modedb;
>     dbsize = ARRAY_SIZE(modedb);
> }
> if (!default_mode)
>     default_mode = &modedb[DEFAULT_MODEDB_INDEX];

Personally, I think this is incorrect - if an alternate database is
specified, it should be always using that.  Patch is attached.

Regards,
Jordan

-- 
Jordan Crouse
Senior Linux Engineer
Advanced Micro Devices, Inc.
<www.amd.com/embeddedprocessors>

[-- Attachment #2: modedb-fix.patch --]
[-- Type: text/plain, Size: 763 bytes --]

[PATCH] video: Get the default mode from the right database

From: Jordan Crouse <jordan.crouse@amd.com>

If no default mode is specified, it should be grabbed from the supplied
database, not the default one.  

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
---

 drivers/video/modedb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c
index d126790..e068f52 100644
--- a/drivers/video/modedb.c
+++ b/drivers/video/modedb.c
@@ -506,7 +506,7 @@ int fb_find_mode(struct fb_var_screeninf
 	dbsize = ARRAY_SIZE(modedb);
     }
     if (!default_mode)
-	default_mode = &modedb[DEFAULT_MODEDB_INDEX];
+	default_mode = &db[DEFAULT_MODEDB_INDEX];
     if (!default_bpp)
 	default_bpp = 8;
 

[-- Attachment #3: Type: text/plain, Size: 133 bytes --]

_______________________________________________
Devel mailing list
Devel@laptop.org
http://mailman.laptop.org/mailman/listinfo/devel

WARNING: multiple messages have this Message-ID (diff)
From: "Jordan Crouse" <jordan.crouse@amd.com>
To: linux-fbdev-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, devel@laptop.org
Subject: [PATCH] video: Get the default mode from the right database
Date: Mon, 2 Oct 2006 16:57:38 -0600	[thread overview]
Message-ID: <20061002225738.GD7716@cosmic.amd.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 641 bytes --]

fb_find_mode() is behaving in an non-intuitive way.  When I specify my
own video mode database, and no default mode, I would have expected it
to assume the first mode in my database as the default mode.  Instead, it
uses the built in database:

> if (!db) {
>     db = modedb;
>     dbsize = ARRAY_SIZE(modedb);
> }
> if (!default_mode)
>     default_mode = &modedb[DEFAULT_MODEDB_INDEX];

Personally, I think this is incorrect - if an alternate database is
specified, it should be always using that.  Patch is attached.

Regards,
Jordan

-- 
Jordan Crouse
Senior Linux Engineer
Advanced Micro Devices, Inc.
<www.amd.com/embeddedprocessors>

[-- Attachment #2: modedb-fix.patch --]
[-- Type: text/plain, Size: 763 bytes --]

[PATCH] video: Get the default mode from the right database

From: Jordan Crouse <jordan.crouse@amd.com>

If no default mode is specified, it should be grabbed from the supplied
database, not the default one.  

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
---

 drivers/video/modedb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c
index d126790..e068f52 100644
--- a/drivers/video/modedb.c
+++ b/drivers/video/modedb.c
@@ -506,7 +506,7 @@ int fb_find_mode(struct fb_var_screeninf
 	dbsize = ARRAY_SIZE(modedb);
     }
     if (!default_mode)
-	default_mode = &modedb[DEFAULT_MODEDB_INDEX];
+	default_mode = &db[DEFAULT_MODEDB_INDEX];
     if (!default_bpp)
 	default_bpp = 8;
 

             reply	other threads:[~2006-10-02 22:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-02 22:57 Jordan Crouse [this message]
2006-10-02 22:57 ` [PATCH] video: Get the default mode from the right database Jordan Crouse
2006-10-03  7:04 ` Geert Uytterhoeven
2006-10-03  7:04   ` [Linux-fbdev-devel] " Geert Uytterhoeven
2006-10-03 15:07   ` Jordan Crouse
2006-10-03 15:07     ` Jordan Crouse

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=20061002225738.GD7716@cosmic.amd.com \
    --to=jordan.crouse@amd.com \
    --cc=devel@laptop.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linux-kernel@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.