Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210175
b: refs/heads/master
c: e167976
h: refs/heads/master
i:
  210173: 933252d
  210171: c182c75
  210167: 94c583f
  210159: 32b57ec
  210143: 4f39a8b
  210111: 9551e73
  210047: 6461ab6
  209919: 9cf3cd8
v: v3
  • Loading branch information
Andrew Morton authored and Chris Wilson committed Sep 6, 2010
1 parent bd36da7 commit 1df5364
Show file tree
Hide file tree
Showing 24 changed files with 192 additions and 294 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6300d6d755842f2ed18053ed6f868944d51b5aef
refs/heads/master: e167976ee7f5fe4b80f7e8f55e087f6c67cf9562
15 changes: 5 additions & 10 deletions trunk/arch/h8300/include/asm/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@

static __inline__ int atomic_add_return(int i, atomic_t *v)
{
unsigned long flags;
int ret;
int ret,flags;
local_irq_save(flags);
ret = v->counter += i;
local_irq_restore(flags);
Expand All @@ -31,8 +30,7 @@ static __inline__ int atomic_add_return(int i, atomic_t *v)

static __inline__ int atomic_sub_return(int i, atomic_t *v)
{
unsigned long flags;
int ret;
int ret,flags;
local_irq_save(flags);
ret = v->counter -= i;
local_irq_restore(flags);
Expand All @@ -44,8 +42,7 @@ static __inline__ int atomic_sub_return(int i, atomic_t *v)

static __inline__ int atomic_inc_return(atomic_t *v)
{
unsigned long flags;
int ret;
int ret,flags;
local_irq_save(flags);
v->counter++;
ret = v->counter;
Expand All @@ -67,8 +64,7 @@ static __inline__ int atomic_inc_return(atomic_t *v)

static __inline__ int atomic_dec_return(atomic_t *v)
{
unsigned long flags;
int ret;
int ret,flags;
local_irq_save(flags);
--v->counter;
ret = v->counter;
Expand All @@ -80,8 +76,7 @@ static __inline__ int atomic_dec_return(atomic_t *v)

static __inline__ int atomic_dec_and_test(atomic_t *v)
{
unsigned long flags;
int ret;
int ret,flags;
local_irq_save(flags);
--v->counter;
ret = v->counter;
Expand Down
4 changes: 1 addition & 3 deletions trunk/arch/h8300/include/asm/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

#include <linux/linkage.h>

struct pt_regs;

/*
* switch_to(n) should switch tasks to task ptr, first checking that
* ptr isn't the current task, in which case it does nothing. This
Expand Down Expand Up @@ -157,6 +155,6 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz

#define arch_align_stack(x) (x)

extern void die(const char *str, struct pt_regs *fp, unsigned long err);
void die(char *str, struct pt_regs *fp, unsigned long err);

#endif /* _H8300_SYSTEM_H */
4 changes: 2 additions & 2 deletions trunk/arch/h8300/kernel/sys_h8300.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ int kernel_execve(const char *filename,
const char *const envp[])
{
register long res __asm__("er0");
register const char *const *_c __asm__("er3") = envp;
register const char *const *_b __asm__("er2") = argv;
register char *const *_c __asm__("er3") = envp;
register char *const *_b __asm__("er2") = argv;
register const char * _a __asm__("er1") = filename;
__asm__ __volatile__ ("mov.l %1,er0\n\t"
"trapa #0\n\t"
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/h8300/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static void dump(struct pt_regs *fp)
printk("\n\n");
}

void die(const char *str, struct pt_regs *fp, unsigned long err)
void die(char *str, struct pt_regs *fp, unsigned long err)
{
static int diecount;

Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/m68knommu/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,6 @@ SECTIONS {
_sdata = . ;
DATA_DATA
CACHELINE_ALIGNED_DATA(32)
PAGE_ALIGNED_DATA(PAGE_SIZE)
*(.data..shared_aligned)
INIT_TASK_DATA(THREAD_SIZE)
_edata = . ;
} > DATA
Expand Down
24 changes: 6 additions & 18 deletions trunk/drivers/gpu/drm/drm_crtc_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@
#include "drm_crtc_helper.h"
#include "drm_fb_helper.h"

static bool drm_kms_helper_poll = true;
module_param_named(poll, drm_kms_helper_poll, bool, 0600);

static void drm_mode_validate_flag(struct drm_connector *connector,
int flags)
{
Expand Down Expand Up @@ -102,10 +99,8 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
connector->status = connector_status_disconnected;
if (connector->funcs->force)
connector->funcs->force(connector);
} else {
} else
connector->status = connector->funcs->detect(connector);
drm_helper_hpd_irq_event(dev);
}

if (connector->status == connector_status_disconnected) {
DRM_DEBUG_KMS("[CONNECTOR:%d:%s] disconnected\n",
Expand All @@ -115,10 +110,11 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
}

count = (*connector_funcs->get_modes)(connector);
if (count == 0 && connector->status == connector_status_connected)
if (!count) {
count = drm_add_modes_noedid(connector, 1024, 768);
if (count == 0)
goto prune;
if (!count)
return 0;
}

drm_mode_connector_list_update(connector);

Expand Down Expand Up @@ -844,9 +840,6 @@ static void output_poll_execute(struct work_struct *work)
enum drm_connector_status old_status, status;
bool repoll = false, changed = false;

if (!drm_kms_helper_poll)
return;

mutex_lock(&dev->mode_config.mutex);
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {

Expand Down Expand Up @@ -897,9 +890,6 @@ void drm_kms_helper_poll_enable(struct drm_device *dev)
bool poll = false;
struct drm_connector *connector;

if (!dev->mode_config.poll_enabled || !drm_kms_helper_poll)
return;

list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
if (connector->polled)
poll = true;
Expand Down Expand Up @@ -929,10 +919,8 @@ void drm_helper_hpd_irq_event(struct drm_device *dev)
{
if (!dev->mode_config.poll_enabled)
return;

/* kill timer and schedule immediate execution, this doesn't block */
cancel_delayed_work(&dev->mode_config.output_poll_work);
if (drm_kms_helper_poll)
queue_delayed_work(system_nrt_wq, &dev->mode_config.output_poll_work, 0);
queue_delayed_work(system_nrt_wq, &dev->mode_config.output_poll_work, 0);
}
EXPORT_SYMBOL(drm_helper_hpd_irq_event);
2 changes: 2 additions & 0 deletions trunk/drivers/gpu/drm/i915/intel_overlay.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
*
* Derived from Xorg ddx, xf86-video-intel, src/i830_video.c
*/

#include <linux/seq_file.h>
#include "drmP.h"
#include "drm.h"
#include "i915_drm.h"
Expand Down
6 changes: 2 additions & 4 deletions trunk/drivers/gpu/drm/nouveau/nouveau_fence.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,16 @@ nouveau_fence_update(struct nouveau_channel *chan)
struct nouveau_fence *fence;
uint32_t sequence;

spin_lock(&chan->fence.lock);

if (USE_REFCNT)
sequence = nvchan_rd32(chan, 0x48);
else
sequence = atomic_read(&chan->fence.last_sequence_irq);

if (chan->fence.sequence_ack == sequence)
goto out;
return;
chan->fence.sequence_ack = sequence;

spin_lock(&chan->fence.lock);
list_for_each_safe(entry, tmp, &chan->fence.pending) {
fence = list_entry(entry, struct nouveau_fence, entry);

Expand All @@ -86,7 +85,6 @@ nouveau_fence_update(struct nouveau_channel *chan)
if (sequence == chan->fence.sequence_ack)
break;
}
out:
spin_unlock(&chan->fence.lock);
}

Expand Down
7 changes: 5 additions & 2 deletions trunk/drivers/gpu/drm/nouveau/nouveau_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ validate_fini_list(struct list_head *list, struct nouveau_fence *fence)
list_del(&nvbo->entry);
nvbo->reserved_by = NULL;
ttm_bo_unreserve(&nvbo->bo);
drm_gem_object_unreference_unlocked(nvbo->gem);
drm_gem_object_unreference(nvbo->gem);
}
}

Expand Down Expand Up @@ -300,7 +300,7 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv,
validate_fini(op, NULL);
if (ret == -EAGAIN)
ret = ttm_bo_wait_unreserved(&nvbo->bo, false);
drm_gem_object_unreference_unlocked(gem);
drm_gem_object_unreference(gem);
if (ret) {
NV_ERROR(dev, "fail reserve\n");
return ret;
Expand Down Expand Up @@ -616,6 +616,8 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
return PTR_ERR(bo);
}

mutex_lock(&dev->struct_mutex);

/* Mark push buffers as being used on PFIFO, the validation code
* will then make sure that if the pushbuf bo moves, that they
* happen on the kernel channel, which will in turn cause a sync
Expand Down Expand Up @@ -729,6 +731,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
out:
validate_fini(&op, fence);
nouveau_fence_unref((void**)&fence);
mutex_unlock(&dev->struct_mutex);
kfree(bo);
kfree(push);

Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/gpu/drm/nouveau/nv50_instmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@ nv50_instmem_init(struct drm_device *dev)
chan->file_priv = (struct drm_file *)-2;
dev_priv->fifos[0] = dev_priv->fifos[127] = chan;

INIT_LIST_HEAD(&chan->ramht_refs);

/* Channel's PRAMIN object + heap */
ret = nouveau_gpuobj_new_fake(dev, 0, c_offset, c_size, 0,
NULL, &chan->ramin);
Expand Down
48 changes: 7 additions & 41 deletions trunk/drivers/gpu/drm/radeon/atombios_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,6 @@ static void atombios_crtc_set_timing(struct drm_crtc *crtc,
args.usV_SyncWidth =
cpu_to_le16(mode->crtc_vsync_end - mode->crtc_vsync_start);

args.ucOverscanRight = radeon_crtc->h_border;
args.ucOverscanLeft = radeon_crtc->h_border;
args.ucOverscanBottom = radeon_crtc->v_border;
args.ucOverscanTop = radeon_crtc->v_border;

if (mode->flags & DRM_MODE_FLAG_NVSYNC)
misc |= ATOM_VSYNC_POLARITY;
if (mode->flags & DRM_MODE_FLAG_NHSYNC)
Expand Down Expand Up @@ -539,20 +534,6 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc,
pll->algo = PLL_ALGO_LEGACY;
pll->flags |= RADEON_PLL_PREFER_CLOSEST_LOWER;
}
/* There is some evidence (often anecdotal) that RV515 LVDS
* (on some boards at least) prefers the legacy algo. I'm not
* sure whether this should handled generically or on a
* case-by-case quirk basis. Both algos should work fine in the
* majority of cases.
*/
if ((radeon_encoder->active_device & (ATOM_DEVICE_LCD_SUPPORT)) &&
(rdev->family == CHIP_RV515)) {
/* allow the user to overrride just in case */
if (radeon_new_pll == 1)
pll->algo = PLL_ALGO_NEW;
else
pll->algo = PLL_ALGO_LEGACY;
}
} else {
if (encoder->encoder_type != DRM_MODE_ENCODER_DAC)
pll->flags |= RADEON_PLL_NO_ODD_POST_DIV;
Expand Down Expand Up @@ -1075,11 +1056,11 @@ static int avivo_crtc_set_base(struct drm_crtc *crtc, int x, int y,

if (rdev->family >= CHIP_RV770) {
if (radeon_crtc->crtc_id) {
WREG32(R700_D2GRPH_PRIMARY_SURFACE_ADDRESS_HIGH, upper_32_bits(fb_location));
WREG32(R700_D2GRPH_SECONDARY_SURFACE_ADDRESS_HIGH, upper_32_bits(fb_location));
WREG32(R700_D2GRPH_PRIMARY_SURFACE_ADDRESS_HIGH, 0);
WREG32(R700_D2GRPH_SECONDARY_SURFACE_ADDRESS_HIGH, 0);
} else {
WREG32(R700_D1GRPH_PRIMARY_SURFACE_ADDRESS_HIGH, upper_32_bits(fb_location));
WREG32(R700_D1GRPH_SECONDARY_SURFACE_ADDRESS_HIGH, upper_32_bits(fb_location));
WREG32(R700_D1GRPH_PRIMARY_SURFACE_ADDRESS_HIGH, 0);
WREG32(R700_D1GRPH_SECONDARY_SURFACE_ADDRESS_HIGH, 0);
}
}
WREG32(AVIVO_D1GRPH_PRIMARY_SURFACE_ADDRESS + radeon_crtc->crtc_offset,
Expand Down Expand Up @@ -1216,18 +1197,8 @@ int atombios_crtc_mode_set(struct drm_crtc *crtc,
struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc);
struct drm_device *dev = crtc->dev;
struct radeon_device *rdev = dev->dev_private;
struct drm_encoder *encoder;
bool is_tvcv = false;

list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
/* find tv std */
if (encoder->crtc == crtc) {
struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
if (radeon_encoder->active_device &
(ATOM_DEVICE_TV_SUPPORT | ATOM_DEVICE_CV_SUPPORT))
is_tvcv = true;
}
}
/* TODO color tiling */

atombios_disable_ss(crtc);
/* always set DCPLL */
Expand All @@ -1236,14 +1207,9 @@ int atombios_crtc_mode_set(struct drm_crtc *crtc,
atombios_crtc_set_pll(crtc, adjusted_mode);
atombios_enable_ss(crtc);

if (ASIC_IS_DCE4(rdev))
if (ASIC_IS_AVIVO(rdev))
atombios_set_crtc_dtd_timing(crtc, adjusted_mode);
else if (ASIC_IS_AVIVO(rdev)) {
if (is_tvcv)
atombios_crtc_set_timing(crtc, adjusted_mode);
else
atombios_set_crtc_dtd_timing(crtc, adjusted_mode);
} else {
else {
atombios_crtc_set_timing(crtc, adjusted_mode);
if (radeon_crtc->crtc_id == 0)
atombios_set_crtc_dtd_timing(crtc, adjusted_mode);
Expand Down
Loading

0 comments on commit 1df5364

Please sign in to comment.