This is a note to let you know that I've just added the patch titled

    drm/nouveau/bios: store a type/mask hash in parsed dcb data

to the 3.8-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-nouveau-bios-store-a-type-mask-hash-in-parsed-dcb-data.patch
and it can be found in the queue-3.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 8e992c8d9eebc2bd3246252ee5c0422dbbbce7ae Mon Sep 17 00:00:00 2001
From: Ben Skeggs <[email protected]>
Date: Sat, 16 Feb 2013 12:01:59 +1000
Subject: drm/nouveau/bios: store a type/mask hash in parsed dcb data

From: Ben Skeggs <[email protected]>

commit 8e992c8d9eebc2bd3246252ee5c0422dbbbce7ae upstream.

Matches format used by a couple of other vbios tables, useful
to have laying around already calculated.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/gpu/drm/nouveau/core/include/subdev/bios/dcb.h |    2 +
 drivers/gpu/drm/nouveau/core/subdev/bios/dcb.c         |   29 +++++++++--------
 2 files changed, 18 insertions(+), 13 deletions(-)

--- a/drivers/gpu/drm/nouveau/core/include/subdev/bios/dcb.h
+++ b/drivers/gpu/drm/nouveau/core/include/subdev/bios/dcb.h
@@ -16,6 +16,8 @@ enum dcb_output_type {
 
 struct dcb_output {
        int index;      /* may not be raw dcb index if merging has happened */
+       u16 hasht;
+       u16 hashm;
        enum dcb_output_type type;
        uint8_t i2c_index;
        uint8_t heads;
--- a/drivers/gpu/drm/nouveau/core/subdev/bios/dcb.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/bios/dcb.c
@@ -107,6 +107,18 @@ dcb_outp(struct nouveau_bios *bios, u8 i
        return 0x0000;
 }
 
+static inline u16
+dcb_outp_hasht(struct dcb_output *outp)
+{
+       return (outp->extdev << 8) | (outp->location << 4) | outp->type;
+}
+
+static inline u16
+dcb_outp_hashm(struct dcb_output *outp)
+{
+       return (outp->heads << 8) | (outp->link << 6) | outp->or;
+}
+
 u16
 dcb_outp_parse(struct nouveau_bios *bios, u8 idx, u8 *ver, u8 *len,
               struct dcb_output *outp)
@@ -143,29 +155,20 @@ dcb_outp_parse(struct nouveau_bios *bios
                                break;
                        }
                }
+
+               outp->hasht = dcb_outp_hasht(outp);
+               outp->hashm = dcb_outp_hashm(outp);
        }
        return dcb;
 }
 
-static inline u16
-dcb_outp_hasht(struct dcb_output *outp)
-{
-       return (outp->location << 4) | outp->type;
-}
-
-static inline u16
-dcb_outp_hashm(struct dcb_output *outp)
-{
-       return (outp->heads << 8) | (outp->link << 6) | outp->or;
-}
-
 u16
 dcb_outp_match(struct nouveau_bios *bios, u16 type, u16 mask,
               u8 *ver, u8 *len, struct dcb_output *outp)
 {
        u16 dcb, idx = 0;
        while ((dcb = dcb_outp_parse(bios, idx++, ver, len, outp))) {
-               if (dcb_outp_hasht(outp) == type) {
+               if ((dcb_outp_hasht(outp) & 0x00ff) == (type & 0x00ff)) {
                        if ((dcb_outp_hashm(outp) & mask) == mask)
                                break;
                }


Patches currently in stable-queue which might be from [email protected] are

queue-3.8/drm-nouveau-bios-store-a-type-mask-hash-in-parsed-dcb-data.patch
queue-3.8/drm-nouveau-bios-parse-external-transmitter-type-if-off-chip.patch
queue-3.8/drm-nv50-devinit-reverse-the-logic-for-running-encoder-init-scripts.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to