summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/display/intel_display_params.h
blob: 198b03da80555cd5f042be0178b6798e2136e95d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// SPDX-License-Identifier: MIT
/*
 * Copyright © 2023 Intel Corporation
 */

#ifndef _INTEL_DISPLAY_PARAMS_H_
#define _INTEL_DISPLAY_PARAMS_H_

struct drm_printer;
struct drm_i915_private;

/*
 * Invoke param, a function-like macro, for each intel display param, with
 * arguments:
 *
 * param(type, name, value, mode)
 *
 * type: parameter type, one of {bool, int, unsigned int, unsigned long, char *}
 * name: name of the parameter
 * value: initial/default value of the parameter
 * mode: debugfs file permissions, one of {0400, 0600, 0}, use 0 to not create
 *       debugfs file
 */
#define INTEL_DISPLAY_PARAMS_FOR_EACH(param) \
	param(int, enable_fbc, -1, 0600) \

#define MEMBER(T, member, ...) T member;
struct intel_display_params {
	INTEL_DISPLAY_PARAMS_FOR_EACH(MEMBER);
};
#undef MEMBER

void intel_display_params_dump(struct drm_i915_private *i915,
			       struct drm_printer *p);
void intel_display_params_copy(struct intel_display_params *dest);
void intel_display_params_free(struct intel_display_params *params);

#endif