Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/dist/drm const const const const const...
details: https://anonhg.NetBSD.org/src/rev/5c2931d62559
branches: trunk
changeset: 1027877:5c2931d62559
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 01:02:54 2021 +0000
description:
const const const const const const const const const
diffstat:
sys/external/bsd/drm2/dist/drm/drm_edid.c | 52 +++++++++++++++---------------
1 files changed, 26 insertions(+), 26 deletions(-)
diffs (190 lines):
diff -r 6a1b587375a3 -r 5c2931d62559 sys/external/bsd/drm2/dist/drm/drm_edid.c
--- a/sys/external/bsd/drm2/dist/drm/drm_edid.c Sun Dec 19 01:02:44 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_edid.c Sun Dec 19 01:02:54 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_edid.c,v 1.12 2021/12/19 00:59:53 riastradh Exp $ */
+/* $NetBSD: drm_edid.c,v 1.13 2021/12/19 01:02:54 riastradh Exp $ */
/*
* Copyright (c) 2006 Luc Verhaegen (quirks list)
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_edid.c,v 1.12 2021/12/19 00:59:53 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_edid.c,v 1.13 2021/12/19 01:02:54 riastradh Exp $");
#include <linux/hdmi.h>
#include <linux/i2c.h>
@@ -3163,7 +3163,7 @@
/*
* Search EDID for CEA extension block.
*/
-static u8 *drm_find_edid_extension(const struct edid *edid, int ext_id)
+static const u8 *drm_find_edid_extension(const struct edid *edid, int ext_id)
{
const u8 *edid_ext = NULL;
int i;
@@ -3191,7 +3191,7 @@
return drm_find_edid_extension(edid, DISPLAYID_EXT);
}
-static u8 *drm_find_cea_extension(const struct edid *edid)
+static const u8 *drm_find_cea_extension(const struct edid *edid)
{
int ret;
int idx = 1;
@@ -4363,8 +4363,8 @@
static void drm_edid_to_eld(struct drm_connector *connector, struct edid *edid)
{
uint8_t *eld = connector->eld;
- u8 *cea;
- u8 *db;
+ const u8 *cea;
+ const u8 *db;
int total_sad_count = 0;
int mnl;
int dbl;
@@ -4461,7 +4461,7 @@
{
int count = 0;
int i, start, end, dbl;
- u8 *cea;
+ const u8 *cea;
cea = drm_find_cea_extension(edid);
if (!cea) {
@@ -4480,7 +4480,7 @@
}
for_each_cea_db(cea, i, start, end) {
- u8 *db = &cea[i];
+ const u8 *db = &cea[i];
if (cea_db_tag(db) == AUDIO_BLOCK) {
int j;
@@ -4491,7 +4491,7 @@
if (!*sads)
return -ENOMEM;
for (j = 0; j < count; j++) {
- u8 *sad = &db[1 + j * 3];
+ const u8 *sad = &db[1 + j * 3];
(*sads)[j].format = (sad[0] & 0x78) >> 3;
(*sads)[j].channels = sad[0] & 0x7;
@@ -4612,7 +4612,7 @@
*/
bool drm_detect_hdmi_monitor(struct edid *edid)
{
- u8 *edid_ext;
+ const u8 *edid_ext;
int i;
int start_offset, end_offset;
@@ -4650,7 +4650,7 @@
*/
bool drm_detect_monitor_audio(struct edid *edid)
{
- u8 *edid_ext;
+ const u8 *edid_ext;
int i, j;
bool has_audio = false;
int start_offset, end_offset;
@@ -4994,13 +4994,13 @@
return quirks;
}
-static int validate_displayid(u8 *displayid, int length, int idx)
+static int validate_displayid(const u8 *displayid, int length, int idx)
{
int i;
u8 csum = 0;
- struct displayid_hdr *base;
-
- base = (struct displayid_hdr *)&displayid[idx];
+ const struct displayid_hdr *base;
+
+ base = (const struct displayid_hdr *)&displayid[idx];
DRM_DEBUG_KMS("base revision 0x%x, length %d, %d %d\n",
base->rev, base->bytes, base->prod_id, base->ext_count);
@@ -5018,7 +5018,7 @@
}
static struct drm_display_mode *drm_mode_displayid_detailed(struct drm_device *dev,
- struct displayid_detailed_timings_1 *timings)
+ const struct displayid_detailed_timings_1 *timings)
{
struct drm_display_mode *mode;
unsigned pixel_clock = (timings->pixel_clock[0] |
@@ -5063,9 +5063,9 @@
}
static int add_displayid_detailed_1_modes(struct drm_connector *connector,
- struct displayid_block *block)
+ const struct displayid_block *block)
{
- struct displayid_detailed_timing_block *det = (struct displayid_detailed_timing_block *)block;
+ const struct displayid_detailed_timing_block *det = (const struct displayid_detailed_timing_block *)block;
int i;
int num_timings;
struct drm_display_mode *newmode;
@@ -5076,7 +5076,7 @@
num_timings = block->num_bytes / 20;
for (i = 0; i < num_timings; i++) {
- struct displayid_detailed_timings_1 *timings = &det->timings[i];
+ const struct displayid_detailed_timings_1 *timings = &det->timings[i];
newmode = drm_mode_displayid_detailed(connector->dev, timings);
if (!newmode)
@@ -5091,11 +5091,11 @@
static int add_displayid_detailed_modes(struct drm_connector *connector,
struct edid *edid)
{
- u8 *displayid;
+ const u8 *displayid;
int ret;
int idx = 1;
int length = EDID_LENGTH;
- struct displayid_block *block;
+ const struct displayid_block *block;
int num_modes = 0;
displayid = drm_find_displayid_extension(edid);
@@ -5697,9 +5697,9 @@
EXPORT_SYMBOL(drm_hdmi_vendor_infoframe_from_display_mode);
static int drm_parse_tiled_block(struct drm_connector *connector,
- struct displayid_block *block)
+ const struct displayid_block *block)
{
- struct displayid_tiled_block *tile = (struct displayid_tiled_block *)block;
+ const struct displayid_tiled_block *tile = (const struct displayid_tiled_block *)block;
u16 w, h;
u8 tile_v_loc, tile_h_loc;
u8 num_v_tile, num_h_tile;
@@ -5751,12 +5751,12 @@
}
static int drm_parse_display_id(struct drm_connector *connector,
- u8 *displayid, int length,
+ const u8 *displayid, int length,
bool is_edid_extension)
{
/* if this is an EDID extension the first byte will be 0x70 */
int idx = 0;
- struct displayid_block *block;
+ const struct displayid_block *block;
int ret;
if (is_edid_extension)
@@ -5794,7 +5794,7 @@
static void drm_get_displayid(struct drm_connector *connector,
struct edid *edid)
{
- void *displayid = NULL;
+ const void *displayid = NULL;
int ret;
connector->has_tile = false;
displayid = drm_find_displayid_extension(edid);
Home |
Main Index |
Thread Index |
Old Index