diff options
author | Andy Walls <awalls@radix.net> | 2008-11-16 21:33:41 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-30 06:38:09 -0500 |
commit | 3f75c6161f28e6a17c547daf552c1127c805c5e7 (patch) | |
tree | 1e4db5013c05946832221bfdca743720091f6582 /drivers/media/video/cx18/cx18-driver.c | |
parent | 72a4f8081af1c53a1673c173ce0fdd85c4b7d403 (diff) |
V4L/DVB (9724): cx18: Streamline cx18-io[ch] wrappers and enforce MMIO retry strategy
cx18: Streamline cx18-io[ch] wrappers and enforce MMIO retry strategy so that
write retries always occur and read retries never occur (as they never help).
Remove MMIO statistics logging to speed up MMIO accesses. Deprecate & ignore
retry_mmio and mmio_ndelay module parameters, to essentially force
retry_mmio=1 and mmio_ndelay=0.
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx18/cx18-driver.c')
-rw-r--r-- | drivers/media/video/cx18/cx18-driver.c | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/drivers/media/video/cx18/cx18-driver.c b/drivers/media/video/cx18/cx18-driver.c index 752ca908ccb1..88ce1e831221 100644 --- a/drivers/media/video/cx18/cx18-driver.c +++ b/drivers/media/video/cx18/cx18-driver.c | |||
@@ -78,14 +78,9 @@ static int radio[CX18_MAX_CARDS] = { -1, -1, -1, -1, -1, -1, -1, -1, | |||
78 | -1, -1, -1, -1, -1, -1, -1, -1, | 78 | -1, -1, -1, -1, -1, -1, -1, -1, |
79 | -1, -1, -1, -1, -1, -1, -1, -1, | 79 | -1, -1, -1, -1, -1, -1, -1, -1, |
80 | -1, -1, -1, -1, -1, -1, -1, -1 }; | 80 | -1, -1, -1, -1, -1, -1, -1, -1 }; |
81 | static int mmio_ndelay[CX18_MAX_CARDS] = { -1, -1, -1, -1, -1, -1, -1, -1, | ||
82 | -1, -1, -1, -1, -1, -1, -1, -1, | ||
83 | -1, -1, -1, -1, -1, -1, -1, -1, | ||
84 | -1, -1, -1, -1, -1, -1, -1, -1 }; | ||
85 | static unsigned cardtype_c = 1; | 81 | static unsigned cardtype_c = 1; |
86 | static unsigned tuner_c = 1; | 82 | static unsigned tuner_c = 1; |
87 | static unsigned radio_c = 1; | 83 | static unsigned radio_c = 1; |
88 | static unsigned mmio_ndelay_c = 1; | ||
89 | static char pal[] = "--"; | 84 | static char pal[] = "--"; |
90 | static char secam[] = "--"; | 85 | static char secam[] = "--"; |
91 | static char ntsc[] = "-"; | 86 | static char ntsc[] = "-"; |
@@ -99,18 +94,20 @@ static int enc_pcm_buffers = CX18_DEFAULT_ENC_PCM_BUFFERS; | |||
99 | 94 | ||
100 | static int cx18_pci_latency = 1; | 95 | static int cx18_pci_latency = 1; |
101 | 96 | ||
102 | int cx18_retry_mmio = 1; | 97 | static int mmio_ndelay; |
98 | static int retry_mmio = 1; | ||
99 | |||
103 | int cx18_debug; | 100 | int cx18_debug; |
104 | 101 | ||
105 | module_param_array(tuner, int, &tuner_c, 0644); | 102 | module_param_array(tuner, int, &tuner_c, 0644); |
106 | module_param_array(radio, bool, &radio_c, 0644); | 103 | module_param_array(radio, bool, &radio_c, 0644); |
107 | module_param_array(cardtype, int, &cardtype_c, 0644); | 104 | module_param_array(cardtype, int, &cardtype_c, 0644); |
108 | module_param_array(mmio_ndelay, int, &mmio_ndelay_c, 0644); | ||
109 | module_param_string(pal, pal, sizeof(pal), 0644); | 105 | module_param_string(pal, pal, sizeof(pal), 0644); |
110 | module_param_string(secam, secam, sizeof(secam), 0644); | 106 | module_param_string(secam, secam, sizeof(secam), 0644); |
111 | module_param_string(ntsc, ntsc, sizeof(ntsc), 0644); | 107 | module_param_string(ntsc, ntsc, sizeof(ntsc), 0644); |
112 | module_param_named(debug, cx18_debug, int, 0644); | 108 | module_param_named(debug, cx18_debug, int, 0644); |
113 | module_param_named(retry_mmio, cx18_retry_mmio, int, 0644); | 109 | module_param(mmio_ndelay, int, 0644); |
110 | module_param(retry_mmio, int, 0644); | ||
114 | module_param(cx18_pci_latency, int, 0644); | 111 | module_param(cx18_pci_latency, int, 0644); |
115 | module_param(cx18_first_minor, int, 0644); | 112 | module_param(cx18_first_minor, int, 0644); |
116 | 113 | ||
@@ -155,13 +152,11 @@ MODULE_PARM_DESC(cx18_pci_latency, | |||
155 | "Change the PCI latency to 64 if lower: 0 = No, 1 = Yes,\n" | 152 | "Change the PCI latency to 64 if lower: 0 = No, 1 = Yes,\n" |
156 | "\t\t\tDefault: Yes"); | 153 | "\t\t\tDefault: Yes"); |
157 | MODULE_PARM_DESC(retry_mmio, | 154 | MODULE_PARM_DESC(retry_mmio, |
158 | "Check and retry memory mapped IO accesses\n" | 155 | "(Deprecated) MMIO writes are now always checked and retried\n" |
159 | "\t\t\tDefault: 1 [Yes]"); | 156 | "\t\t\tEffectively: 1 [Yes]"); |
160 | MODULE_PARM_DESC(mmio_ndelay, | 157 | MODULE_PARM_DESC(mmio_ndelay, |
161 | "Delay (ns) for each CX23418 memory mapped IO access.\n" | 158 | "(Deprecated) MMIO accesses are now never purposely delayed\n" |
162 | "\t\t\tTry larger values that are close to a multiple of the\n" | 159 | "\t\t\tEffectively: 0 ns"); |
163 | "\t\t\tPCI clock period, 30.3 ns, if your card doesn't work.\n" | ||
164 | "\t\t\tDefault: " __stringify(CX18_DEFAULT_MMIO_NDELAY)); | ||
165 | MODULE_PARM_DESC(enc_mpg_buffers, | 160 | MODULE_PARM_DESC(enc_mpg_buffers, |
166 | "Encoder MPG Buffers (in MB)\n" | 161 | "Encoder MPG Buffers (in MB)\n" |
167 | "\t\t\tDefault: " __stringify(CX18_DEFAULT_ENC_MPG_BUFFERS)); | 162 | "\t\t\tDefault: " __stringify(CX18_DEFAULT_ENC_MPG_BUFFERS)); |
@@ -378,11 +373,6 @@ static void cx18_process_options(struct cx18 *cx) | |||
378 | cx->options.tuner = tuner[cx->num]; | 373 | cx->options.tuner = tuner[cx->num]; |
379 | cx->options.radio = radio[cx->num]; | 374 | cx->options.radio = radio[cx->num]; |
380 | 375 | ||
381 | if (mmio_ndelay[cx->num] < 0) | ||
382 | cx->options.mmio_ndelay = CX18_DEFAULT_MMIO_NDELAY; | ||
383 | else | ||
384 | cx->options.mmio_ndelay = mmio_ndelay[cx->num]; | ||
385 | |||
386 | cx->std = cx18_parse_std(cx); | 376 | cx->std = cx18_parse_std(cx); |
387 | if (cx->options.cardtype == -1) { | 377 | if (cx->options.cardtype == -1) { |
388 | CX18_INFO("Ignore card\n"); | 378 | CX18_INFO("Ignore card\n"); |