Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 6335 → Rev 6336

/drivers/include/drm/drmP.h
318,6 → 318,11
unsigned universal_planes:1;
/* true if client understands atomic properties */
unsigned atomic:1;
/*
* This client is allowed to gain master privileges for @master.
* Protected by struct drm_device::master_mutex.
*/
unsigned allowed_master:1;
struct list_head lhead;
struct drm_minor *minor;
unsigned long lock_count;
/drivers/include/drm/drm_cache.h
35,4 → 35,13
 
void drm_clflush_pages(struct page *pages[], unsigned long num_pages);
 
static inline bool drm_arch_can_wc_memory(void)
{
#if defined(CONFIG_PPC) && !defined(CONFIG_NOT_COHERENT_CACHE)
return false;
#else
return true;
#endif
}
 
#endif
/drivers/include/drm/drm_dp_mst_helper.h
44,8 → 44,6
/**
* struct drm_dp_mst_port - MST port
* @kref: reference count for this port.
* @guid_valid: for DP 1.2 devices if we have validated the GUID.
* @guid: guid for DP 1.2 device on this port.
* @port_num: port number
* @input: if this port is an input port.
* @mcs: message capability status - DP 1.2 spec.
70,10 → 68,6
struct drm_dp_mst_port {
struct kref kref;
 
/* if dpcd 1.2 device is on this port - its GUID info */
bool guid_valid;
u8 guid[16];
 
u8 port_num;
bool input;
bool mcs;
109,10 → 103,12
* @tx_slots: transmission slots for this device.
* @last_seqno: last sequence number used to talk to this.
* @link_address_sent: if a link address message has been sent to this device yet.
* @guid: guid for DP 1.2 branch device. port under this branch can be
* identified by port #.
*
* This structure represents an MST branch device, there is one
* primary branch device at the root, along with any others connected
* to downstream ports
* primary branch device at the root, along with any other branches connected
* to downstream port of parent branches.
*/
struct drm_dp_mst_branch {
struct kref kref;
131,6 → 127,9
struct drm_dp_sideband_msg_tx *tx_slots[2];
int last_seqno;
bool link_address_sent;
 
/* global unique identifier to identify branch devices */
u8 guid[16];
};
 
 
405,11 → 404,9
* @conn_base_id: DRM connector ID this mgr is connected to.
* @down_rep_recv: msg receiver state for down replies.
* @up_req_recv: msg receiver state for up requests.
* @lock: protects mst state, primary, guid, dpcd.
* @lock: protects mst state, primary, dpcd.
* @mst_state: if this manager is enabled for an MST capable port.
* @mst_primary: pointer to the primary branch device.
* @guid_valid: GUID valid for the primary branch device.
* @guid: GUID for primary port.
* @dpcd: cache of DPCD for primary port.
* @pbn_div: PBN to slots divisor.
*
431,13 → 428,11
struct drm_dp_sideband_msg_rx up_req_recv;
 
/* pointer to info about the initial MST device */
struct mutex lock; /* protects mst_state + primary + guid + dpcd */
struct mutex lock; /* protects mst_state + primary + dpcd */
 
bool mst_state;
struct drm_dp_mst_branch *mst_primary;
/* primary MST device GUID */
bool guid_valid;
u8 guid[16];
 
u8 dpcd[DP_RECEIVER_CAP_SIZE];
u8 sink_count;
int pbn_div;
450,9 → 445,7
the mstb tx_slots and txmsg->state once they are queued */
struct mutex qlock;
struct list_head tx_msg_downq;
struct list_head tx_msg_upq;
bool tx_down_in_progress;
bool tx_up_in_progress;
 
/* payload info + lock for it */
struct mutex payload_lock;
/drivers/include/drm/drm_fixed.h
73,6 → 73,8
#define DRM_FIXED_ONE (1ULL << DRM_FIXED_POINT)
#define DRM_FIXED_DECIMAL_MASK (DRM_FIXED_ONE - 1)
#define DRM_FIXED_DIGITS_MASK (~DRM_FIXED_DECIMAL_MASK)
#define DRM_FIXED_EPSILON 1LL
#define DRM_FIXED_ALMOST_ONE (DRM_FIXED_ONE - DRM_FIXED_EPSILON)
 
static inline s64 drm_int2fixp(int a)
{
79,13 → 81,21
return ((s64)a) << DRM_FIXED_POINT;
}
 
static inline int drm_fixp2int(int64_t a)
static inline int drm_fixp2int(s64 a)
{
return ((s64)a) >> DRM_FIXED_POINT;
}
 
static inline unsigned drm_fixp_msbset(int64_t a)
static inline int drm_fixp2int_ceil(s64 a)
{
if (a > 0)
return drm_fixp2int(a + DRM_FIXED_ALMOST_ONE);
else
return drm_fixp2int(a - DRM_FIXED_ALMOST_ONE);
}
 
static inline unsigned drm_fixp_msbset(s64 a)
{
unsigned shift, sign = (a >> 63) & 1;
 
for (shift = 62; shift > 0; --shift)
136,6 → 146,45
return result;
}
 
static inline s64 drm_fixp_from_fraction(s64 a, s64 b)
{
s64 res;
bool a_neg = a < 0;
bool b_neg = b < 0;
u64 a_abs = a_neg ? -a : a;
u64 b_abs = b_neg ? -b : b;
u64 rem;
 
/* determine integer part */
u64 res_abs = div64_u64_rem(a_abs, b_abs, &rem);
 
/* determine fractional part */
{
u32 i = DRM_FIXED_POINT;
 
do {
rem <<= 1;
res_abs <<= 1;
if (rem >= b_abs) {
res_abs |= 1;
rem -= b_abs;
}
} while (--i != 0);
}
 
/* round up LSB */
{
u64 summand = (rem << 1) >= b_abs;
 
res_abs += summand;
}
 
res = (s64) res_abs;
if (a_neg ^ b_neg)
res = -res;
return res;
}
 
static inline s64 drm_fixp_exp(s64 x)
{
s64 tolerance = div64_s64(DRM_FIXED_ONE, 1000000);