From: Ben Skeggs Date: Fri, 18 Nov 2016 01:16:49 +0000 (+1000) Subject: drm/nouveau/bios/timing: pointers are 32-bit X-Git-Tag: v5.15~12311^2^2~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1957d3d5682337e69bc117a2a873b9dfb730baed;p=platform%2Fkernel%2Flinux-starfive.git drm/nouveau/bios/timing: pointers are 32-bit Signed-off-by: Ben Skeggs --- diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/timing.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/timing.h index 339a826..38188d4 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/timing.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/timing.h @@ -2,10 +2,10 @@ #define __NVBIOS_TIMING_H__ #include -u16 nvbios_timingTe(struct nvkm_bios *, +u32 nvbios_timingTe(struct nvkm_bios *, u8 *ver, u8 *hdr, u8 *cnt, u8 *len, u8 *snr, u8 *ssz); -u16 nvbios_timingEe(struct nvkm_bios *, int idx, +u32 nvbios_timingEe(struct nvkm_bios *, int idx, u8 *ver, u8 *hdr, u8 *cnt, u8 *len); -u16 nvbios_timingEp(struct nvkm_bios *, int idx, +u32 nvbios_timingEp(struct nvkm_bios *, int idx, u8 *ver, u8 *hdr, u8 *cnt, u8 *len, struct nvbios_ramcfg *); #endif diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/timing.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/timing.c index 99f6432..7e83c39 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/timing.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/timing.c @@ -25,19 +25,19 @@ #include #include -u16 +u32 nvbios_timingTe(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len, u8 *snr, u8 *ssz) { struct bit_entry bit_P; - u16 timing = 0x0000; + u32 timing = 0; if (!bit_entry(bios, 'P', &bit_P)) { if (bit_P.version == 1) - timing = nvbios_rd16(bios, bit_P.offset + 4); + timing = nvbios_rd32(bios, bit_P.offset + 4); else if (bit_P.version == 2) - timing = nvbios_rd16(bios, bit_P.offset + 8); + timing = nvbios_rd32(bios, bit_P.offset + 8); if (timing) { *ver = nvbios_rd08(bios, timing + 0); @@ -62,15 +62,15 @@ nvbios_timingTe(struct nvkm_bios *bios, } } - return 0x0000; + return 0; } -u16 +u32 nvbios_timingEe(struct nvkm_bios *bios, int idx, u8 *ver, u8 *hdr, u8 *cnt, u8 *len) { u8 snr, ssz; - u16 timing = nvbios_timingTe(bios, ver, hdr, cnt, len, &snr, &ssz); + u32 timing = nvbios_timingTe(bios, ver, hdr, cnt, len, &snr, &ssz); if (timing && idx < *cnt) { timing += *hdr + idx * (*len + (snr * ssz)); *hdr = *len; @@ -78,14 +78,14 @@ nvbios_timingEe(struct nvkm_bios *bios, int idx, *len = ssz; return timing; } - return 0x0000; + return 0; } -u16 +u32 nvbios_timingEp(struct nvkm_bios *bios, int idx, u8 *ver, u8 *hdr, u8 *cnt, u8 *len, struct nvbios_ramcfg *p) { - u16 data = nvbios_timingEe(bios, idx, ver, hdr, cnt, len), temp; + u32 data = nvbios_timingEe(bios, idx, ver, hdr, cnt, len), temp; p->timing_ver = *ver; p->timing_hdr = *hdr; switch (!!data * *ver) {