summaryrefslogtreecommitdiff
path: root/src/sna/sna_display.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sna/sna_display.c')
-rw-r--r--src/sna/sna_display.c59
1 files changed, 0 insertions, 59 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index a26f4906..15df51f6 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -7949,65 +7949,6 @@ bool sna_mode_pre_init(ScrnInfoPtr scrn, struct sna *sna)
return scrn->modes != NULL;
}
-bool
-sna_mode_wants_tear_free(struct sna *sna)
-{
- xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(sna->scrn);
- bool found = false;
- FILE *file;
- int i;
-
- file = fopen("/sys/module/i915/parameters/enable_fbc", "r");
- if (file) {
- int fbc_enabled = 0;
- int value;
-
- if (fscanf(file, "%d", &value) == 1)
- fbc_enabled = value > 0;
- fclose(file);
-
- DBG(("%s: module parameter 'enable_fbc' enabled? %d\n",
- __FUNCTION__, fbc_enabled));
-
- if (fbc_enabled)
- return true;
- }
-
- for (i = 0; i < sna->mode.num_real_output; i++) {
- struct sna_output *output = to_sna_output(config->output[i]);
- int id = find_property(sna, output, "Panel Self-Refresh");
- if (id == -1)
- continue;
-
- found = true;
- if (output->prop_values[id] != -1) {
- DBG(("%s: Panel Self-Refresh detected on %s\n",
- __FUNCTION__, config->output[i]->name));
- return true;
- }
- }
-
- if (!found) {
- file = fopen("/sys/module/i915/parameters/enable_psr", "r");
- if (file) {
- int psr_enabled = 0;
- int value;
-
- if (fscanf(file, "%d", &value) == 1)
- psr_enabled = value > 0;
- fclose(file);
-
- DBG(("%s: module parameter 'enable_psr' enabled? %d\n",
- __FUNCTION__, psr_enabled));
-
- if (psr_enabled)
- return true;
- }
- }
-
- return false;
-}
-
void
sna_mode_set_primary(struct sna *sna)
{