Merge branches 'tracing/ftrace' and 'tracing/urgent' into tracing/core
This commit is contained in:
commit
f9915bfef3
|
@ -36,10 +36,10 @@
|
|||
#include <linux/vmalloc.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/hardirq.h>
|
||||
|
||||
#include <asm/pgalloc.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/hardirq.h>
|
||||
#include <asm/mmu_context.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/mmu.h>
|
||||
|
|
|
@ -51,6 +51,7 @@ static inline int __raw_spin_is_contended(raw_spinlock_t *lock)
|
|||
|
||||
return (((counters >> 14) - counters) & 0x1fff) > 1;
|
||||
}
|
||||
#define __raw_spin_is_contended __raw_spin_is_contended
|
||||
|
||||
static inline void __raw_spin_lock(raw_spinlock_t *lock)
|
||||
{
|
||||
|
|
|
@ -1402,6 +1402,7 @@ static inline int __raw_spin_is_contended(struct raw_spinlock *lock)
|
|||
{
|
||||
return PVOP_CALL1(int, pv_lock_ops.spin_is_contended, lock);
|
||||
}
|
||||
#define __raw_spin_is_contended __raw_spin_is_contended
|
||||
|
||||
static __always_inline void __raw_spin_lock(struct raw_spinlock *lock)
|
||||
{
|
||||
|
|
|
@ -245,6 +245,7 @@ static inline int __raw_spin_is_contended(raw_spinlock_t *lock)
|
|||
{
|
||||
return __ticket_spin_is_contended(lock);
|
||||
}
|
||||
#define __raw_spin_is_contended __raw_spin_is_contended
|
||||
|
||||
static __always_inline void __raw_spin_lock(raw_spinlock_t *lock)
|
||||
{
|
||||
|
|
|
@ -939,10 +939,25 @@ static void powernow_k8_cpu_exit_acpi(struct powernow_k8_data *data)
|
|||
free_cpumask_var(data->acpi_data.shared_cpu_map);
|
||||
}
|
||||
|
||||
static int get_transition_latency(struct powernow_k8_data *data)
|
||||
{
|
||||
int max_latency = 0;
|
||||
int i;
|
||||
for (i = 0; i < data->acpi_data.state_count; i++) {
|
||||
int cur_latency = data->acpi_data.states[i].transition_latency
|
||||
+ data->acpi_data.states[i].bus_master_latency;
|
||||
if (cur_latency > max_latency)
|
||||
max_latency = cur_latency;
|
||||
}
|
||||
/* value in usecs, needs to be in nanoseconds */
|
||||
return 1000 * max_latency;
|
||||
}
|
||||
|
||||
#else
|
||||
static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data) { return -ENODEV; }
|
||||
static void powernow_k8_cpu_exit_acpi(struct powernow_k8_data *data) { return; }
|
||||
static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned int index) { return; }
|
||||
static int get_transition_latency(struct powernow_k8_data *data) { return 0; }
|
||||
#endif /* CONFIG_X86_POWERNOW_K8_ACPI */
|
||||
|
||||
/* Take a frequency, and issue the fid/vid transition command */
|
||||
|
@ -1173,7 +1188,13 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
|
|||
if (rc) {
|
||||
goto err_out;
|
||||
}
|
||||
}
|
||||
/* Take a crude guess here.
|
||||
* That guess was in microseconds, so multiply with 1000 */
|
||||
pol->cpuinfo.transition_latency = (
|
||||
((data->rvo + 8) * data->vstable * VST_UNITS_20US) +
|
||||
((1 << data->irt) * 30)) * 1000;
|
||||
} else /* ACPI _PSS objects available */
|
||||
pol->cpuinfo.transition_latency = get_transition_latency(data);
|
||||
|
||||
/* only run on specific CPU from here on */
|
||||
oldmask = current->cpus_allowed;
|
||||
|
@ -1204,11 +1225,6 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
|
|||
cpumask_copy(pol->cpus, &per_cpu(cpu_core_map, pol->cpu));
|
||||
data->available_cores = pol->cpus;
|
||||
|
||||
/* Take a crude guess here.
|
||||
* That guess was in microseconds, so multiply with 1000 */
|
||||
pol->cpuinfo.transition_latency = (((data->rvo + 8) * data->vstable * VST_UNITS_20US)
|
||||
+ (3 * (1 << data->irt) * 10)) * 1000;
|
||||
|
||||
if (cpu_family == CPU_HW_PSTATE)
|
||||
pol->cur = find_khz_freq_from_pstate(data->powernow_table, data->currpstate);
|
||||
else
|
||||
|
|
|
@ -149,6 +149,9 @@ static struct crypto_larval *__crypto_register_alg(struct crypto_alg *alg)
|
|||
if (q == alg)
|
||||
goto err;
|
||||
|
||||
if (crypto_is_moribund(q))
|
||||
continue;
|
||||
|
||||
if (crypto_is_larval(q)) {
|
||||
if (!strcmp(alg->cra_driver_name, q->cra_driver_name))
|
||||
goto err;
|
||||
|
@ -197,7 +200,7 @@ void crypto_alg_tested(const char *name, int err)
|
|||
|
||||
down_write(&crypto_alg_sem);
|
||||
list_for_each_entry(q, &crypto_alg_list, cra_list) {
|
||||
if (!crypto_is_larval(q))
|
||||
if (crypto_is_moribund(q) || !crypto_is_larval(q))
|
||||
continue;
|
||||
|
||||
test = (struct crypto_larval *)q;
|
||||
|
@ -210,6 +213,7 @@ void crypto_alg_tested(const char *name, int err)
|
|||
goto unlock;
|
||||
|
||||
found:
|
||||
q->cra_flags |= CRYPTO_ALG_DEAD;
|
||||
alg = test->adult;
|
||||
if (err || list_empty(&alg->cra_list))
|
||||
goto complete;
|
||||
|
|
20
crypto/api.c
20
crypto/api.c
|
@ -557,34 +557,34 @@ err:
|
|||
return ERR_PTR(err);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(crypto_alloc_tfm);
|
||||
|
||||
|
||||
/*
|
||||
* crypto_free_tfm - Free crypto transform
|
||||
* crypto_destroy_tfm - Free crypto transform
|
||||
* @mem: Start of tfm slab
|
||||
* @tfm: Transform to free
|
||||
*
|
||||
* crypto_free_tfm() frees up the transform and any associated resources,
|
||||
* This function frees up the transform and any associated resources,
|
||||
* then drops the refcount on the associated algorithm.
|
||||
*/
|
||||
void crypto_free_tfm(struct crypto_tfm *tfm)
|
||||
void crypto_destroy_tfm(void *mem, struct crypto_tfm *tfm)
|
||||
{
|
||||
struct crypto_alg *alg;
|
||||
int size;
|
||||
|
||||
if (unlikely(!tfm))
|
||||
if (unlikely(!mem))
|
||||
return;
|
||||
|
||||
alg = tfm->__crt_alg;
|
||||
size = sizeof(*tfm) + alg->cra_ctxsize;
|
||||
size = ksize(mem);
|
||||
|
||||
if (!tfm->exit && alg->cra_exit)
|
||||
alg->cra_exit(tfm);
|
||||
crypto_exit_ops(tfm);
|
||||
crypto_mod_put(alg);
|
||||
memset(tfm, 0, size);
|
||||
kfree(tfm);
|
||||
memset(mem, 0, size);
|
||||
kfree(mem);
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL_GPL(crypto_free_tfm);
|
||||
EXPORT_SYMBOL_GPL(crypto_destroy_tfm);
|
||||
|
||||
int crypto_has_alg(const char *name, u32 type, u32 mask)
|
||||
{
|
||||
|
|
|
@ -54,7 +54,8 @@ static void scatterwalk_pagedone(struct scatter_walk *walk, int out,
|
|||
struct page *page;
|
||||
|
||||
page = sg_page(walk->sg) + ((walk->offset - 1) >> PAGE_SHIFT);
|
||||
flush_dcache_page(page);
|
||||
if (!PageSlab(page))
|
||||
flush_dcache_page(page);
|
||||
}
|
||||
|
||||
if (more) {
|
||||
|
|
|
@ -388,10 +388,15 @@ static int crypto_init_shash_ops_compat(struct crypto_tfm *tfm)
|
|||
struct shash_desc *desc = crypto_tfm_ctx(tfm);
|
||||
struct crypto_shash *shash;
|
||||
|
||||
if (!crypto_mod_get(calg))
|
||||
return -EAGAIN;
|
||||
|
||||
shash = __crypto_shash_cast(crypto_create_tfm(
|
||||
calg, &crypto_shash_type));
|
||||
if (IS_ERR(shash))
|
||||
if (IS_ERR(shash)) {
|
||||
crypto_mod_put(calg);
|
||||
return PTR_ERR(shash);
|
||||
}
|
||||
|
||||
desc->tfm = shash;
|
||||
tfm->exit = crypto_exit_shash_ops_compat;
|
||||
|
|
|
@ -117,11 +117,7 @@ static inline cputime64_t get_cpu_idle_time_jiffy(unsigned int cpu,
|
|||
busy_time = cputime64_add(busy_time, kstat_cpu(cpu).cpustat.irq);
|
||||
busy_time = cputime64_add(busy_time, kstat_cpu(cpu).cpustat.softirq);
|
||||
busy_time = cputime64_add(busy_time, kstat_cpu(cpu).cpustat.steal);
|
||||
|
||||
if (!dbs_tuners_ins.ignore_nice) {
|
||||
busy_time = cputime64_add(busy_time,
|
||||
kstat_cpu(cpu).cpustat.nice);
|
||||
}
|
||||
busy_time = cputime64_add(busy_time, kstat_cpu(cpu).cpustat.nice);
|
||||
|
||||
idle_time = cputime64_sub(cur_wall_time, busy_time);
|
||||
if (wall)
|
||||
|
@ -137,23 +133,6 @@ static inline cputime64_t get_cpu_idle_time(unsigned int cpu, cputime64_t *wall)
|
|||
if (idle_time == -1ULL)
|
||||
return get_cpu_idle_time_jiffy(cpu, wall);
|
||||
|
||||
if (dbs_tuners_ins.ignore_nice) {
|
||||
cputime64_t cur_nice;
|
||||
unsigned long cur_nice_jiffies;
|
||||
struct cpu_dbs_info_s *dbs_info;
|
||||
|
||||
dbs_info = &per_cpu(cpu_dbs_info, cpu);
|
||||
cur_nice = cputime64_sub(kstat_cpu(cpu).cpustat.nice,
|
||||
dbs_info->prev_cpu_nice);
|
||||
/*
|
||||
* Assumption: nice time between sampling periods will be
|
||||
* less than 2^32 jiffies for 32 bit sys
|
||||
*/
|
||||
cur_nice_jiffies = (unsigned long)
|
||||
cputime64_to_jiffies64(cur_nice);
|
||||
dbs_info->prev_cpu_nice = kstat_cpu(cpu).cpustat.nice;
|
||||
return idle_time + jiffies_to_usecs(cur_nice_jiffies);
|
||||
}
|
||||
return idle_time;
|
||||
}
|
||||
|
||||
|
@ -319,6 +298,9 @@ static ssize_t store_ignore_nice_load(struct cpufreq_policy *policy,
|
|||
dbs_info = &per_cpu(cpu_dbs_info, j);
|
||||
dbs_info->prev_cpu_idle = get_cpu_idle_time(j,
|
||||
&dbs_info->prev_cpu_wall);
|
||||
if (dbs_tuners_ins.ignore_nice)
|
||||
dbs_info->prev_cpu_nice = kstat_cpu(j).cpustat.nice;
|
||||
|
||||
}
|
||||
mutex_unlock(&dbs_mutex);
|
||||
|
||||
|
@ -419,6 +401,23 @@ static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info)
|
|||
j_dbs_info->prev_cpu_idle);
|
||||
j_dbs_info->prev_cpu_idle = cur_idle_time;
|
||||
|
||||
if (dbs_tuners_ins.ignore_nice) {
|
||||
cputime64_t cur_nice;
|
||||
unsigned long cur_nice_jiffies;
|
||||
|
||||
cur_nice = cputime64_sub(kstat_cpu(j).cpustat.nice,
|
||||
j_dbs_info->prev_cpu_nice);
|
||||
/*
|
||||
* Assumption: nice time between sampling periods will
|
||||
* be less than 2^32 jiffies for 32 bit sys
|
||||
*/
|
||||
cur_nice_jiffies = (unsigned long)
|
||||
cputime64_to_jiffies64(cur_nice);
|
||||
|
||||
j_dbs_info->prev_cpu_nice = kstat_cpu(j).cpustat.nice;
|
||||
idle_time += jiffies_to_usecs(cur_nice_jiffies);
|
||||
}
|
||||
|
||||
if (unlikely(!wall_time || wall_time < idle_time))
|
||||
continue;
|
||||
|
||||
|
@ -575,6 +574,10 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy,
|
|||
|
||||
j_dbs_info->prev_cpu_idle = get_cpu_idle_time(j,
|
||||
&j_dbs_info->prev_cpu_wall);
|
||||
if (dbs_tuners_ins.ignore_nice) {
|
||||
j_dbs_info->prev_cpu_nice =
|
||||
kstat_cpu(j).cpustat.nice;
|
||||
}
|
||||
}
|
||||
this_dbs_info->cpu = cpu;
|
||||
/*
|
||||
|
|
|
@ -70,7 +70,7 @@ config DRM_I915
|
|||
select FB_CFB_FILLRECT
|
||||
select FB_CFB_COPYAREA
|
||||
select FB_CFB_IMAGEBLIT
|
||||
depends on FB
|
||||
select FB
|
||||
tristate "i915 driver"
|
||||
help
|
||||
Choose this option if you have a system that has Intel 830M, 845G,
|
||||
|
|
|
@ -276,6 +276,7 @@ int drm_irq_uninstall(struct drm_device * dev)
|
|||
for (i = 0; i < dev->num_crtcs; i++) {
|
||||
DRM_WAKEUP(&dev->vbl_queue[i]);
|
||||
dev->vblank_enabled[i] = 0;
|
||||
dev->last_vblank[i] = dev->driver->get_vblank_counter(dev, i);
|
||||
}
|
||||
spin_unlock_irqrestore(&dev->vbl_lock, irqflags);
|
||||
|
||||
|
|
|
@ -171,9 +171,14 @@ EXPORT_SYMBOL(drm_core_ioremap);
|
|||
|
||||
void drm_core_ioremap_wc(struct drm_map *map, struct drm_device *dev)
|
||||
{
|
||||
map->handle = ioremap_wc(map->offset, map->size);
|
||||
if (drm_core_has_AGP(dev) &&
|
||||
dev->agp && dev->agp->cant_use_aperture && map->type == _DRM_AGP)
|
||||
map->handle = agp_remap(map->offset, map->size, dev);
|
||||
else
|
||||
map->handle = ioremap_wc(map->offset, map->size);
|
||||
}
|
||||
EXPORT_SYMBOL(drm_core_ioremap_wc);
|
||||
|
||||
void drm_core_ioremapfree(struct drm_map *map, struct drm_device *dev)
|
||||
{
|
||||
if (!map->handle || !map->size)
|
||||
|
|
|
@ -731,8 +731,11 @@ static int i915_getparam(struct drm_device *dev, void *data,
|
|||
case I915_PARAM_HAS_GEM:
|
||||
value = dev_priv->has_gem;
|
||||
break;
|
||||
case I915_PARAM_NUM_FENCES_AVAIL:
|
||||
value = dev_priv->num_fence_regs - dev_priv->fence_reg_start;
|
||||
break;
|
||||
default:
|
||||
DRM_ERROR("Unknown parameter %d\n", param->param);
|
||||
DRM_DEBUG("Unknown parameter %d\n", param->param);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -764,8 +767,15 @@ static int i915_setparam(struct drm_device *dev, void *data,
|
|||
case I915_SETPARAM_ALLOW_BATCHBUFFER:
|
||||
dev_priv->allow_batchbuffer = param->value;
|
||||
break;
|
||||
case I915_SETPARAM_NUM_USED_FENCES:
|
||||
if (param->value > dev_priv->num_fence_regs ||
|
||||
param->value < 0)
|
||||
return -EINVAL;
|
||||
/* Userspace can use first N regs */
|
||||
dev_priv->fence_reg_start = param->value;
|
||||
break;
|
||||
default:
|
||||
DRM_ERROR("unknown parameter %d\n", param->param);
|
||||
DRM_DEBUG("unknown parameter %d\n", param->param);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -966,10 +976,6 @@ static int i915_load_modeset_init(struct drm_device *dev)
|
|||
if (ret)
|
||||
goto kfree_devname;
|
||||
|
||||
dev_priv->mm.gtt_mapping =
|
||||
io_mapping_create_wc(dev->agp->base,
|
||||
dev->agp->agp_info.aper_size * 1024*1024);
|
||||
|
||||
/* Allow hardware batchbuffers unless told otherwise.
|
||||
*/
|
||||
dev_priv->allow_batchbuffer = 1;
|
||||
|
@ -1081,6 +1087,23 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
|
|||
goto free_priv;
|
||||
}
|
||||
|
||||
dev_priv->mm.gtt_mapping =
|
||||
io_mapping_create_wc(dev->agp->base,
|
||||
dev->agp->agp_info.aper_size * 1024*1024);
|
||||
/* Set up a WC MTRR for non-PAT systems. This is more common than
|
||||
* one would think, because the kernel disables PAT on first
|
||||
* generation Core chips because WC PAT gets overridden by a UC
|
||||
* MTRR if present. Even if a UC MTRR isn't present.
|
||||
*/
|
||||
dev_priv->mm.gtt_mtrr = mtrr_add(dev->agp->base,
|
||||
dev->agp->agp_info.aper_size *
|
||||
1024 * 1024,
|
||||
MTRR_TYPE_WRCOMB, 1);
|
||||
if (dev_priv->mm.gtt_mtrr < 0) {
|
||||
DRM_INFO("MTRR allocation failed\n. Graphics "
|
||||
"performance may suffer.\n");
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HIGHMEM64G
|
||||
/* don't enable GEM on PAE - needs agp + set_memory_* interface fixes */
|
||||
dev_priv->has_gem = 0;
|
||||
|
@ -1089,6 +1112,10 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
|
|||
dev_priv->has_gem = 1;
|
||||
#endif
|
||||
|
||||
dev->driver->get_vblank_counter = i915_get_vblank_counter;
|
||||
if (IS_GM45(dev))
|
||||
dev->driver->get_vblank_counter = gm45_get_vblank_counter;
|
||||
|
||||
i915_gem_load(dev);
|
||||
|
||||
/* Init HWS */
|
||||
|
@ -1145,8 +1172,14 @@ int i915_driver_unload(struct drm_device *dev)
|
|||
{
|
||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||
|
||||
io_mapping_free(dev_priv->mm.gtt_mapping);
|
||||
if (dev_priv->mm.gtt_mtrr >= 0) {
|
||||
mtrr_del(dev_priv->mm.gtt_mtrr, dev->agp->base,
|
||||
dev->agp->agp_info.aper_size * 1024 * 1024);
|
||||
dev_priv->mm.gtt_mtrr = -1;
|
||||
}
|
||||
|
||||
if (drm_core_check_feature(dev, DRIVER_MODESET)) {
|
||||
io_mapping_free(dev_priv->mm.gtt_mapping);
|
||||
drm_irq_uninstall(dev);
|
||||
}
|
||||
|
||||
|
|
|
@ -112,7 +112,6 @@ static struct drm_driver driver = {
|
|||
.suspend = i915_suspend,
|
||||
.resume = i915_resume,
|
||||
.device_is_agp = i915_driver_device_is_agp,
|
||||
.get_vblank_counter = i915_get_vblank_counter,
|
||||
.enable_vblank = i915_enable_vblank,
|
||||
.disable_vblank = i915_disable_vblank,
|
||||
.irq_preinstall = i915_driver_irq_preinstall,
|
||||
|
|
|
@ -284,6 +284,7 @@ typedef struct drm_i915_private {
|
|||
struct drm_mm gtt_space;
|
||||
|
||||
struct io_mapping *gtt_mapping;
|
||||
int gtt_mtrr;
|
||||
|
||||
/**
|
||||
* List of objects currently involved in rendering from the
|
||||
|
@ -534,6 +535,7 @@ extern int i915_vblank_pipe_get(struct drm_device *dev, void *data,
|
|||
extern int i915_enable_vblank(struct drm_device *dev, int crtc);
|
||||
extern void i915_disable_vblank(struct drm_device *dev, int crtc);
|
||||
extern u32 i915_get_vblank_counter(struct drm_device *dev, int crtc);
|
||||
extern u32 gm45_get_vblank_counter(struct drm_device *dev, int crtc);
|
||||
extern int i915_vblank_swap(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
extern void i915_enable_irq(drm_i915_private_t *dev_priv, u32 mask);
|
||||
|
@ -601,6 +603,7 @@ int i915_gem_init_object(struct drm_gem_object *obj);
|
|||
void i915_gem_free_object(struct drm_gem_object *obj);
|
||||
int i915_gem_object_pin(struct drm_gem_object *obj, uint32_t alignment);
|
||||
void i915_gem_object_unpin(struct drm_gem_object *obj);
|
||||
int i915_gem_object_unbind(struct drm_gem_object *obj);
|
||||
void i915_gem_lastclose(struct drm_device *dev);
|
||||
uint32_t i915_get_gem_seqno(struct drm_device *dev);
|
||||
void i915_gem_retire_requests(struct drm_device *dev);
|
||||
|
@ -784,6 +787,11 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
|
|||
IS_I945GM(dev) || IS_I965GM(dev) || IS_GM45(dev))
|
||||
|
||||
#define I915_NEED_GFX_HWS(dev) (IS_G33(dev) || IS_GM45(dev) || IS_G4X(dev))
|
||||
/* With the 945 and later, Y tiling got adjusted so that it was 32 128-byte
|
||||
* rows, which changed the alignment requirements and fence programming.
|
||||
*/
|
||||
#define HAS_128_BYTE_Y_TILING(dev) (IS_I9XX(dev) && !(IS_I915G(dev) || \
|
||||
IS_I915GM(dev)))
|
||||
#define SUPPORTS_INTEGRATED_HDMI(dev) (IS_G4X(dev))
|
||||
|
||||
#define PRIMARY_RINGBUFFER_SIZE (128*1024)
|
||||
|
|
|
@ -52,7 +52,7 @@ static void i915_gem_object_free_page_list(struct drm_gem_object *obj);
|
|||
static int i915_gem_object_wait_rendering(struct drm_gem_object *obj);
|
||||
static int i915_gem_object_bind_to_gtt(struct drm_gem_object *obj,
|
||||
unsigned alignment);
|
||||
static void i915_gem_object_get_fence_reg(struct drm_gem_object *obj);
|
||||
static int i915_gem_object_get_fence_reg(struct drm_gem_object *obj, bool write);
|
||||
static void i915_gem_clear_fence_reg(struct drm_gem_object *obj);
|
||||
static int i915_gem_evict_something(struct drm_device *dev);
|
||||
static int i915_gem_phys_pwrite(struct drm_device *dev, struct drm_gem_object *obj,
|
||||
|
@ -567,6 +567,7 @@ int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
|
|||
pgoff_t page_offset;
|
||||
unsigned long pfn;
|
||||
int ret = 0;
|
||||
bool write = !!(vmf->flags & FAULT_FLAG_WRITE);
|
||||
|
||||
/* We don't use vmf->pgoff since that has the fake offset */
|
||||
page_offset = ((unsigned long)vmf->virtual_address - vma->vm_start) >>
|
||||
|
@ -585,8 +586,13 @@ int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
|
|||
|
||||
/* Need a new fence register? */
|
||||
if (obj_priv->fence_reg == I915_FENCE_REG_NONE &&
|
||||
obj_priv->tiling_mode != I915_TILING_NONE)
|
||||
i915_gem_object_get_fence_reg(obj);
|
||||
obj_priv->tiling_mode != I915_TILING_NONE) {
|
||||
ret = i915_gem_object_get_fence_reg(obj, write);
|
||||
if (ret) {
|
||||
mutex_unlock(&dev->struct_mutex);
|
||||
return VM_FAULT_SIGBUS;
|
||||
}
|
||||
}
|
||||
|
||||
pfn = ((dev->agp->base + obj_priv->gtt_offset) >> PAGE_SHIFT) +
|
||||
page_offset;
|
||||
|
@ -1211,7 +1217,7 @@ i915_gem_object_wait_rendering(struct drm_gem_object *obj)
|
|||
/**
|
||||
* Unbinds an object from the GTT aperture.
|
||||
*/
|
||||
static int
|
||||
int
|
||||
i915_gem_object_unbind(struct drm_gem_object *obj)
|
||||
{
|
||||
struct drm_device *dev = obj->dev;
|
||||
|
@ -1445,21 +1451,26 @@ static void i915_write_fence_reg(struct drm_i915_fence_reg *reg)
|
|||
drm_i915_private_t *dev_priv = dev->dev_private;
|
||||
struct drm_i915_gem_object *obj_priv = obj->driver_private;
|
||||
int regnum = obj_priv->fence_reg;
|
||||
int tile_width;
|
||||
uint32_t val;
|
||||
uint32_t pitch_val;
|
||||
|
||||
if ((obj_priv->gtt_offset & ~I915_FENCE_START_MASK) ||
|
||||
(obj_priv->gtt_offset & (obj->size - 1))) {
|
||||
WARN(1, "%s: object not 1M or size aligned\n", __func__);
|
||||
WARN(1, "%s: object 0x%08x not 1M or size (0x%zx) aligned\n",
|
||||
__func__, obj_priv->gtt_offset, obj->size);
|
||||
return;
|
||||
}
|
||||
|
||||
if (obj_priv->tiling_mode == I915_TILING_Y && (IS_I945G(dev) ||
|
||||
IS_I945GM(dev) ||
|
||||
IS_G33(dev)))
|
||||
pitch_val = (obj_priv->stride / 128) - 1;
|
||||
if (obj_priv->tiling_mode == I915_TILING_Y &&
|
||||
HAS_128_BYTE_Y_TILING(dev))
|
||||
tile_width = 128;
|
||||
else
|
||||
pitch_val = (obj_priv->stride / 512) - 1;
|
||||
tile_width = 512;
|
||||
|
||||
/* Note: pitch better be a power of two tile widths */
|
||||
pitch_val = obj_priv->stride / tile_width;
|
||||
pitch_val = ffs(pitch_val) - 1;
|
||||
|
||||
val = obj_priv->gtt_offset;
|
||||
if (obj_priv->tiling_mode == I915_TILING_Y)
|
||||
|
@ -1483,7 +1494,8 @@ static void i830_write_fence_reg(struct drm_i915_fence_reg *reg)
|
|||
|
||||
if ((obj_priv->gtt_offset & ~I915_FENCE_START_MASK) ||
|
||||
(obj_priv->gtt_offset & (obj->size - 1))) {
|
||||
WARN(1, "%s: object not 1M or size aligned\n", __func__);
|
||||
WARN(1, "%s: object 0x%08x not 1M or size aligned\n",
|
||||
__func__, obj_priv->gtt_offset);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1503,6 +1515,7 @@ static void i830_write_fence_reg(struct drm_i915_fence_reg *reg)
|
|||
/**
|
||||
* i915_gem_object_get_fence_reg - set up a fence reg for an object
|
||||
* @obj: object to map through a fence reg
|
||||
* @write: object is about to be written
|
||||
*
|
||||
* When mapping objects through the GTT, userspace wants to be able to write
|
||||
* to them without having to worry about swizzling if the object is tiled.
|
||||
|
@ -1513,8 +1526,8 @@ static void i830_write_fence_reg(struct drm_i915_fence_reg *reg)
|
|||
* It then sets up the reg based on the object's properties: address, pitch
|
||||
* and tiling format.
|
||||
*/
|
||||
static void
|
||||
i915_gem_object_get_fence_reg(struct drm_gem_object *obj)
|
||||
static int
|
||||
i915_gem_object_get_fence_reg(struct drm_gem_object *obj, bool write)
|
||||
{
|
||||
struct drm_device *dev = obj->dev;
|
||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||
|
@ -1527,12 +1540,18 @@ i915_gem_object_get_fence_reg(struct drm_gem_object *obj)
|
|||
WARN(1, "allocating a fence for non-tiled object?\n");
|
||||
break;
|
||||
case I915_TILING_X:
|
||||
WARN(obj_priv->stride & (512 - 1),
|
||||
"object is X tiled but has non-512B pitch\n");
|
||||
if (!obj_priv->stride)
|
||||
return -EINVAL;
|
||||
WARN((obj_priv->stride & (512 - 1)),
|
||||
"object 0x%08x is X tiled but has non-512B pitch\n",
|
||||
obj_priv->gtt_offset);
|
||||
break;
|
||||
case I915_TILING_Y:
|
||||
WARN(obj_priv->stride & (128 - 1),
|
||||
"object is Y tiled but has non-128B pitch\n");
|
||||
if (!obj_priv->stride)
|
||||
return -EINVAL;
|
||||
WARN((obj_priv->stride & (128 - 1)),
|
||||
"object 0x%08x is Y tiled but has non-128B pitch\n",
|
||||
obj_priv->gtt_offset);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1563,10 +1582,11 @@ try_again:
|
|||
* objects to finish before trying again.
|
||||
*/
|
||||
if (i == dev_priv->num_fence_regs) {
|
||||
ret = i915_gem_object_wait_rendering(reg->obj);
|
||||
ret = i915_gem_object_set_to_gtt_domain(reg->obj, 0);
|
||||
if (ret) {
|
||||
WARN(ret, "wait_rendering failed: %d\n", ret);
|
||||
return;
|
||||
WARN(ret != -ERESTARTSYS,
|
||||
"switch to GTT domain failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
goto try_again;
|
||||
}
|
||||
|
@ -1591,6 +1611,8 @@ try_again:
|
|||
i915_write_fence_reg(reg);
|
||||
else
|
||||
i830_write_fence_reg(reg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1631,7 +1653,7 @@ i915_gem_object_bind_to_gtt(struct drm_gem_object *obj, unsigned alignment)
|
|||
if (dev_priv->mm.suspended)
|
||||
return -EBUSY;
|
||||
if (alignment == 0)
|
||||
alignment = PAGE_SIZE;
|
||||
alignment = i915_gem_get_gtt_alignment(obj);
|
||||
if (alignment & (PAGE_SIZE - 1)) {
|
||||
DRM_ERROR("Invalid object alignment requested %u\n", alignment);
|
||||
return -EINVAL;
|
||||
|
@ -2652,6 +2674,14 @@ i915_gem_object_pin(struct drm_gem_object *obj, uint32_t alignment)
|
|||
DRM_ERROR("Failure to bind: %d", ret);
|
||||
return ret;
|
||||
}
|
||||
/*
|
||||
* Pre-965 chips need a fence register set up in order to
|
||||
* properly handle tiled surfaces.
|
||||
*/
|
||||
if (!IS_I965G(dev) &&
|
||||
obj_priv->fence_reg == I915_FENCE_REG_NONE &&
|
||||
obj_priv->tiling_mode != I915_TILING_NONE)
|
||||
i915_gem_object_get_fence_reg(obj, true);
|
||||
}
|
||||
obj_priv->pin_count++;
|
||||
|
||||
|
@ -3229,10 +3259,6 @@ i915_gem_entervt_ioctl(struct drm_device *dev, void *data,
|
|||
dev_priv->mm.wedged = 0;
|
||||
}
|
||||
|
||||
dev_priv->mm.gtt_mapping = io_mapping_create_wc(dev->agp->base,
|
||||
dev->agp->agp_info.aper_size
|
||||
* 1024 * 1024);
|
||||
|
||||
mutex_lock(&dev->struct_mutex);
|
||||
dev_priv->mm.suspended = 0;
|
||||
|
||||
|
@ -3255,7 +3281,6 @@ int
|
|||
i915_gem_leavevt_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv)
|
||||
{
|
||||
drm_i915_private_t *dev_priv = dev->dev_private;
|
||||
int ret;
|
||||
|
||||
if (drm_core_check_feature(dev, DRIVER_MODESET))
|
||||
|
@ -3264,7 +3289,6 @@ i915_gem_leavevt_ioctl(struct drm_device *dev, void *data,
|
|||
ret = i915_gem_idle(dev);
|
||||
drm_irq_uninstall(dev);
|
||||
|
||||
io_mapping_free(dev_priv->mm.gtt_mapping);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -3273,6 +3297,9 @@ i915_gem_lastclose(struct drm_device *dev)
|
|||
{
|
||||
int ret;
|
||||
|
||||
if (drm_core_check_feature(dev, DRIVER_MODESET))
|
||||
return;
|
||||
|
||||
ret = i915_gem_idle(dev);
|
||||
if (ret)
|
||||
DRM_ERROR("failed to idle hardware: %d\n", ret);
|
||||
|
@ -3294,7 +3321,7 @@ i915_gem_load(struct drm_device *dev)
|
|||
/* Old X drivers will take 0-2 for front, back, depth buffers */
|
||||
dev_priv->fence_reg_start = 3;
|
||||
|
||||
if (IS_I965G(dev))
|
||||
if (IS_I965G(dev) || IS_I945G(dev) || IS_I945GM(dev) || IS_G33(dev))
|
||||
dev_priv->num_fence_regs = 16;
|
||||
else
|
||||
dev_priv->num_fence_regs = 8;
|
||||
|
|
|
@ -173,6 +173,73 @@ i915_gem_detect_bit_6_swizzle(struct drm_device *dev)
|
|||
dev_priv->mm.bit_6_swizzle_y = swizzle_y;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the size of the fence for a tiled object of the given size.
|
||||
*/
|
||||
static int
|
||||
i915_get_fence_size(struct drm_device *dev, int size)
|
||||
{
|
||||
int i;
|
||||
int start;
|
||||
|
||||
if (IS_I965G(dev)) {
|
||||
/* The 965 can have fences at any page boundary. */
|
||||
return ALIGN(size, 4096);
|
||||
} else {
|
||||
/* Align the size to a power of two greater than the smallest
|
||||
* fence size.
|
||||
*/
|
||||
if (IS_I9XX(dev))
|
||||
start = 1024 * 1024;
|
||||
else
|
||||
start = 512 * 1024;
|
||||
|
||||
for (i = start; i < size; i <<= 1)
|
||||
;
|
||||
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
/* Check pitch constriants for all chips & tiling formats */
|
||||
static bool
|
||||
i915_tiling_ok(struct drm_device *dev, int stride, int size, int tiling_mode)
|
||||
{
|
||||
int tile_width;
|
||||
|
||||
/* Linear is always fine */
|
||||
if (tiling_mode == I915_TILING_NONE)
|
||||
return true;
|
||||
|
||||
if (tiling_mode == I915_TILING_Y && HAS_128_BYTE_Y_TILING(dev))
|
||||
tile_width = 128;
|
||||
else
|
||||
tile_width = 512;
|
||||
|
||||
/* 965+ just needs multiples of tile width */
|
||||
if (IS_I965G(dev)) {
|
||||
if (stride & (tile_width - 1))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Pre-965 needs power of two tile widths */
|
||||
if (stride < tile_width)
|
||||
return false;
|
||||
|
||||
if (stride & (stride - 1))
|
||||
return false;
|
||||
|
||||
/* We don't handle the aperture area covered by the fence being bigger
|
||||
* than the object size.
|
||||
*/
|
||||
if (i915_get_fence_size(dev, size) != size)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the tiling mode of an object, returning the required swizzling of
|
||||
* bit 6 of addresses in the object.
|
||||
|
@ -191,6 +258,11 @@ i915_gem_set_tiling(struct drm_device *dev, void *data,
|
|||
return -EINVAL;
|
||||
obj_priv = obj->driver_private;
|
||||
|
||||
if (!i915_tiling_ok(dev, args->stride, obj->size, args->tiling_mode)) {
|
||||
drm_gem_object_unreference(obj);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
mutex_lock(&dev->struct_mutex);
|
||||
|
||||
if (args->tiling_mode == I915_TILING_NONE) {
|
||||
|
@ -207,7 +279,24 @@ i915_gem_set_tiling(struct drm_device *dev, void *data,
|
|||
args->swizzle_mode = I915_BIT_6_SWIZZLE_NONE;
|
||||
}
|
||||
}
|
||||
obj_priv->tiling_mode = args->tiling_mode;
|
||||
if (args->tiling_mode != obj_priv->tiling_mode) {
|
||||
int ret;
|
||||
|
||||
/* Unbind the object, as switching tiling means we're
|
||||
* switching the cache organization due to fencing, probably.
|
||||
*/
|
||||
ret = i915_gem_object_unbind(obj);
|
||||
if (ret != 0) {
|
||||
WARN(ret != -ERESTARTSYS,
|
||||
"failed to unbind object for tiling switch");
|
||||
args->tiling_mode = obj_priv->tiling_mode;
|
||||
mutex_unlock(&dev->struct_mutex);
|
||||
drm_gem_object_unreference(obj);
|
||||
|
||||
return ret;
|
||||
}
|
||||
obj_priv->tiling_mode = args->tiling_mode;
|
||||
}
|
||||
obj_priv->stride = args->stride;
|
||||
|
||||
mutex_unlock(&dev->struct_mutex);
|
||||
|
|
|
@ -174,6 +174,19 @@ u32 i915_get_vblank_counter(struct drm_device *dev, int pipe)
|
|||
return count;
|
||||
}
|
||||
|
||||
u32 gm45_get_vblank_counter(struct drm_device *dev, int pipe)
|
||||
{
|
||||
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
|
||||
int reg = pipe ? PIPEB_FRMCOUNT_GM45 : PIPEA_FRMCOUNT_GM45;
|
||||
|
||||
if (!i915_pipe_enabled(dev, pipe)) {
|
||||
DRM_ERROR("trying to get vblank count for disabled pipe %d\n", pipe);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return I915_READ(reg);
|
||||
}
|
||||
|
||||
irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
|
||||
{
|
||||
struct drm_device *dev = (struct drm_device *) arg;
|
||||
|
|
|
@ -186,12 +186,12 @@
|
|||
#define FENCE_REG_830_0 0x2000
|
||||
#define I830_FENCE_START_MASK 0x07f80000
|
||||
#define I830_FENCE_TILING_Y_SHIFT 12
|
||||
#define I830_FENCE_SIZE_BITS(size) ((get_order(size >> 19) - 1) << 8)
|
||||
#define I830_FENCE_SIZE_BITS(size) ((ffs((size) >> 19) - 1) << 8)
|
||||
#define I830_FENCE_PITCH_SHIFT 4
|
||||
#define I830_FENCE_REG_VALID (1<<0)
|
||||
|
||||
#define I915_FENCE_START_MASK 0x0ff00000
|
||||
#define I915_FENCE_SIZE_BITS(size) ((get_order(size >> 20) - 1) << 8)
|
||||
#define I915_FENCE_SIZE_BITS(size) ((ffs((size) >> 20) - 1) << 8)
|
||||
|
||||
#define FENCE_REG_965_0 0x03000
|
||||
#define I965_FENCE_PITCH_SHIFT 2
|
||||
|
@ -1371,6 +1371,9 @@
|
|||
#define PIPE_FRAME_LOW_SHIFT 24
|
||||
#define PIPE_PIXEL_MASK 0x00ffffff
|
||||
#define PIPE_PIXEL_SHIFT 0
|
||||
/* GM45+ just has to be different */
|
||||
#define PIPEA_FRMCOUNT_GM45 0x70040
|
||||
#define PIPEA_FLIPCOUNT_GM45 0x70044
|
||||
|
||||
/* Cursor A & B regs */
|
||||
#define CURACNTR 0x70080
|
||||
|
@ -1439,6 +1442,9 @@
|
|||
#define PIPEBSTAT 0x71024
|
||||
#define PIPEBFRAMEHIGH 0x71040
|
||||
#define PIPEBFRAMEPIXEL 0x71044
|
||||
#define PIPEB_FRMCOUNT_GM45 0x71040
|
||||
#define PIPEB_FLIPCOUNT_GM45 0x71044
|
||||
|
||||
|
||||
/* Display B control */
|
||||
#define DSPBCNTR 0x71180
|
||||
|
|
|
@ -755,6 +755,8 @@ static void intel_crtc_mode_set(struct drm_crtc *crtc,
|
|||
case INTEL_OUTPUT_SDVO:
|
||||
case INTEL_OUTPUT_HDMI:
|
||||
is_sdvo = true;
|
||||
if (intel_output->needs_tv_clock)
|
||||
is_tv = true;
|
||||
break;
|
||||
case INTEL_OUTPUT_DVO:
|
||||
is_dvo = true;
|
||||
|
@ -1452,6 +1454,7 @@ static int intel_connector_clones(struct drm_device *dev, int type_mask)
|
|||
|
||||
static void intel_setup_outputs(struct drm_device *dev)
|
||||
{
|
||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||
struct drm_connector *connector;
|
||||
|
||||
intel_crt_init(dev);
|
||||
|
@ -1463,13 +1466,16 @@ static void intel_setup_outputs(struct drm_device *dev)
|
|||
if (IS_I9XX(dev)) {
|
||||
int found;
|
||||
|
||||
found = intel_sdvo_init(dev, SDVOB);
|
||||
if (!found && SUPPORTS_INTEGRATED_HDMI(dev))
|
||||
intel_hdmi_init(dev, SDVOB);
|
||||
|
||||
found = intel_sdvo_init(dev, SDVOC);
|
||||
if (!found && SUPPORTS_INTEGRATED_HDMI(dev))
|
||||
intel_hdmi_init(dev, SDVOC);
|
||||
if (I915_READ(SDVOB) & SDVO_DETECTED) {
|
||||
found = intel_sdvo_init(dev, SDVOB);
|
||||
if (!found && SUPPORTS_INTEGRATED_HDMI(dev))
|
||||
intel_hdmi_init(dev, SDVOB);
|
||||
}
|
||||
if (!IS_G4X(dev) || (I915_READ(SDVOB) & SDVO_DETECTED)) {
|
||||
found = intel_sdvo_init(dev, SDVOC);
|
||||
if (!found && SUPPORTS_INTEGRATED_HDMI(dev))
|
||||
intel_hdmi_init(dev, SDVOC);
|
||||
}
|
||||
} else
|
||||
intel_dvo_init(dev);
|
||||
|
||||
|
|
|
@ -82,6 +82,7 @@ struct intel_output {
|
|||
struct intel_i2c_chan *i2c_bus; /* for control functions */
|
||||
struct intel_i2c_chan *ddc_bus; /* for DDC only stuff */
|
||||
bool load_detect_temp;
|
||||
bool needs_tv_clock;
|
||||
void *dev_priv;
|
||||
};
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
* Jesse Barnes <jesse.barnes@intel.com>
|
||||
*/
|
||||
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/i2c.h>
|
||||
#include "drmP.h"
|
||||
#include "drm.h"
|
||||
|
@ -311,10 +312,8 @@ static int intel_lvds_get_modes(struct drm_connector *connector)
|
|||
if (dev_priv->panel_fixed_mode != NULL) {
|
||||
struct drm_display_mode *mode;
|
||||
|
||||
mutex_lock(&dev->mode_config.mutex);
|
||||
mode = drm_mode_duplicate(dev, dev_priv->panel_fixed_mode);
|
||||
drm_mode_probed_add(connector, mode);
|
||||
mutex_unlock(&dev->mode_config.mutex);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -405,6 +404,16 @@ void intel_lvds_init(struct drm_device *dev)
|
|||
u32 lvds;
|
||||
int pipe;
|
||||
|
||||
/* Blacklist machines that we know falsely report LVDS. */
|
||||
/* FIXME: add a check for the Aopen Mini PC */
|
||||
|
||||
/* Apple Mac Mini Core Duo and Mac Mini Core 2 Duo */
|
||||
if(dmi_match(DMI_PRODUCT_NAME, "Macmini1,1") ||
|
||||
dmi_match(DMI_PRODUCT_NAME, "Macmini2,1")) {
|
||||
DRM_DEBUG("Skipping LVDS initialization for Apple Mac Mini\n");
|
||||
return;
|
||||
}
|
||||
|
||||
intel_output = kzalloc(sizeof(struct intel_output), GFP_KERNEL);
|
||||
if (!intel_output) {
|
||||
return;
|
||||
|
@ -458,7 +467,7 @@ void intel_lvds_init(struct drm_device *dev)
|
|||
dev_priv->panel_fixed_mode =
|
||||
drm_mode_duplicate(dev, scan);
|
||||
mutex_unlock(&dev->mode_config.mutex);
|
||||
goto out; /* FIXME: check for quirks */
|
||||
goto out;
|
||||
}
|
||||
mutex_unlock(&dev->mode_config.mutex);
|
||||
}
|
||||
|
@ -492,7 +501,7 @@ void intel_lvds_init(struct drm_device *dev)
|
|||
if (dev_priv->panel_fixed_mode) {
|
||||
dev_priv->panel_fixed_mode->type |=
|
||||
DRM_MODE_TYPE_PREFERRED;
|
||||
goto out; /* FIXME: check for quirks */
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -500,38 +509,6 @@ void intel_lvds_init(struct drm_device *dev)
|
|||
if (!dev_priv->panel_fixed_mode)
|
||||
goto failed;
|
||||
|
||||
/* FIXME: detect aopen & mac mini type stuff automatically? */
|
||||
/*
|
||||
* Blacklist machines with BIOSes that list an LVDS panel without
|
||||
* actually having one.
|
||||
*/
|
||||
if (IS_I945GM(dev)) {
|
||||
/* aopen mini pc */
|
||||
if (dev->pdev->subsystem_vendor == 0xa0a0)
|
||||
goto failed;
|
||||
|
||||
if ((dev->pdev->subsystem_vendor == 0x8086) &&
|
||||
(dev->pdev->subsystem_device == 0x7270)) {
|
||||
/* It's a Mac Mini or Macbook Pro.
|
||||
*
|
||||
* Apple hardware is out to get us. The macbook pro
|
||||
* has a real LVDS panel, but the mac mini does not,
|
||||
* and they have the same device IDs. We'll
|
||||
* distinguish by panel size, on the assumption
|
||||
* that Apple isn't about to make any machines with an
|
||||
* 800x600 display.
|
||||
*/
|
||||
|
||||
if (dev_priv->panel_fixed_mode != NULL &&
|
||||
dev_priv->panel_fixed_mode->hdisplay == 800 &&
|
||||
dev_priv->panel_fixed_mode->vdisplay == 600) {
|
||||
DRM_DEBUG("Suspected Mac Mini, ignoring the LVDS\n");
|
||||
goto failed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
out:
|
||||
drm_sysfs_connector_add(connector);
|
||||
return;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -173,6 +173,9 @@ struct intel_sdvo_get_trained_inputs_response {
|
|||
* Returns two struct intel_sdvo_output_flags structures.
|
||||
*/
|
||||
#define SDVO_CMD_GET_IN_OUT_MAP 0x06
|
||||
struct intel_sdvo_in_out_map {
|
||||
u16 in0, in1;
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the current mapping of SDVO inputs to outputs on the device.
|
||||
|
@ -206,7 +209,8 @@ struct intel_sdvo_get_trained_inputs_response {
|
|||
struct intel_sdvo_get_interrupt_event_source_response {
|
||||
u16 interrupt_status;
|
||||
unsigned int ambient_light_interrupt:1;
|
||||
unsigned int pad:7;
|
||||
unsigned int hdmi_audio_encrypt_change:1;
|
||||
unsigned int pad:6;
|
||||
} __attribute__((packed));
|
||||
|
||||
/**
|
||||
|
@ -305,23 +309,411 @@ struct intel_sdvo_set_target_input_args {
|
|||
# define SDVO_CLOCK_RATE_MULT_4X (1 << 3)
|
||||
|
||||
#define SDVO_CMD_GET_SUPPORTED_TV_FORMATS 0x27
|
||||
/** 5 bytes of bit flags for TV formats shared by all TV format functions */
|
||||
struct intel_sdvo_tv_format {
|
||||
unsigned int ntsc_m:1;
|
||||
unsigned int ntsc_j:1;
|
||||
unsigned int ntsc_443:1;
|
||||
unsigned int pal_b:1;
|
||||
unsigned int pal_d:1;
|
||||
unsigned int pal_g:1;
|
||||
unsigned int pal_h:1;
|
||||
unsigned int pal_i:1;
|
||||
|
||||
unsigned int pal_m:1;
|
||||
unsigned int pal_n:1;
|
||||
unsigned int pal_nc:1;
|
||||
unsigned int pal_60:1;
|
||||
unsigned int secam_b:1;
|
||||
unsigned int secam_d:1;
|
||||
unsigned int secam_g:1;
|
||||
unsigned int secam_k:1;
|
||||
|
||||
unsigned int secam_k1:1;
|
||||
unsigned int secam_l:1;
|
||||
unsigned int secam_60:1;
|
||||
unsigned int hdtv_std_smpte_240m_1080i_59:1;
|
||||
unsigned int hdtv_std_smpte_240m_1080i_60:1;
|
||||
unsigned int hdtv_std_smpte_260m_1080i_59:1;
|
||||
unsigned int hdtv_std_smpte_260m_1080i_60:1;
|
||||
unsigned int hdtv_std_smpte_274m_1080i_50:1;
|
||||
|
||||
unsigned int hdtv_std_smpte_274m_1080i_59:1;
|
||||
unsigned int hdtv_std_smpte_274m_1080i_60:1;
|
||||
unsigned int hdtv_std_smpte_274m_1080p_23:1;
|
||||
unsigned int hdtv_std_smpte_274m_1080p_24:1;
|
||||
unsigned int hdtv_std_smpte_274m_1080p_25:1;
|
||||
unsigned int hdtv_std_smpte_274m_1080p_29:1;
|
||||
unsigned int hdtv_std_smpte_274m_1080p_30:1;
|
||||
unsigned int hdtv_std_smpte_274m_1080p_50:1;
|
||||
|
||||
unsigned int hdtv_std_smpte_274m_1080p_59:1;
|
||||
unsigned int hdtv_std_smpte_274m_1080p_60:1;
|
||||
unsigned int hdtv_std_smpte_295m_1080i_50:1;
|
||||
unsigned int hdtv_std_smpte_295m_1080p_50:1;
|
||||
unsigned int hdtv_std_smpte_296m_720p_59:1;
|
||||
unsigned int hdtv_std_smpte_296m_720p_60:1;
|
||||
unsigned int hdtv_std_smpte_296m_720p_50:1;
|
||||
unsigned int hdtv_std_smpte_293m_480p_59:1;
|
||||
|
||||
unsigned int hdtv_std_smpte_170m_480i_59:1;
|
||||
unsigned int hdtv_std_iturbt601_576i_50:1;
|
||||
unsigned int hdtv_std_iturbt601_576p_50:1;
|
||||
unsigned int hdtv_std_eia_7702a_480i_60:1;
|
||||
unsigned int hdtv_std_eia_7702a_480p_60:1;
|
||||
unsigned int pad:3;
|
||||
} __attribute__((packed));
|
||||
|
||||
#define SDVO_CMD_GET_TV_FORMAT 0x28
|
||||
|
||||
#define SDVO_CMD_SET_TV_FORMAT 0x29
|
||||
|
||||
/** Returns the resolutiosn that can be used with the given TV format */
|
||||
#define SDVO_CMD_GET_SDTV_RESOLUTION_SUPPORT 0x83
|
||||
struct intel_sdvo_sdtv_resolution_request {
|
||||
unsigned int ntsc_m:1;
|
||||
unsigned int ntsc_j:1;
|
||||
unsigned int ntsc_443:1;
|
||||
unsigned int pal_b:1;
|
||||
unsigned int pal_d:1;
|
||||
unsigned int pal_g:1;
|
||||
unsigned int pal_h:1;
|
||||
unsigned int pal_i:1;
|
||||
|
||||
unsigned int pal_m:1;
|
||||
unsigned int pal_n:1;
|
||||
unsigned int pal_nc:1;
|
||||
unsigned int pal_60:1;
|
||||
unsigned int secam_b:1;
|
||||
unsigned int secam_d:1;
|
||||
unsigned int secam_g:1;
|
||||
unsigned int secam_k:1;
|
||||
|
||||
unsigned int secam_k1:1;
|
||||
unsigned int secam_l:1;
|
||||
unsigned int secam_60:1;
|
||||
unsigned int pad:5;
|
||||
} __attribute__((packed));
|
||||
|
||||
struct intel_sdvo_sdtv_resolution_reply {
|
||||
unsigned int res_320x200:1;
|
||||
unsigned int res_320x240:1;
|
||||
unsigned int res_400x300:1;
|
||||
unsigned int res_640x350:1;
|
||||
unsigned int res_640x400:1;
|
||||
unsigned int res_640x480:1;
|
||||
unsigned int res_704x480:1;
|
||||
unsigned int res_704x576:1;
|
||||
|
||||
unsigned int res_720x350:1;
|
||||
unsigned int res_720x400:1;
|
||||
unsigned int res_720x480:1;
|
||||
unsigned int res_720x540:1;
|
||||
unsigned int res_720x576:1;
|
||||
unsigned int res_768x576:1;
|
||||
unsigned int res_800x600:1;
|
||||
unsigned int res_832x624:1;
|
||||
|
||||
unsigned int res_920x766:1;
|
||||
unsigned int res_1024x768:1;
|
||||
unsigned int res_1280x1024:1;
|
||||
unsigned int pad:5;
|
||||
} __attribute__((packed));
|
||||
|
||||
/* Get supported resolution with squire pixel aspect ratio that can be
|
||||
scaled for the requested HDTV format */
|
||||
#define SDVO_CMD_GET_SCALED_HDTV_RESOLUTION_SUPPORT 0x85
|
||||
|
||||
struct intel_sdvo_hdtv_resolution_request {
|
||||
unsigned int hdtv_std_smpte_240m_1080i_59:1;
|
||||
unsigned int hdtv_std_smpte_240m_1080i_60:1;
|
||||
unsigned int hdtv_std_smpte_260m_1080i_59:1;
|
||||
unsigned int hdtv_std_smpte_260m_1080i_60:1;
|
||||
unsigned int hdtv_std_smpte_274m_1080i_50:1;
|
||||
unsigned int hdtv_std_smpte_274m_1080i_59:1;
|
||||
unsigned int hdtv_std_smpte_274m_1080i_60:1;
|
||||
unsigned int hdtv_std_smpte_274m_1080p_23:1;
|
||||
|
||||
unsigned int hdtv_std_smpte_274m_1080p_24:1;
|
||||
unsigned int hdtv_std_smpte_274m_1080p_25:1;
|
||||
unsigned int hdtv_std_smpte_274m_1080p_29:1;
|
||||
unsigned int hdtv_std_smpte_274m_1080p_30:1;
|
||||
unsigned int hdtv_std_smpte_274m_1080p_50:1;
|
||||
unsigned int hdtv_std_smpte_274m_1080p_59:1;
|
||||
unsigned int hdtv_std_smpte_274m_1080p_60:1;
|
||||
unsigned int hdtv_std_smpte_295m_1080i_50:1;
|
||||
|
||||
unsigned int hdtv_std_smpte_295m_1080p_50:1;
|
||||
unsigned int hdtv_std_smpte_296m_720p_59:1;
|
||||
unsigned int hdtv_std_smpte_296m_720p_60:1;
|
||||
unsigned int hdtv_std_smpte_296m_720p_50:1;
|
||||
unsigned int hdtv_std_smpte_293m_480p_59:1;
|
||||
unsigned int hdtv_std_smpte_170m_480i_59:1;
|
||||
unsigned int hdtv_std_iturbt601_576i_50:1;
|
||||
unsigned int hdtv_std_iturbt601_576p_50:1;
|
||||
|
||||
unsigned int hdtv_std_eia_7702a_480i_60:1;
|
||||
unsigned int hdtv_std_eia_7702a_480p_60:1;
|
||||
unsigned int pad:6;
|
||||
} __attribute__((packed));
|
||||
|
||||
struct intel_sdvo_hdtv_resolution_reply {
|
||||
unsigned int res_640x480:1;
|
||||
unsigned int res_800x600:1;
|
||||
unsigned int res_1024x768:1;
|
||||
unsigned int res_1280x960:1;
|
||||
unsigned int res_1400x1050:1;
|
||||
unsigned int res_1600x1200:1;
|
||||
unsigned int res_1920x1440:1;
|
||||
unsigned int res_2048x1536:1;
|
||||
|
||||
unsigned int res_2560x1920:1;
|
||||
unsigned int res_3200x2400:1;
|
||||
unsigned int res_3840x2880:1;
|
||||
unsigned int pad1:5;
|
||||
|
||||
unsigned int res_848x480:1;
|
||||
unsigned int res_1064x600:1;
|
||||
unsigned int res_1280x720:1;
|
||||
unsigned int res_1360x768:1;
|
||||
unsigned int res_1704x960:1;
|
||||
unsigned int res_1864x1050:1;
|
||||
unsigned int res_1920x1080:1;
|
||||
unsigned int res_2128x1200:1;
|
||||
|
||||
unsigned int res_2560x1400:1;
|
||||
unsigned int res_2728x1536:1;
|
||||
unsigned int res_3408x1920:1;
|
||||
unsigned int res_4264x2400:1;
|
||||
unsigned int res_5120x2880:1;
|
||||
unsigned int pad2:3;
|
||||
|
||||
unsigned int res_768x480:1;
|
||||
unsigned int res_960x600:1;
|
||||
unsigned int res_1152x720:1;
|
||||
unsigned int res_1124x768:1;
|
||||
unsigned int res_1536x960:1;
|
||||
unsigned int res_1680x1050:1;
|
||||
unsigned int res_1728x1080:1;
|
||||
unsigned int res_1920x1200:1;
|
||||
|
||||
unsigned int res_2304x1440:1;
|
||||
unsigned int res_2456x1536:1;
|
||||
unsigned int res_3072x1920:1;
|
||||
unsigned int res_3840x2400:1;
|
||||
unsigned int res_4608x2880:1;
|
||||
unsigned int pad3:3;
|
||||
|
||||
unsigned int res_1280x1024:1;
|
||||
unsigned int pad4:7;
|
||||
|
||||
unsigned int res_1280x768:1;
|
||||
unsigned int pad5:7;
|
||||
} __attribute__((packed));
|
||||
|
||||
/* Get supported power state returns info for encoder and monitor, rely on
|
||||
last SetTargetInput and SetTargetOutput calls */
|
||||
#define SDVO_CMD_GET_SUPPORTED_POWER_STATES 0x2a
|
||||
/* Get power state returns info for encoder and monitor, rely on last
|
||||
SetTargetInput and SetTargetOutput calls */
|
||||
#define SDVO_CMD_GET_POWER_STATE 0x2b
|
||||
#define SDVO_CMD_GET_ENCODER_POWER_STATE 0x2b
|
||||
#define SDVO_CMD_SET_ENCODER_POWER_STATE 0x2c
|
||||
# define SDVO_ENCODER_STATE_ON (1 << 0)
|
||||
# define SDVO_ENCODER_STATE_STANDBY (1 << 1)
|
||||
# define SDVO_ENCODER_STATE_SUSPEND (1 << 2)
|
||||
# define SDVO_ENCODER_STATE_OFF (1 << 3)
|
||||
# define SDVO_MONITOR_STATE_ON (1 << 4)
|
||||
# define SDVO_MONITOR_STATE_STANDBY (1 << 5)
|
||||
# define SDVO_MONITOR_STATE_SUSPEND (1 << 6)
|
||||
# define SDVO_MONITOR_STATE_OFF (1 << 7)
|
||||
|
||||
#define SDVO_CMD_SET_TV_RESOLUTION_SUPPORT 0x93
|
||||
#define SDVO_CMD_GET_MAX_PANEL_POWER_SEQUENCING 0x2d
|
||||
#define SDVO_CMD_GET_PANEL_POWER_SEQUENCING 0x2e
|
||||
#define SDVO_CMD_SET_PANEL_POWER_SEQUENCING 0x2f
|
||||
/**
|
||||
* The panel power sequencing parameters are in units of milliseconds.
|
||||
* The high fields are bits 8:9 of the 10-bit values.
|
||||
*/
|
||||
struct sdvo_panel_power_sequencing {
|
||||
u8 t0;
|
||||
u8 t1;
|
||||
u8 t2;
|
||||
u8 t3;
|
||||
u8 t4;
|
||||
|
||||
unsigned int t0_high:2;
|
||||
unsigned int t1_high:2;
|
||||
unsigned int t2_high:2;
|
||||
unsigned int t3_high:2;
|
||||
|
||||
unsigned int t4_high:2;
|
||||
unsigned int pad:6;
|
||||
} __attribute__((packed));
|
||||
|
||||
#define SDVO_CMD_GET_MAX_BACKLIGHT_LEVEL 0x30
|
||||
struct sdvo_max_backlight_reply {
|
||||
u8 max_value;
|
||||
u8 default_value;
|
||||
} __attribute__((packed));
|
||||
|
||||
#define SDVO_CMD_GET_BACKLIGHT_LEVEL 0x31
|
||||
#define SDVO_CMD_SET_BACKLIGHT_LEVEL 0x32
|
||||
|
||||
#define SDVO_CMD_GET_AMBIENT_LIGHT 0x33
|
||||
struct sdvo_get_ambient_light_reply {
|
||||
u16 trip_low;
|
||||
u16 trip_high;
|
||||
u16 value;
|
||||
} __attribute__((packed));
|
||||
#define SDVO_CMD_SET_AMBIENT_LIGHT 0x34
|
||||
struct sdvo_set_ambient_light_reply {
|
||||
u16 trip_low;
|
||||
u16 trip_high;
|
||||
unsigned int enable:1;
|
||||
unsigned int pad:7;
|
||||
} __attribute__((packed));
|
||||
|
||||
/* Set display power state */
|
||||
#define SDVO_CMD_SET_DISPLAY_POWER_STATE 0x7d
|
||||
# define SDVO_DISPLAY_STATE_ON (1 << 0)
|
||||
# define SDVO_DISPLAY_STATE_STANDBY (1 << 1)
|
||||
# define SDVO_DISPLAY_STATE_SUSPEND (1 << 2)
|
||||
# define SDVO_DISPLAY_STATE_OFF (1 << 3)
|
||||
|
||||
#define SDVO_CMD_GET_SUPPORTED_ENHANCEMENTS 0x84
|
||||
struct intel_sdvo_enhancements_reply {
|
||||
unsigned int flicker_filter:1;
|
||||
unsigned int flicker_filter_adaptive:1;
|
||||
unsigned int flicker_filter_2d:1;
|
||||
unsigned int saturation:1;
|
||||
unsigned int hue:1;
|
||||
unsigned int brightness:1;
|
||||
unsigned int contrast:1;
|
||||
unsigned int overscan_h:1;
|
||||
|
||||
unsigned int overscan_v:1;
|
||||
unsigned int position_h:1;
|
||||
unsigned int position_v:1;
|
||||
unsigned int sharpness:1;
|
||||
unsigned int dot_crawl:1;
|
||||
unsigned int dither:1;
|
||||
unsigned int max_tv_chroma_filter:1;
|
||||
unsigned int max_tv_luma_filter:1;
|
||||
} __attribute__((packed));
|
||||
|
||||
/* Picture enhancement limits below are dependent on the current TV format,
|
||||
* and thus need to be queried and set after it.
|
||||
*/
|
||||
#define SDVO_CMD_GET_MAX_FLICKER_FITER 0x4d
|
||||
#define SDVO_CMD_GET_MAX_ADAPTIVE_FLICKER_FITER 0x7b
|
||||
#define SDVO_CMD_GET_MAX_2D_FLICKER_FITER 0x52
|
||||
#define SDVO_CMD_GET_MAX_SATURATION 0x55
|
||||
#define SDVO_CMD_GET_MAX_HUE 0x58
|
||||
#define SDVO_CMD_GET_MAX_BRIGHTNESS 0x5b
|
||||
#define SDVO_CMD_GET_MAX_CONTRAST 0x5e
|
||||
#define SDVO_CMD_GET_MAX_OVERSCAN_H 0x61
|
||||
#define SDVO_CMD_GET_MAX_OVERSCAN_V 0x64
|
||||
#define SDVO_CMD_GET_MAX_POSITION_H 0x67
|
||||
#define SDVO_CMD_GET_MAX_POSITION_V 0x6a
|
||||
#define SDVO_CMD_GET_MAX_SHARPNESS_V 0x6d
|
||||
#define SDVO_CMD_GET_MAX_TV_CHROMA 0x74
|
||||
#define SDVO_CMD_GET_MAX_TV_LUMA 0x77
|
||||
struct intel_sdvo_enhancement_limits_reply {
|
||||
u16 max_value;
|
||||
u16 default_value;
|
||||
} __attribute__((packed));
|
||||
|
||||
#define SDVO_CMD_GET_LVDS_PANEL_INFORMATION 0x7f
|
||||
#define SDVO_CMD_SET_LVDS_PANEL_INFORMATION 0x80
|
||||
# define SDVO_LVDS_COLOR_DEPTH_18 (0 << 0)
|
||||
# define SDVO_LVDS_COLOR_DEPTH_24 (1 << 0)
|
||||
# define SDVO_LVDS_CONNECTOR_SPWG (0 << 2)
|
||||
# define SDVO_LVDS_CONNECTOR_OPENLDI (1 << 2)
|
||||
# define SDVO_LVDS_SINGLE_CHANNEL (0 << 4)
|
||||
# define SDVO_LVDS_DUAL_CHANNEL (1 << 4)
|
||||
|
||||
#define SDVO_CMD_GET_FLICKER_FILTER 0x4e
|
||||
#define SDVO_CMD_SET_FLICKER_FILTER 0x4f
|
||||
#define SDVO_CMD_GET_ADAPTIVE_FLICKER_FITER 0x50
|
||||
#define SDVO_CMD_SET_ADAPTIVE_FLICKER_FITER 0x51
|
||||
#define SDVO_CMD_GET_2D_FLICKER_FITER 0x53
|
||||
#define SDVO_CMD_SET_2D_FLICKER_FITER 0x54
|
||||
#define SDVO_CMD_GET_SATURATION 0x56
|
||||
#define SDVO_CMD_SET_SATURATION 0x57
|
||||
#define SDVO_CMD_GET_HUE 0x59
|
||||
#define SDVO_CMD_SET_HUE 0x5a
|
||||
#define SDVO_CMD_GET_BRIGHTNESS 0x5c
|
||||
#define SDVO_CMD_SET_BRIGHTNESS 0x5d
|
||||
#define SDVO_CMD_GET_CONTRAST 0x5f
|
||||
#define SDVO_CMD_SET_CONTRAST 0x60
|
||||
#define SDVO_CMD_GET_OVERSCAN_H 0x62
|
||||
#define SDVO_CMD_SET_OVERSCAN_H 0x63
|
||||
#define SDVO_CMD_GET_OVERSCAN_V 0x65
|
||||
#define SDVO_CMD_SET_OVERSCAN_V 0x66
|
||||
#define SDVO_CMD_GET_POSITION_H 0x68
|
||||
#define SDVO_CMD_SET_POSITION_H 0x69
|
||||
#define SDVO_CMD_GET_POSITION_V 0x6b
|
||||
#define SDVO_CMD_SET_POSITION_V 0x6c
|
||||
#define SDVO_CMD_GET_SHARPNESS 0x6e
|
||||
#define SDVO_CMD_SET_SHARPNESS 0x6f
|
||||
#define SDVO_CMD_GET_TV_CHROMA 0x75
|
||||
#define SDVO_CMD_SET_TV_CHROMA 0x76
|
||||
#define SDVO_CMD_GET_TV_LUMA 0x78
|
||||
#define SDVO_CMD_SET_TV_LUMA 0x79
|
||||
struct intel_sdvo_enhancements_arg {
|
||||
u16 value;
|
||||
}__attribute__((packed));
|
||||
|
||||
#define SDVO_CMD_GET_DOT_CRAWL 0x70
|
||||
#define SDVO_CMD_SET_DOT_CRAWL 0x71
|
||||
# define SDVO_DOT_CRAWL_ON (1 << 0)
|
||||
# define SDVO_DOT_CRAWL_DEFAULT_ON (1 << 1)
|
||||
|
||||
#define SDVO_CMD_GET_DITHER 0x72
|
||||
#define SDVO_CMD_SET_DITHER 0x73
|
||||
# define SDVO_DITHER_ON (1 << 0)
|
||||
# define SDVO_DITHER_DEFAULT_ON (1 << 1)
|
||||
|
||||
#define SDVO_CMD_SET_CONTROL_BUS_SWITCH 0x7a
|
||||
# define SDVO_CONTROL_BUS_PROM 0x0
|
||||
# define SDVO_CONTROL_BUS_DDC1 0x1
|
||||
# define SDVO_CONTROL_BUS_DDC2 0x2
|
||||
# define SDVO_CONTROL_BUS_DDC3 0x3
|
||||
# define SDVO_CONTROL_BUS_PROM (1 << 0)
|
||||
# define SDVO_CONTROL_BUS_DDC1 (1 << 1)
|
||||
# define SDVO_CONTROL_BUS_DDC2 (1 << 2)
|
||||
# define SDVO_CONTROL_BUS_DDC3 (1 << 3)
|
||||
|
||||
/* HDMI op codes */
|
||||
#define SDVO_CMD_GET_SUPP_ENCODE 0x9d
|
||||
#define SDVO_CMD_GET_ENCODE 0x9e
|
||||
#define SDVO_CMD_SET_ENCODE 0x9f
|
||||
#define SDVO_ENCODE_DVI 0x0
|
||||
#define SDVO_ENCODE_HDMI 0x1
|
||||
#define SDVO_CMD_SET_PIXEL_REPLI 0x8b
|
||||
#define SDVO_CMD_GET_PIXEL_REPLI 0x8c
|
||||
#define SDVO_CMD_GET_COLORIMETRY_CAP 0x8d
|
||||
#define SDVO_CMD_SET_COLORIMETRY 0x8e
|
||||
#define SDVO_COLORIMETRY_RGB256 0x0
|
||||
#define SDVO_COLORIMETRY_RGB220 0x1
|
||||
#define SDVO_COLORIMETRY_YCrCb422 0x3
|
||||
#define SDVO_COLORIMETRY_YCrCb444 0x4
|
||||
#define SDVO_CMD_GET_COLORIMETRY 0x8f
|
||||
#define SDVO_CMD_GET_AUDIO_ENCRYPT_PREFER 0x90
|
||||
#define SDVO_CMD_SET_AUDIO_STAT 0x91
|
||||
#define SDVO_CMD_GET_AUDIO_STAT 0x92
|
||||
#define SDVO_CMD_SET_HBUF_INDEX 0x93
|
||||
#define SDVO_CMD_GET_HBUF_INDEX 0x94
|
||||
#define SDVO_CMD_GET_HBUF_INFO 0x95
|
||||
#define SDVO_CMD_SET_HBUF_AV_SPLIT 0x96
|
||||
#define SDVO_CMD_GET_HBUF_AV_SPLIT 0x97
|
||||
#define SDVO_CMD_SET_HBUF_DATA 0x98
|
||||
#define SDVO_CMD_GET_HBUF_DATA 0x99
|
||||
#define SDVO_CMD_SET_HBUF_TXRATE 0x9a
|
||||
#define SDVO_CMD_GET_HBUF_TXRATE 0x9b
|
||||
#define SDVO_HBUF_TX_DISABLED (0 << 6)
|
||||
#define SDVO_HBUF_TX_ONCE (2 << 6)
|
||||
#define SDVO_HBUF_TX_VSYNC (3 << 6)
|
||||
#define SDVO_CMD_GET_AUDIO_TX_INFO 0x9c
|
||||
|
||||
struct intel_sdvo_encode{
|
||||
u8 dvi_rev;
|
||||
u8 hdmi_rev;
|
||||
} __attribute__ ((packed));
|
||||
|
|
|
@ -1039,9 +1039,9 @@ static int radeon_do_init_cp(struct drm_device *dev, drm_radeon_init_t *init,
|
|||
|
||||
#if __OS_HAS_AGP
|
||||
if (dev_priv->flags & RADEON_IS_AGP) {
|
||||
drm_core_ioremap(dev_priv->cp_ring, dev);
|
||||
drm_core_ioremap(dev_priv->ring_rptr, dev);
|
||||
drm_core_ioremap(dev->agp_buffer_map, dev);
|
||||
drm_core_ioremap_wc(dev_priv->cp_ring, dev);
|
||||
drm_core_ioremap_wc(dev_priv->ring_rptr, dev);
|
||||
drm_core_ioremap_wc(dev->agp_buffer_map, dev);
|
||||
if (!dev_priv->cp_ring->handle ||
|
||||
!dev_priv->ring_rptr->handle ||
|
||||
!dev->agp_buffer_map->handle) {
|
||||
|
|
|
@ -27,6 +27,7 @@ menuconfig ANDROID_RAM_CONSOLE_ERROR_CORRECTION
|
|||
bool "Android RAM Console Enable error correction"
|
||||
default n
|
||||
depends on ANDROID_RAM_CONSOLE
|
||||
depends on !ANDROID_RAM_CONSOLE_EARLY_INIT
|
||||
select REED_SOLOMON
|
||||
select REED_SOLOMON_ENC8
|
||||
select REED_SOLOMON_DEC8
|
||||
|
|
|
@ -224,9 +224,23 @@ static int __init ram_console_init(struct ram_console_buffer *buffer,
|
|||
ram_console_buffer_size =
|
||||
buffer_size - sizeof(struct ram_console_buffer);
|
||||
|
||||
if (ram_console_buffer_size > buffer_size) {
|
||||
pr_err("ram_console: buffer %p, invalid size %d, datasize %d\n",
|
||||
buffer, buffer_size, ram_console_buffer_size);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ANDROID_RAM_CONSOLE_ERROR_CORRECTION
|
||||
ram_console_buffer_size -= (DIV_ROUND_UP(ram_console_buffer_size,
|
||||
ECC_BLOCK_SIZE) + 1) * ECC_SIZE;
|
||||
|
||||
if (ram_console_buffer_size > buffer_size) {
|
||||
pr_err("ram_console: buffer %p, invalid size %d, "
|
||||
"non-ecc datasize %d\n",
|
||||
buffer, buffer_size, ram_console_buffer_size);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ram_console_par_buffer = buffer->data + ram_console_buffer_size;
|
||||
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ static ssize_t gpio_enable_show(struct device *dev, struct device_attribute *att
|
|||
if (hrtimer_active(&gpio_data->timer)) {
|
||||
ktime_t r = hrtimer_get_remaining(&gpio_data->timer);
|
||||
struct timeval t = ktime_to_timeval(r);
|
||||
remaining = t.tv_sec * 1000 + t.tv_usec;
|
||||
remaining = t.tv_sec * 1000 + t.tv_usec / 1000;
|
||||
} else
|
||||
remaining = 0;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
config USB_ATMEL
|
||||
tristate "Atmel at76c503/at76c505/at76c505a USB cards"
|
||||
depends on MAC80211 && WLAN_80211 && USB
|
||||
depends on WLAN_80211 && USB
|
||||
default N
|
||||
select FW_LOADER
|
||||
---help---
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -34,6 +34,23 @@ enum board_type {
|
|||
BOARD_505AMX = 8
|
||||
};
|
||||
|
||||
/* our private ioctl's */
|
||||
/* preamble length (0 - long, 1 - short, 2 - auto) */
|
||||
#define AT76_SET_SHORT_PREAMBLE (SIOCIWFIRSTPRIV + 0)
|
||||
#define AT76_GET_SHORT_PREAMBLE (SIOCIWFIRSTPRIV + 1)
|
||||
/* which debug channels are enabled */
|
||||
#define AT76_SET_DEBUG (SIOCIWFIRSTPRIV + 2)
|
||||
#define AT76_GET_DEBUG (SIOCIWFIRSTPRIV + 3)
|
||||
/* power save mode (incl. the Atmel proprietary smart save mode) */
|
||||
#define AT76_SET_POWERSAVE_MODE (SIOCIWFIRSTPRIV + 4)
|
||||
#define AT76_GET_POWERSAVE_MODE (SIOCIWFIRSTPRIV + 5)
|
||||
/* min and max channel times for scan */
|
||||
#define AT76_SET_SCAN_TIMES (SIOCIWFIRSTPRIV + 6)
|
||||
#define AT76_GET_SCAN_TIMES (SIOCIWFIRSTPRIV + 7)
|
||||
/* scan mode (0 - active, 1 - passive) */
|
||||
#define AT76_SET_SCAN_MODE (SIOCIWFIRSTPRIV + 8)
|
||||
#define AT76_GET_SCAN_MODE (SIOCIWFIRSTPRIV + 9)
|
||||
|
||||
#define CMD_STATUS_IDLE 0x00
|
||||
#define CMD_STATUS_COMPLETE 0x01
|
||||
#define CMD_STATUS_UNKNOWN 0x02
|
||||
|
@ -65,7 +82,6 @@ enum board_type {
|
|||
#define MIB_MAC 0x03
|
||||
#define MIB_MAC_MGMT 0x05
|
||||
#define MIB_MAC_WEP 0x06
|
||||
#define MIB_MAC_ENCRYPTION 0x06
|
||||
#define MIB_PHY 0x07
|
||||
#define MIB_FW_VERSION 0x08
|
||||
#define MIB_MDOMAIN 0x09
|
||||
|
@ -90,26 +106,6 @@ enum board_type {
|
|||
#define AT76_PM_ON 2
|
||||
#define AT76_PM_SMART 3
|
||||
|
||||
/* cipher values for encryption keys */
|
||||
#define CIPHER_NONE 0 /* this value is only guessed */
|
||||
#define CIPHER_WEP64 1
|
||||
#define CIPHER_TKIP 2
|
||||
#define CIPHER_CCMP 3
|
||||
#define CIPHER_CCX 4 /* for consistency sake only */
|
||||
#define CIPHER_WEP128 5
|
||||
|
||||
/* bit flags key types for encryption keys */
|
||||
#define KEY_PAIRWISE 2
|
||||
#define KEY_TX 4
|
||||
|
||||
#define CIPHER_KEYS (4)
|
||||
#define CIPHER_KEY_LEN (40)
|
||||
|
||||
struct key_config {
|
||||
u8 cipher;
|
||||
u8 keylen;
|
||||
};
|
||||
|
||||
struct hwcfg_r505 {
|
||||
u8 cr39_values[14];
|
||||
u8 reserved1[14];
|
||||
|
@ -151,9 +147,6 @@ union at76_hwcfg {
|
|||
|
||||
#define WEP_SMALL_KEY_LEN (40 / 8)
|
||||
#define WEP_LARGE_KEY_LEN (104 / 8)
|
||||
#define WEP_KEYS (4)
|
||||
|
||||
|
||||
|
||||
struct at76_card_config {
|
||||
u8 exclude_unencrypted;
|
||||
|
@ -168,7 +161,7 @@ struct at76_card_config {
|
|||
u8 privacy_invoked;
|
||||
u8 wep_default_key_id; /* 0..3 */
|
||||
u8 current_ssid[32];
|
||||
u8 wep_default_key_value[4][WEP_LARGE_KEY_LEN];
|
||||
u8 wep_default_key_value[4][WEP_KEY_LEN];
|
||||
u8 ssid_len;
|
||||
u8 short_preamble;
|
||||
__le16 beacon_period;
|
||||
|
@ -193,7 +186,7 @@ struct at76_rx_buffer {
|
|||
u8 link_quality;
|
||||
u8 noise_level;
|
||||
__le32 rx_time;
|
||||
u8 packet[IEEE80211_MAX_FRAG_THRESHOLD];
|
||||
u8 packet[IEEE80211_FRAME_LEN + IEEE80211_FCS_LEN];
|
||||
} __attribute__((packed));
|
||||
|
||||
/* Length of Atmel-specific Tx header before 802.11 frame */
|
||||
|
@ -203,11 +196,8 @@ struct at76_tx_buffer {
|
|||
__le16 wlength;
|
||||
u8 tx_rate;
|
||||
u8 padding;
|
||||
u8 key_id;
|
||||
u8 cipher_type;
|
||||
u8 cipher_length;
|
||||
u8 reserved;
|
||||
u8 packet[IEEE80211_MAX_FRAG_THRESHOLD];
|
||||
u8 reserved[4];
|
||||
u8 packet[IEEE80211_FRAME_LEN + IEEE80211_FCS_LEN];
|
||||
} __attribute__((packed));
|
||||
|
||||
/* defines for scan_type below */
|
||||
|
@ -254,7 +244,6 @@ struct set_mib_buffer {
|
|||
u8 byte;
|
||||
__le16 word;
|
||||
u8 addr[ETH_ALEN];
|
||||
u8 data[256]; /* we need more space for mib_mac_encryption */
|
||||
} data;
|
||||
} __attribute__((packed));
|
||||
|
||||
|
@ -328,24 +317,10 @@ struct mib_mac_wep {
|
|||
u8 exclude_unencrypted;
|
||||
__le32 wep_icv_error_count;
|
||||
__le32 wep_excluded_count;
|
||||
u8 wep_default_keyvalue[WEP_KEYS][WEP_LARGE_KEY_LEN];
|
||||
u8 wep_default_keyvalue[WEP_KEYS][WEP_KEY_LEN];
|
||||
u8 encryption_level; /* 1 for 40bit, 2 for 104bit encryption */
|
||||
} __attribute__((packed));
|
||||
|
||||
struct mib_mac_encryption {
|
||||
u8 cipher_default_keyvalue[CIPHER_KEYS][CIPHER_KEY_LEN];
|
||||
u8 tkip_bssid[6];
|
||||
u8 privacy_invoked;
|
||||
u8 cipher_default_key_id;
|
||||
u8 cipher_default_group_key_id;
|
||||
u8 exclude_unencrypted;
|
||||
u8 wep_encryption_type;
|
||||
u8 ckip_key_permutation; /* bool */
|
||||
__le32 wep_icv_error_count;
|
||||
__le32 wep_excluded_count;
|
||||
u8 key_rsc[CIPHER_KEYS][8];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct mib_phy {
|
||||
__le32 ed_threshold;
|
||||
|
||||
|
@ -389,6 +364,16 @@ struct at76_fw_header {
|
|||
__le32 ext_fw_len; /* external firmware image length */
|
||||
} __attribute__((packed));
|
||||
|
||||
enum mac_state {
|
||||
MAC_INIT,
|
||||
MAC_SCANNING,
|
||||
MAC_AUTH,
|
||||
MAC_ASSOC,
|
||||
MAC_JOINING,
|
||||
MAC_CONNECTED,
|
||||
MAC_OWN_IBSS
|
||||
};
|
||||
|
||||
/* a description of a regulatory domain and the allowed channels */
|
||||
struct reg_domain {
|
||||
u16 code;
|
||||
|
@ -396,6 +381,47 @@ struct reg_domain {
|
|||
u32 channel_map; /* if bit N is set, channel (N+1) is allowed */
|
||||
};
|
||||
|
||||
/* how long do we keep a (I)BSS in the bss_list in jiffies
|
||||
this should be long enough for the user to retrieve the table
|
||||
(by iwlist ?) after the device started, because all entries from
|
||||
other channels than the one the device locks on get removed, too */
|
||||
#define BSS_LIST_TIMEOUT (120 * HZ)
|
||||
/* struct to store BSS info found during scan */
|
||||
#define BSS_LIST_MAX_RATE_LEN 32 /* 32 rates should be enough ... */
|
||||
|
||||
struct bss_info {
|
||||
struct list_head list;
|
||||
|
||||
u8 bssid[ETH_ALEN]; /* bssid */
|
||||
u8 ssid[IW_ESSID_MAX_SIZE]; /* essid */
|
||||
u8 ssid_len; /* length of ssid above */
|
||||
u8 channel;
|
||||
u16 capa; /* BSS capabilities */
|
||||
u16 beacon_interval; /* beacon interval, Kus (1024 microseconds) */
|
||||
u8 rates[BSS_LIST_MAX_RATE_LEN]; /* supported rates in units of
|
||||
500 kbps, ORed with 0x80 for
|
||||
basic rates */
|
||||
u8 rates_len;
|
||||
|
||||
/* quality of received beacon */
|
||||
u8 rssi;
|
||||
u8 link_qual;
|
||||
u8 noise_level;
|
||||
|
||||
unsigned long last_rx; /* time (jiffies) of last beacon received */
|
||||
};
|
||||
|
||||
/* a rx data buffer to collect rx fragments */
|
||||
struct rx_data_buf {
|
||||
u8 sender[ETH_ALEN]; /* sender address */
|
||||
u16 seqnr; /* sequence number */
|
||||
u16 fragnr; /* last fragment received */
|
||||
unsigned long last_rx; /* jiffies of last rx */
|
||||
struct sk_buff *skb; /* == NULL if entry is free */
|
||||
};
|
||||
|
||||
#define NR_RX_DATA_BUF 8
|
||||
|
||||
/* Data for one loaded firmware file */
|
||||
struct fwentry {
|
||||
const char *const fwname;
|
||||
|
@ -412,9 +438,11 @@ struct fwentry {
|
|||
|
||||
struct at76_priv {
|
||||
struct usb_device *udev; /* USB device pointer */
|
||||
struct net_device *netdev; /* net device pointer */
|
||||
struct net_device_stats stats; /* net device stats */
|
||||
struct iw_statistics wstats; /* wireless stats */
|
||||
|
||||
struct sk_buff *rx_skb; /* skbuff for receiving data */
|
||||
struct sk_buff *tx_skb; /* skbuff for transmitting data */
|
||||
void *bulk_out_buffer; /* buffer for sending data */
|
||||
|
||||
struct urb *tx_urb; /* URB for sending data */
|
||||
|
@ -426,17 +454,26 @@ struct at76_priv {
|
|||
struct mutex mtx; /* locks this structure */
|
||||
|
||||
/* work queues */
|
||||
struct work_struct work_assoc_done;
|
||||
struct work_struct work_join;
|
||||
struct work_struct work_new_bss;
|
||||
struct work_struct work_start_scan;
|
||||
struct work_struct work_set_promisc;
|
||||
struct work_struct work_submit_rx;
|
||||
struct delayed_work dwork_hw_scan;
|
||||
struct delayed_work dwork_restart;
|
||||
struct delayed_work dwork_get_scan;
|
||||
struct delayed_work dwork_beacon;
|
||||
struct delayed_work dwork_auth;
|
||||
struct delayed_work dwork_assoc;
|
||||
|
||||
struct tasklet_struct rx_tasklet;
|
||||
|
||||
/* the WEP stuff */
|
||||
int wep_enabled; /* 1 if WEP is enabled */
|
||||
int wep_key_id; /* key id to be used */
|
||||
u8 wep_keys[WEP_KEYS][WEP_LARGE_KEY_LEN]; /* WEP keys */
|
||||
u8 wep_keys_len[WEP_KEYS]; /* length of WEP keys */
|
||||
u8 wep_keys[WEP_KEYS][WEP_KEY_LEN]; /* the four WEP keys,
|
||||
5 or 13 bytes are used */
|
||||
u8 wep_keys_len[WEP_KEYS]; /* the length of the above keys */
|
||||
|
||||
int channel;
|
||||
int iw_mode;
|
||||
|
@ -458,13 +495,44 @@ struct at76_priv {
|
|||
int scan_mode; /* SCAN_TYPE_ACTIVE, SCAN_TYPE_PASSIVE */
|
||||
int scan_need_any; /* if set, need to scan for any ESSID */
|
||||
|
||||
/* the list we got from scanning */
|
||||
spinlock_t bss_list_spinlock; /* protects bss_list operations */
|
||||
struct list_head bss_list; /* list of BSS we got beacons from */
|
||||
struct timer_list bss_list_timer; /* timer to purge old entries
|
||||
from bss_list */
|
||||
struct bss_info *curr_bss; /* current BSS */
|
||||
u16 assoc_id; /* current association ID, if associated */
|
||||
|
||||
u8 wanted_bssid[ETH_ALEN];
|
||||
int wanted_bssid_valid; /* != 0 if wanted_bssid is to be used */
|
||||
|
||||
/* some data for infrastructure mode only */
|
||||
spinlock_t mgmt_spinlock; /* this spinlock protects access to
|
||||
next_mgmt_bulk */
|
||||
|
||||
struct at76_tx_buffer *next_mgmt_bulk; /* pending management msg to
|
||||
send via bulk out */
|
||||
enum mac_state mac_state;
|
||||
enum {
|
||||
SCAN_IDLE,
|
||||
SCAN_IN_PROGRESS,
|
||||
SCAN_COMPLETED
|
||||
} scan_state;
|
||||
time_t last_scan;
|
||||
|
||||
int retries; /* remaining retries in case of timeout when
|
||||
* sending AuthReq or AssocReq */
|
||||
u8 pm_mode; /* power management mode */
|
||||
u32 pm_period; /* power management period in microseconds */
|
||||
|
||||
struct reg_domain const *domain; /* reg domain description */
|
||||
|
||||
/* iwspy support */
|
||||
spinlock_t spy_spinlock;
|
||||
struct iw_spy_data spy_data;
|
||||
|
||||
struct iw_public_data wireless_data;
|
||||
|
||||
/* These fields contain HW config provided by the device (not all of
|
||||
* these fields are used by all board types) */
|
||||
u8 mac_addr[ETH_ALEN];
|
||||
|
@ -472,6 +540,9 @@ struct at76_priv {
|
|||
|
||||
struct at76_card_config card_config;
|
||||
|
||||
/* store rx fragments until complete */
|
||||
struct rx_data_buf rx_data[NR_RX_DATA_BUF];
|
||||
|
||||
enum board_type board_type;
|
||||
struct mib_fw_version fw_version;
|
||||
|
||||
|
@ -479,20 +550,58 @@ struct at76_priv {
|
|||
unsigned int netdev_registered:1;
|
||||
struct set_mib_buffer mib_buf; /* global buffer for set_mib calls */
|
||||
|
||||
/* beacon counting */
|
||||
int beacon_period; /* period of mgmt beacons, Kus */
|
||||
|
||||
struct ieee80211_hw *hw;
|
||||
int mac80211_registered;
|
||||
|
||||
struct key_config keys[4]; /* installed key types */
|
||||
u8 default_pairwise_key;
|
||||
u8 default_group_key;
|
||||
int beacons_received;
|
||||
unsigned long beacons_last_qual; /* time we restarted counting
|
||||
beacons */
|
||||
};
|
||||
|
||||
#define AT76_SUPPORTED_FILTERS FIF_PROMISC_IN_BSS
|
||||
struct at76_rx_radiotap {
|
||||
struct ieee80211_radiotap_header rt_hdr;
|
||||
__le64 rt_tsft;
|
||||
u8 rt_flags;
|
||||
u8 rt_rate;
|
||||
s8 rt_signal;
|
||||
s8 rt_noise;
|
||||
};
|
||||
|
||||
#define AT76_RX_RADIOTAP_PRESENT \
|
||||
((1 << IEEE80211_RADIOTAP_TSFT) | \
|
||||
(1 << IEEE80211_RADIOTAP_FLAGS) | \
|
||||
(1 << IEEE80211_RADIOTAP_RATE) | \
|
||||
(1 << IEEE80211_RADIOTAP_DB_ANTSIGNAL) | \
|
||||
(1 << IEEE80211_RADIOTAP_DB_ANTNOISE))
|
||||
|
||||
#define BEACON_MAX_DATA_LENGTH 1500
|
||||
|
||||
/* the maximum size of an AssocReq packet */
|
||||
#define ASSOCREQ_MAX_SIZE \
|
||||
(AT76_TX_HDRLEN + sizeof(struct ieee80211_assoc_request) + \
|
||||
1 + 1 + IW_ESSID_MAX_SIZE + 1 + 1 + 4)
|
||||
|
||||
/* for shared secret auth, add the challenge text size */
|
||||
#define AUTH_FRAME_SIZE (AT76_TX_HDRLEN + sizeof(struct ieee80211_auth))
|
||||
|
||||
/* Maximal number of AuthReq retries */
|
||||
#define AUTH_RETRIES 3
|
||||
|
||||
/* Maximal number of AssocReq retries */
|
||||
#define ASSOC_RETRIES 3
|
||||
|
||||
/* Beacon timeout in managed mode when we are connected */
|
||||
#define BEACON_TIMEOUT (10 * HZ)
|
||||
|
||||
/* Timeout for authentication response */
|
||||
#define AUTH_TIMEOUT (1 * HZ)
|
||||
|
||||
/* Timeout for association response */
|
||||
#define ASSOC_TIMEOUT (1 * HZ)
|
||||
|
||||
/* Polling interval when scan is running */
|
||||
#define SCAN_POLL_INTERVAL (HZ / 4)
|
||||
|
||||
/* Command completion timeout */
|
||||
#define CMD_COMPLETION_TIMEOUT (5 * HZ)
|
||||
|
||||
#define DEF_RTS_THRESHOLD 1536
|
||||
|
@ -502,6 +611,8 @@ struct at76_priv {
|
|||
#define DEF_SCAN_MIN_TIME 10
|
||||
#define DEF_SCAN_MAX_TIME 120
|
||||
|
||||
#define MAX_RTS_THRESHOLD (MAX_FRAG_THRESHOLD + 1)
|
||||
|
||||
/* the max padding size for tx in bytes (see calc_padding) */
|
||||
#define MAX_PADDING_SIZE 53
|
||||
|
||||
|
|
|
@ -622,7 +622,7 @@ static int set_ctrl_bits(void)
|
|||
}
|
||||
|
||||
/* sets ctrl & data port bits according to current signals values */
|
||||
static void set_bits(void)
|
||||
static void panel_set_bits(void)
|
||||
{
|
||||
set_data_bits();
|
||||
set_ctrl_bits();
|
||||
|
@ -707,12 +707,12 @@ static void lcd_send_serial(int byte)
|
|||
*/
|
||||
for (bit = 0; bit < 8; bit++) {
|
||||
bits.cl = BIT_CLR; /* CLK low */
|
||||
set_bits();
|
||||
panel_set_bits();
|
||||
bits.da = byte & 1;
|
||||
set_bits();
|
||||
panel_set_bits();
|
||||
udelay(2); /* maintain the data during 2 us before CLK up */
|
||||
bits.cl = BIT_SET; /* CLK high */
|
||||
set_bits();
|
||||
panel_set_bits();
|
||||
udelay(1); /* maintain the strobe during 1 us */
|
||||
byte >>= 1;
|
||||
}
|
||||
|
@ -727,7 +727,7 @@ static void lcd_backlight(int on)
|
|||
/* The backlight is activated by seting the AUTOFEED line to +5V */
|
||||
spin_lock(&pprt_lock);
|
||||
bits.bl = on;
|
||||
set_bits();
|
||||
panel_set_bits();
|
||||
spin_unlock(&pprt_lock);
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ obj-$(CONFIG_USB_MON) += mon/
|
|||
obj-$(CONFIG_PCI) += host/
|
||||
obj-$(CONFIG_USB_EHCI_HCD) += host/
|
||||
obj-$(CONFIG_USB_ISP116X_HCD) += host/
|
||||
obj-$(CONFIG_USB_ISP1760_HCD) += host/
|
||||
obj-$(CONFIG_USB_OHCI_HCD) += host/
|
||||
obj-$(CONFIG_USB_UHCI_HCD) += host/
|
||||
obj-$(CONFIG_USB_FHCI_HCD) += host/
|
||||
|
|
|
@ -1349,9 +1349,6 @@ static struct usb_device_id acm_ids[] = {
|
|||
{ USB_DEVICE(0x0e8d, 0x0003), /* FIREFLY, MediaTek Inc; andrey.arapov@gmail.com */
|
||||
.driver_info = NO_UNION_NORMAL, /* has no union descriptor */
|
||||
},
|
||||
{ USB_DEVICE(0x0e8d, 0x3329), /* i-blue 747, Qstarz BT-Q1000, Holux M-241 */
|
||||
.driver_info = NO_UNION_NORMAL, /* has no union descriptor */
|
||||
},
|
||||
{ USB_DEVICE(0x0e8d, 0x3329), /* MediaTek Inc GPS */
|
||||
.driver_info = NO_UNION_NORMAL, /* has no union descriptor */
|
||||
},
|
||||
|
|
|
@ -1622,6 +1622,8 @@ static int qe_ep_disable(struct usb_ep *_ep)
|
|||
nuke(ep, -ESHUTDOWN);
|
||||
ep->desc = NULL;
|
||||
ep->stopped = 1;
|
||||
ep->tx_req = NULL;
|
||||
qe_ep_reset(udc, ep->epnum);
|
||||
spin_unlock_irqrestore(&udc->lock, flags);
|
||||
|
||||
cpm_muram_free(cpm_muram_offset(ep->rxbase));
|
||||
|
@ -1681,14 +1683,11 @@ static void qe_free_request(struct usb_ep *_ep, struct usb_request *_req)
|
|||
kfree(req);
|
||||
}
|
||||
|
||||
/* queues (submits) an I/O request to an endpoint */
|
||||
static int qe_ep_queue(struct usb_ep *_ep, struct usb_request *_req,
|
||||
gfp_t gfp_flags)
|
||||
static int __qe_ep_queue(struct usb_ep *_ep, struct usb_request *_req)
|
||||
{
|
||||
struct qe_ep *ep = container_of(_ep, struct qe_ep, ep);
|
||||
struct qe_req *req = container_of(_req, struct qe_req, req);
|
||||
struct qe_udc *udc;
|
||||
unsigned long flags;
|
||||
int reval;
|
||||
|
||||
udc = ep->udc;
|
||||
|
@ -1732,7 +1731,7 @@ static int qe_ep_queue(struct usb_ep *_ep, struct usb_request *_req,
|
|||
list_add_tail(&req->queue, &ep->queue);
|
||||
dev_vdbg(udc->dev, "gadget have request in %s! %d\n",
|
||||
ep->name, req->req.length);
|
||||
spin_lock_irqsave(&udc->lock, flags);
|
||||
|
||||
/* push the request to device */
|
||||
if (ep_is_in(ep))
|
||||
reval = ep_req_send(ep, req);
|
||||
|
@ -1748,11 +1747,24 @@ static int qe_ep_queue(struct usb_ep *_ep, struct usb_request *_req,
|
|||
if (ep->dir == USB_DIR_OUT)
|
||||
reval = ep_req_receive(ep, req);
|
||||
|
||||
spin_unlock_irqrestore(&udc->lock, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* queues (submits) an I/O request to an endpoint */
|
||||
static int qe_ep_queue(struct usb_ep *_ep, struct usb_request *_req,
|
||||
gfp_t gfp_flags)
|
||||
{
|
||||
struct qe_ep *ep = container_of(_ep, struct qe_ep, ep);
|
||||
struct qe_udc *udc = ep->udc;
|
||||
unsigned long flags;
|
||||
int ret;
|
||||
|
||||
spin_lock_irqsave(&udc->lock, flags);
|
||||
ret = __qe_ep_queue(_ep, _req);
|
||||
spin_unlock_irqrestore(&udc->lock, flags);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* dequeues (cancels, unlinks) an I/O request from an endpoint */
|
||||
static int qe_ep_dequeue(struct usb_ep *_ep, struct usb_request *_req)
|
||||
{
|
||||
|
@ -2008,7 +2020,7 @@ static void ch9getstatus(struct qe_udc *udc, u8 request_type, u16 value,
|
|||
udc->ep0_dir = USB_DIR_IN;
|
||||
|
||||
/* data phase */
|
||||
status = qe_ep_queue(&ep->ep, &req->req, GFP_ATOMIC);
|
||||
status = __qe_ep_queue(&ep->ep, &req->req);
|
||||
|
||||
if (status == 0)
|
||||
return;
|
||||
|
@ -2151,6 +2163,9 @@ static int reset_irq(struct qe_udc *udc)
|
|||
{
|
||||
unsigned char i;
|
||||
|
||||
if (udc->usb_state == USB_STATE_DEFAULT)
|
||||
return 0;
|
||||
|
||||
qe_usb_disable();
|
||||
out_8(&udc->usb_regs->usb_usadr, 0);
|
||||
|
||||
|
@ -2442,8 +2457,12 @@ static int __devinit qe_udc_reg_init(struct qe_udc *udc)
|
|||
struct usb_ctlr __iomem *qe_usbregs;
|
||||
qe_usbregs = udc->usb_regs;
|
||||
|
||||
/* Init the usb register */
|
||||
/* Spec says that we must enable the USB controller to change mode. */
|
||||
out_8(&qe_usbregs->usb_usmod, 0x01);
|
||||
/* Mode changed, now disable it, since muram isn't initialized yet. */
|
||||
out_8(&qe_usbregs->usb_usmod, 0x00);
|
||||
|
||||
/* Initialize the rest. */
|
||||
out_be16(&qe_usbregs->usb_usbmr, 0);
|
||||
out_8(&qe_usbregs->usb_uscom, 0);
|
||||
out_be16(&qe_usbregs->usb_usber, USBER_ALL_CLEAR);
|
||||
|
@ -2604,6 +2623,10 @@ static int __devinit qe_udc_probe(struct of_device *ofdev,
|
|||
(unsigned long)udc_controller);
|
||||
/* request irq and disable DR */
|
||||
udc_controller->usb_irq = irq_of_parse_and_map(np, 0);
|
||||
if (!udc_controller->usb_irq) {
|
||||
ret = -EINVAL;
|
||||
goto err_noirq;
|
||||
}
|
||||
|
||||
ret = request_irq(udc_controller->usb_irq, qe_udc_irq, 0,
|
||||
driver_name, udc_controller);
|
||||
|
@ -2625,6 +2648,8 @@ static int __devinit qe_udc_probe(struct of_device *ofdev,
|
|||
err6:
|
||||
free_irq(udc_controller->usb_irq, udc_controller);
|
||||
err5:
|
||||
irq_dispose_mapping(udc_controller->usb_irq);
|
||||
err_noirq:
|
||||
if (udc_controller->nullmap) {
|
||||
dma_unmap_single(udc_controller->gadget.dev.parent,
|
||||
udc_controller->nullp, 256,
|
||||
|
@ -2648,7 +2673,7 @@ err2:
|
|||
iounmap(udc_controller->usb_regs);
|
||||
err1:
|
||||
kfree(udc_controller);
|
||||
|
||||
udc_controller = NULL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -2710,6 +2735,7 @@ static int __devexit qe_udc_remove(struct of_device *ofdev)
|
|||
kfree(ep->txframe);
|
||||
|
||||
free_irq(udc_controller->usb_irq, udc_controller);
|
||||
irq_dispose_mapping(udc_controller->usb_irq);
|
||||
|
||||
tasklet_kill(&udc_controller->rx_tasklet);
|
||||
|
||||
|
|
|
@ -621,9 +621,9 @@ static int __init aircable_init(void)
|
|||
goto failed_usb_register;
|
||||
return 0;
|
||||
|
||||
failed_serial_register:
|
||||
usb_serial_deregister(&aircable_device);
|
||||
failed_usb_register:
|
||||
usb_serial_deregister(&aircable_device);
|
||||
failed_serial_register:
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
|
|
@ -662,6 +662,7 @@ static struct usb_device_id id_table_combined [] = {
|
|||
{ USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DUSB_PID) },
|
||||
{ USB_DEVICE(ALTI2_VID, ALTI2_N3_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, DIEBOLD_BCS_SE923_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_NDI_HUC_PID) },
|
||||
{ }, /* Optional parameter entry */
|
||||
{ } /* Terminating entry */
|
||||
};
|
||||
|
@ -1064,8 +1065,10 @@ static int set_serial_info(struct tty_struct *tty,
|
|||
|
||||
if (!capable(CAP_SYS_ADMIN)) {
|
||||
if (((new_serial.flags & ~ASYNC_USR_MASK) !=
|
||||
(priv->flags & ~ASYNC_USR_MASK)))
|
||||
(priv->flags & ~ASYNC_USR_MASK))) {
|
||||
unlock_kernel();
|
||||
return -EPERM;
|
||||
}
|
||||
priv->flags = ((priv->flags & ~ASYNC_USR_MASK) |
|
||||
(new_serial.flags & ASYNC_USR_MASK));
|
||||
priv->custom_divisor = new_serial.custom_divisor;
|
||||
|
|
|
@ -844,6 +844,9 @@
|
|||
#define TML_VID 0x1B91 /* Vendor ID */
|
||||
#define TML_USB_SERIAL_PID 0x0064 /* USB - Serial Converter */
|
||||
|
||||
/* NDI Polaris System */
|
||||
#define FTDI_NDI_HUC_PID 0xDA70
|
||||
|
||||
/* Propox devices */
|
||||
#define FTDI_PROPOX_JTAGCABLEII_PID 0xD738
|
||||
|
||||
|
|
|
@ -199,14 +199,15 @@ static int option_send_setup(struct tty_struct *tty, struct usb_serial_port *po
|
|||
#define NOVATELWIRELESS_PRODUCT_MC950D 0x4400
|
||||
|
||||
/* FUTURE NOVATEL PRODUCTS */
|
||||
#define NOVATELWIRELESS_PRODUCT_EVDO_1 0x6000
|
||||
#define NOVATELWIRELESS_PRODUCT_HSPA_1 0x7000
|
||||
#define NOVATELWIRELESS_PRODUCT_EMBEDDED_1 0x8000
|
||||
#define NOVATELWIRELESS_PRODUCT_GLOBAL_1 0x9000
|
||||
#define NOVATELWIRELESS_PRODUCT_EVDO_2 0x6001
|
||||
#define NOVATELWIRELESS_PRODUCT_HSPA_2 0x7001
|
||||
#define NOVATELWIRELESS_PRODUCT_EMBEDDED_2 0x8001
|
||||
#define NOVATELWIRELESS_PRODUCT_GLOBAL_2 0x9001
|
||||
#define NOVATELWIRELESS_PRODUCT_EVDO_FULLSPEED 0X6000
|
||||
#define NOVATELWIRELESS_PRODUCT_EVDO_HIGHSPEED 0X6001
|
||||
#define NOVATELWIRELESS_PRODUCT_HSPA_FULLSPEED 0X7000
|
||||
#define NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED 0X7001
|
||||
#define NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_FULLSPEED 0X8000
|
||||
#define NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_HIGHSPEED 0X8001
|
||||
#define NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_FULLSPEED 0X9000
|
||||
#define NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_HIGHSPEED 0X9001
|
||||
#define NOVATELWIRELESS_PRODUCT_GLOBAL 0XA001
|
||||
|
||||
/* AMOI PRODUCTS */
|
||||
#define AMOI_VENDOR_ID 0x1614
|
||||
|
@ -216,6 +217,27 @@ static int option_send_setup(struct tty_struct *tty, struct usb_serial_port *po
|
|||
|
||||
#define DELL_VENDOR_ID 0x413C
|
||||
|
||||
/* Dell modems */
|
||||
#define DELL_PRODUCT_5700_MINICARD 0x8114
|
||||
#define DELL_PRODUCT_5500_MINICARD 0x8115
|
||||
#define DELL_PRODUCT_5505_MINICARD 0x8116
|
||||
#define DELL_PRODUCT_5700_EXPRESSCARD 0x8117
|
||||
#define DELL_PRODUCT_5510_EXPRESSCARD 0x8118
|
||||
|
||||
#define DELL_PRODUCT_5700_MINICARD_SPRINT 0x8128
|
||||
#define DELL_PRODUCT_5700_MINICARD_TELUS 0x8129
|
||||
|
||||
#define DELL_PRODUCT_5720_MINICARD_VZW 0x8133
|
||||
#define DELL_PRODUCT_5720_MINICARD_SPRINT 0x8134
|
||||
#define DELL_PRODUCT_5720_MINICARD_TELUS 0x8135
|
||||
#define DELL_PRODUCT_5520_MINICARD_CINGULAR 0x8136
|
||||
#define DELL_PRODUCT_5520_MINICARD_GENERIC_L 0x8137
|
||||
#define DELL_PRODUCT_5520_MINICARD_GENERIC_I 0x8138
|
||||
|
||||
#define DELL_PRODUCT_5730_MINICARD_SPRINT 0x8180
|
||||
#define DELL_PRODUCT_5730_MINICARD_TELUS 0x8181
|
||||
#define DELL_PRODUCT_5730_MINICARD_VZW 0x8182
|
||||
|
||||
#define KYOCERA_VENDOR_ID 0x0c88
|
||||
#define KYOCERA_PRODUCT_KPC650 0x17da
|
||||
#define KYOCERA_PRODUCT_KPC680 0x180a
|
||||
|
@ -274,12 +296,6 @@ static int option_send_setup(struct tty_struct *tty, struct usb_serial_port *po
|
|||
#define ERICSSON_VENDOR_ID 0x0bdb
|
||||
#define ERICSSON_PRODUCT_F3507G 0x1900
|
||||
|
||||
/* Pantech products */
|
||||
#define PANTECH_VENDOR_ID 0x106c
|
||||
#define PANTECH_PRODUCT_PC5740 0x3701
|
||||
#define PANTECH_PRODUCT_PC5750 0x3702 /* PX-500 */
|
||||
#define PANTECH_PRODUCT_UM150 0x3711
|
||||
|
||||
static struct usb_device_id option_ids[] = {
|
||||
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
|
||||
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },
|
||||
|
@ -395,31 +411,37 @@ static struct usb_device_id option_ids[] = {
|
|||
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU870D) }, /* Novatel EU850D/EU860D/EU870D */
|
||||
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC950D) }, /* Novatel MC930D/MC950D */
|
||||
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC727) }, /* Novatel MC727/U727/USB727 */
|
||||
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_1) }, /* Novatel EVDO product */
|
||||
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_1) }, /* Novatel HSPA product */
|
||||
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EMBEDDED_1) }, /* Novatel Embedded product */
|
||||
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_GLOBAL_1) }, /* Novatel Global product */
|
||||
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_2) }, /* Novatel EVDO product */
|
||||
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_2) }, /* Novatel HSPA product */
|
||||
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EMBEDDED_2) }, /* Novatel Embedded product */
|
||||
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_GLOBAL_2) }, /* Novatel Global product */
|
||||
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_FULLSPEED) }, /* Novatel EVDO product */
|
||||
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_FULLSPEED) }, /* Novatel HSPA product */
|
||||
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_FULLSPEED) }, /* Novatel EVDO Embedded product */
|
||||
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_FULLSPEED) }, /* Novatel HSPA Embedded product */
|
||||
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_HIGHSPEED) }, /* Novatel EVDO product */
|
||||
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED) }, /* Novatel HSPA product */
|
||||
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_HIGHSPEED) }, /* Novatel EVDO Embedded product */
|
||||
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_HIGHSPEED) }, /* Novatel HSPA Embedded product */
|
||||
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_GLOBAL) }, /* Novatel Global product */
|
||||
|
||||
{ USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01) },
|
||||
{ USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01A) },
|
||||
{ USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H02) },
|
||||
|
||||
{ USB_DEVICE(DELL_VENDOR_ID, 0x8114) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite EV620 CDMA/EV-DO */
|
||||
{ USB_DEVICE(DELL_VENDOR_ID, 0x8115) }, /* Dell Wireless 5500 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */
|
||||
{ USB_DEVICE(DELL_VENDOR_ID, 0x8116) }, /* Dell Wireless 5505 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */
|
||||
{ USB_DEVICE(DELL_VENDOR_ID, 0x8117) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO ExpressCard == Novatel Merlin XV620 CDMA/EV-DO */
|
||||
{ USB_DEVICE(DELL_VENDOR_ID, 0x8118) }, /* Dell Wireless 5510 Mobile Broadband HSDPA ExpressCard == Novatel Merlin XU870 HSDPA/3G */
|
||||
{ USB_DEVICE(DELL_VENDOR_ID, 0x8128) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite E720 CDMA/EV-DO */
|
||||
{ USB_DEVICE(DELL_VENDOR_ID, 0x8129) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite ET620 CDMA/EV-DO */
|
||||
{ USB_DEVICE(DELL_VENDOR_ID, 0x8133) }, /* Dell Wireless 5720 == Novatel EV620 CDMA/EV-DO */
|
||||
{ USB_DEVICE(DELL_VENDOR_ID, 0x8136) }, /* Dell Wireless HSDPA 5520 == Novatel Expedite EU860D */
|
||||
{ USB_DEVICE(DELL_VENDOR_ID, 0x8137) }, /* Dell Wireless HSDPA 5520 */
|
||||
{ USB_DEVICE(DELL_VENDOR_ID, 0x8138) }, /* Dell Wireless 5520 Voda I Mobile Broadband (3G HSDPA) Minicard */
|
||||
{ USB_DEVICE(DELL_VENDOR_ID, 0x8147) }, /* Dell Wireless 5530 Mobile Broadband (3G HSPA) Mini-Card */
|
||||
{ USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5700_MINICARD) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite EV620 CDMA/EV-DO */
|
||||
{ USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5500_MINICARD) }, /* Dell Wireless 5500 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */
|
||||
{ USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5505_MINICARD) }, /* Dell Wireless 5505 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */
|
||||
{ USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5700_EXPRESSCARD) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO ExpressCard == Novatel Merlin XV620 CDMA/EV-DO */
|
||||
{ USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5510_EXPRESSCARD) }, /* Dell Wireless 5510 Mobile Broadband HSDPA ExpressCard == Novatel Merlin XU870 HSDPA/3G */
|
||||
{ USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5700_MINICARD_SPRINT) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite E720 CDMA/EV-DO */
|
||||
{ USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5700_MINICARD_TELUS) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite ET620 CDMA/EV-DO */
|
||||
{ USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5720_MINICARD_VZW) }, /* Dell Wireless 5720 == Novatel EV620 CDMA/EV-DO */
|
||||
{ USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5720_MINICARD_SPRINT) }, /* Dell Wireless 5720 == Novatel EV620 CDMA/EV-DO */
|
||||
{ USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5720_MINICARD_TELUS) }, /* Dell Wireless 5720 == Novatel EV620 CDMA/EV-DO */
|
||||
{ USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5520_MINICARD_CINGULAR) }, /* Dell Wireless HSDPA 5520 == Novatel Expedite EU860D */
|
||||
{ USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5520_MINICARD_GENERIC_L) }, /* Dell Wireless HSDPA 5520 */
|
||||
{ USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5520_MINICARD_GENERIC_I) }, /* Dell Wireless 5520 Voda I Mobile Broadband (3G HSDPA) Minicard */
|
||||
{ USB_DEVICE(DELL_VENDOR_ID, 0x8147) }, /* Dell Wireless 5530 Mobile Broadband (3G HSPA) Mini-Card */
|
||||
{ USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_SPRINT) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */
|
||||
{ USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_TELUS) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */
|
||||
{ USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_VZW) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */
|
||||
{ USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) }, /* ADU-E100, ADU-310 */
|
||||
{ USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) },
|
||||
{ USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_620UW) },
|
||||
|
@ -488,9 +510,6 @@ static struct usb_device_id option_ids[] = {
|
|||
{ USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_MF628) },
|
||||
{ USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH) },
|
||||
{ USB_DEVICE(ERICSSON_VENDOR_ID, ERICSSON_PRODUCT_F3507G) },
|
||||
{ USB_DEVICE(PANTECH_VENDOR_ID, PANTECH_PRODUCT_PC5740) },
|
||||
{ USB_DEVICE(PANTECH_VENDOR_ID, PANTECH_PRODUCT_PC5750) },
|
||||
{ USB_DEVICE(PANTECH_VENDOR_ID, PANTECH_PRODUCT_UM150) },
|
||||
{ } /* Terminating entry */
|
||||
};
|
||||
MODULE_DEVICE_TABLE(usb, option_ids);
|
||||
|
|
|
@ -176,7 +176,7 @@ static unsigned int product_5052_count;
|
|||
/* the array dimension is the number of default entries plus */
|
||||
/* TI_EXTRA_VID_PID_COUNT user defined entries plus 1 terminating */
|
||||
/* null entry */
|
||||
static struct usb_device_id ti_id_table_3410[7+TI_EXTRA_VID_PID_COUNT+1] = {
|
||||
static struct usb_device_id ti_id_table_3410[10+TI_EXTRA_VID_PID_COUNT+1] = {
|
||||
{ USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) },
|
||||
{ USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) },
|
||||
{ USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_NO_FW_PRODUCT_ID) },
|
||||
|
@ -185,9 +185,11 @@ static struct usb_device_id ti_id_table_3410[7+TI_EXTRA_VID_PID_COUNT+1] = {
|
|||
{ USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_PRODUCT_ID) },
|
||||
{ USB_DEVICE(MTS_VENDOR_ID, MTS_EDGE_PRODUCT_ID) },
|
||||
{ USB_DEVICE(IBM_VENDOR_ID, IBM_4543_PRODUCT_ID) },
|
||||
{ USB_DEVICE(IBM_VENDOR_ID, IBM_454B_PRODUCT_ID) },
|
||||
{ USB_DEVICE(IBM_VENDOR_ID, IBM_454C_PRODUCT_ID) },
|
||||
};
|
||||
|
||||
static struct usb_device_id ti_id_table_5052[4+TI_EXTRA_VID_PID_COUNT+1] = {
|
||||
static struct usb_device_id ti_id_table_5052[5+TI_EXTRA_VID_PID_COUNT+1] = {
|
||||
{ USB_DEVICE(TI_VENDOR_ID, TI_5052_BOOT_PRODUCT_ID) },
|
||||
{ USB_DEVICE(TI_VENDOR_ID, TI_5152_BOOT_PRODUCT_ID) },
|
||||
{ USB_DEVICE(TI_VENDOR_ID, TI_5052_EEPROM_PRODUCT_ID) },
|
||||
|
@ -195,7 +197,7 @@ static struct usb_device_id ti_id_table_5052[4+TI_EXTRA_VID_PID_COUNT+1] = {
|
|||
{ USB_DEVICE(IBM_VENDOR_ID, IBM_4543_PRODUCT_ID) },
|
||||
};
|
||||
|
||||
static struct usb_device_id ti_id_table_combined[6+2*TI_EXTRA_VID_PID_COUNT+1] = {
|
||||
static struct usb_device_id ti_id_table_combined[14+2*TI_EXTRA_VID_PID_COUNT+1] = {
|
||||
{ USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) },
|
||||
{ USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) },
|
||||
{ USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_NO_FW_PRODUCT_ID) },
|
||||
|
@ -208,6 +210,8 @@ static struct usb_device_id ti_id_table_combined[6+2*TI_EXTRA_VID_PID_COUNT+1] =
|
|||
{ USB_DEVICE(TI_VENDOR_ID, TI_5052_EEPROM_PRODUCT_ID) },
|
||||
{ USB_DEVICE(TI_VENDOR_ID, TI_5052_FIRMWARE_PRODUCT_ID) },
|
||||
{ USB_DEVICE(IBM_VENDOR_ID, IBM_4543_PRODUCT_ID) },
|
||||
{ USB_DEVICE(IBM_VENDOR_ID, IBM_454B_PRODUCT_ID) },
|
||||
{ USB_DEVICE(IBM_VENDOR_ID, IBM_454C_PRODUCT_ID) },
|
||||
{ }
|
||||
};
|
||||
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
#define IBM_VENDOR_ID 0x04b3
|
||||
#define TI_3410_PRODUCT_ID 0x3410
|
||||
#define IBM_4543_PRODUCT_ID 0x4543
|
||||
#define IBM_454B_PRODUCT_ID 0x454b
|
||||
#define IBM_454C_PRODUCT_ID 0x454c
|
||||
#define TI_3410_EZ430_ID 0xF430 /* TI ez430 development tool */
|
||||
#define TI_5052_BOOT_PRODUCT_ID 0x5052 /* no EEPROM, no firmware */
|
||||
#define TI_5152_BOOT_PRODUCT_ID 0x5152 /* no EEPROM, no firmware */
|
||||
|
|
|
@ -64,6 +64,7 @@
|
|||
*/
|
||||
#define VENDOR_ID_NOKIA 0x0421
|
||||
#define VENDOR_ID_NIKON 0x04b0
|
||||
#define VENDOR_ID_PENTAX 0x0a17
|
||||
#define VENDOR_ID_MOTOROLA 0x22b8
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -158,6 +159,7 @@ static int slave_configure(struct scsi_device *sdev)
|
|||
switch (le16_to_cpu(us->pusb_dev->descriptor.idVendor)) {
|
||||
case VENDOR_ID_NOKIA:
|
||||
case VENDOR_ID_NIKON:
|
||||
case VENDOR_ID_PENTAX:
|
||||
case VENDOR_ID_MOTOROLA:
|
||||
if (!(us->fflags & (US_FL_FIX_CAPACITY |
|
||||
US_FL_CAPACITY_OK)))
|
||||
|
|
|
@ -558,32 +558,10 @@ static void last_sector_hacks(struct us_data *us, struct scsi_cmnd *srb)
|
|||
|
||||
if (srb->result == SAM_STAT_GOOD && scsi_get_resid(srb) == 0) {
|
||||
|
||||
/* The command succeeded. If the capacity is odd
|
||||
* (i.e., if the sector number is even) then the
|
||||
* "always-even" heuristic would be wrong for this
|
||||
* device. Issue a WARN() so that the kerneloops.org
|
||||
* project will be notified and we will then know to
|
||||
* mark the device with a CAPACITY_OK flag. Hopefully
|
||||
* this will occur for only a few devices.
|
||||
*
|
||||
* Use the sign of us->last_sector_hacks to tell whether
|
||||
* the warning has already been issued; we don't need
|
||||
* more than one warning per device.
|
||||
/* The command succeeded. We know this device doesn't
|
||||
* have the last-sector bug, so stop checking it.
|
||||
*/
|
||||
if (!(sector & 1) && us->use_last_sector_hacks > 0) {
|
||||
unsigned vid = le16_to_cpu(
|
||||
us->pusb_dev->descriptor.idVendor);
|
||||
unsigned pid = le16_to_cpu(
|
||||
us->pusb_dev->descriptor.idProduct);
|
||||
unsigned rev = le16_to_cpu(
|
||||
us->pusb_dev->descriptor.bcdDevice);
|
||||
|
||||
WARN(1, "%s: Successful last sector success at %u, "
|
||||
"device %04x:%04x:%04x\n",
|
||||
sdkp->disk->disk_name, sector,
|
||||
vid, pid, rev);
|
||||
us->use_last_sector_hacks = -1;
|
||||
}
|
||||
us->use_last_sector_hacks = 0;
|
||||
|
||||
} else {
|
||||
/* The command failed. Allow up to 3 retries in case this
|
||||
|
@ -599,14 +577,6 @@ static void last_sector_hacks(struct us_data *us, struct scsi_cmnd *srb)
|
|||
srb->result = SAM_STAT_CHECK_CONDITION;
|
||||
memcpy(srb->sense_buffer, record_not_found,
|
||||
sizeof(record_not_found));
|
||||
|
||||
/* In theory we might want to issue a WARN() here if the
|
||||
* capacity is even, since it could indicate the device
|
||||
* has the READ CAPACITY bug _and_ the real capacity is
|
||||
* odd. But it could also indicate that the device
|
||||
* simply can't access its last sector, a failure mode
|
||||
* which is surprisingly common. So no warning.
|
||||
*/
|
||||
}
|
||||
|
||||
done:
|
||||
|
|
|
@ -1214,7 +1214,7 @@ UNUSUAL_DEV( 0x07c4, 0xa400, 0x0000, 0xffff,
|
|||
"Datafab",
|
||||
"KECF-USB",
|
||||
US_SC_DEVICE, US_PR_DEVICE, NULL,
|
||||
US_FL_FIX_INQUIRY ),
|
||||
US_FL_FIX_INQUIRY | US_FL_FIX_CAPACITY ),
|
||||
|
||||
/* Reported by Rauch Wolke <rauchwolke@gmx.net> */
|
||||
UNUSUAL_DEV( 0x07c4, 0xa4a5, 0x0000, 0xffff,
|
||||
|
@ -1354,21 +1354,6 @@ UNUSUAL_DEV( 0x0a17, 0x0004, 0x1000, 0x1000,
|
|||
US_SC_DEVICE, US_PR_DEVICE, NULL,
|
||||
US_FL_FIX_INQUIRY ),
|
||||
|
||||
|
||||
/* Submitted by Per Winkvist <per.winkvist@uk.com> */
|
||||
UNUSUAL_DEV( 0x0a17, 0x006, 0x0000, 0xffff,
|
||||
"Pentax",
|
||||
"Optio S/S4",
|
||||
US_SC_DEVICE, US_PR_DEVICE, NULL,
|
||||
US_FL_FIX_INQUIRY ),
|
||||
|
||||
/* Reported by Jaak Ristioja <Ristioja@gmail.com> */
|
||||
UNUSUAL_DEV( 0x0a17, 0x006e, 0x0100, 0x0100,
|
||||
"Pentax",
|
||||
"K10D",
|
||||
US_SC_DEVICE, US_PR_DEVICE, NULL,
|
||||
US_FL_FIX_CAPACITY ),
|
||||
|
||||
/* These are virtual windows driver CDs, which the zd1211rw driver
|
||||
* automatically converts into WLAN devices. */
|
||||
UNUSUAL_DEV( 0x0ace, 0x2011, 0x0101, 0x0101,
|
||||
|
|
|
@ -1054,9 +1054,10 @@ config FB_RIVA_BACKLIGHT
|
|||
|
||||
config FB_I810
|
||||
tristate "Intel 810/815 support (EXPERIMENTAL)"
|
||||
depends on FB && EXPERIMENTAL && PCI && X86_32
|
||||
depends on EXPERIMENTAL && PCI && X86_32
|
||||
select AGP
|
||||
select AGP_INTEL
|
||||
select FB
|
||||
select FB_MODE_HELPERS
|
||||
select FB_CFB_FILLRECT
|
||||
select FB_CFB_COPYAREA
|
||||
|
@ -1119,7 +1120,8 @@ config FB_CARILLO_RANCH
|
|||
|
||||
config FB_INTEL
|
||||
tristate "Intel 830M/845G/852GM/855GM/865G/915G/945G/945GM/965G/965GM support (EXPERIMENTAL)"
|
||||
depends on FB && EXPERIMENTAL && PCI && X86
|
||||
depends on EXPERIMENTAL && PCI && X86
|
||||
select FB
|
||||
select AGP
|
||||
select AGP_INTEL
|
||||
select FB_MODE_HELPERS
|
||||
|
|
|
@ -1530,8 +1530,7 @@ again:
|
|||
* for higher level blocks, try not to allocate blocks
|
||||
* with the block and the parent locks held.
|
||||
*/
|
||||
if (level > 0 && !prealloc_block.objectid &&
|
||||
btrfs_path_lock_waiting(p, level)) {
|
||||
if (level > 0 && !prealloc_block.objectid) {
|
||||
u32 size = b->len;
|
||||
u64 hint = b->start;
|
||||
|
||||
|
|
|
@ -236,25 +236,3 @@ int btrfs_tree_locked(struct extent_buffer *eb)
|
|||
return test_bit(EXTENT_BUFFER_BLOCKING, &eb->bflags) ||
|
||||
spin_is_locked(&eb->lock);
|
||||
}
|
||||
|
||||
/*
|
||||
* btrfs_search_slot uses this to decide if it should drop its locks
|
||||
* before doing something expensive like allocating free blocks for cow.
|
||||
*/
|
||||
int btrfs_path_lock_waiting(struct btrfs_path *path, int level)
|
||||
{
|
||||
int i;
|
||||
struct extent_buffer *eb;
|
||||
|
||||
for (i = level; i <= level + 1 && i < BTRFS_MAX_LEVEL; i++) {
|
||||
eb = path->nodes[i];
|
||||
if (!eb)
|
||||
break;
|
||||
smp_mb();
|
||||
if (spin_is_contended(&eb->lock) ||
|
||||
waitqueue_active(&eb->lock_wq))
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,8 +26,6 @@ int btrfs_tree_locked(struct extent_buffer *eb);
|
|||
int btrfs_try_tree_lock(struct extent_buffer *eb);
|
||||
int btrfs_try_spin_lock(struct extent_buffer *eb);
|
||||
|
||||
int btrfs_path_lock_waiting(struct btrfs_path *path, int level);
|
||||
|
||||
void btrfs_set_lock_blocking(struct extent_buffer *eb);
|
||||
void btrfs_clear_lock_blocking(struct extent_buffer *eb);
|
||||
#endif
|
||||
|
|
|
@ -427,7 +427,7 @@ nlmsvc_lock(struct svc_rqst *rqstp, struct nlm_file *file,
|
|||
goto out;
|
||||
case -EAGAIN:
|
||||
ret = nlm_lck_denied;
|
||||
goto out;
|
||||
break;
|
||||
case FILE_LOCK_DEFERRED:
|
||||
if (wait)
|
||||
break;
|
||||
|
@ -443,6 +443,10 @@ nlmsvc_lock(struct svc_rqst *rqstp, struct nlm_file *file,
|
|||
goto out;
|
||||
}
|
||||
|
||||
ret = nlm_lck_denied;
|
||||
if (!wait)
|
||||
goto out;
|
||||
|
||||
ret = nlm_lck_blocked;
|
||||
|
||||
/* Append to list of blocked */
|
||||
|
|
|
@ -222,7 +222,7 @@ static inline struct crypto_tfm *crypto_shash_tfm(struct crypto_shash *tfm)
|
|||
|
||||
static inline void crypto_free_shash(struct crypto_shash *tfm)
|
||||
{
|
||||
crypto_free_tfm(crypto_shash_tfm(tfm));
|
||||
crypto_destroy_tfm(tfm, crypto_shash_tfm(tfm));
|
||||
}
|
||||
|
||||
static inline unsigned int crypto_shash_alignmask(
|
||||
|
|
|
@ -261,6 +261,7 @@ typedef struct drm_i915_irq_wait {
|
|||
#define I915_PARAM_LAST_DISPATCH 3
|
||||
#define I915_PARAM_CHIPSET_ID 4
|
||||
#define I915_PARAM_HAS_GEM 5
|
||||
#define I915_PARAM_NUM_FENCES_AVAIL 6
|
||||
|
||||
typedef struct drm_i915_getparam {
|
||||
int param;
|
||||
|
@ -272,6 +273,7 @@ typedef struct drm_i915_getparam {
|
|||
#define I915_SETPARAM_USE_MI_BATCHBUFFER_START 1
|
||||
#define I915_SETPARAM_TEX_LRU_LOG_GRANULARITY 2
|
||||
#define I915_SETPARAM_ALLOW_BATCHBUFFER 3
|
||||
#define I915_SETPARAM_NUM_USED_FENCES 4
|
||||
|
||||
typedef struct drm_i915_setparam {
|
||||
int param;
|
||||
|
|
|
@ -552,7 +552,12 @@ struct crypto_tfm *crypto_alloc_tfm(const char *alg_name,
|
|||
const struct crypto_type *frontend,
|
||||
u32 type, u32 mask);
|
||||
struct crypto_tfm *crypto_alloc_base(const char *alg_name, u32 type, u32 mask);
|
||||
void crypto_free_tfm(struct crypto_tfm *tfm);
|
||||
void crypto_destroy_tfm(void *mem, struct crypto_tfm *tfm);
|
||||
|
||||
static inline void crypto_free_tfm(struct crypto_tfm *tfm)
|
||||
{
|
||||
return crypto_destroy_tfm(tfm, tfm);
|
||||
}
|
||||
|
||||
int alg_test(const char *driver, const char *alg, u32 type, u32 mask);
|
||||
|
||||
|
|
|
@ -124,7 +124,12 @@ do { \
|
|||
#ifdef CONFIG_GENERIC_LOCKBREAK
|
||||
#define spin_is_contended(lock) ((lock)->break_lock)
|
||||
#else
|
||||
|
||||
#ifdef __raw_spin_is_contended
|
||||
#define spin_is_contended(lock) __raw_spin_is_contended(&(lock)->raw_lock)
|
||||
#else
|
||||
#define spin_is_contended(lock) (((void)(lock), 0))
|
||||
#endif /*__raw_spin_is_contended*/
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
@ -114,12 +114,15 @@ int __ref profile_init(void)
|
|||
if (!slab_is_available()) {
|
||||
prof_buffer = alloc_bootmem(buffer_bytes);
|
||||
alloc_bootmem_cpumask_var(&prof_cpu_mask);
|
||||
cpumask_copy(prof_cpu_mask, cpu_possible_mask);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!alloc_cpumask_var(&prof_cpu_mask, GFP_KERNEL))
|
||||
return -ENOMEM;
|
||||
|
||||
cpumask_copy(prof_cpu_mask, cpu_possible_mask);
|
||||
|
||||
prof_buffer = kzalloc(buffer_bytes, GFP_KERNEL);
|
||||
if (prof_buffer)
|
||||
return 0;
|
||||
|
|
|
@ -311,7 +311,10 @@ long mlock_vma_pages_range(struct vm_area_struct *vma,
|
|||
is_vm_hugetlb_page(vma) ||
|
||||
vma == get_gate_vma(current))) {
|
||||
|
||||
return __mlock_vma_pages_range(vma, start, end, 1);
|
||||
__mlock_vma_pages_range(vma, start, end, 1);
|
||||
|
||||
/* Hide errors from mmap() and other callers */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue