repo_name
stringlengths 4
116
| path
stringlengths 3
942
| size
stringlengths 1
7
| content
stringlengths 3
1.05M
| license
stringclasses 15
values |
---|---|---|---|---|
katrinleinweber/podlove-publisher | lib/modules/seasons/js/admin.js | 311 | jQuery(document).ready(function($) {
var $start_date = $("#podlove_season_start_date")
$start_date.datepicker({
dateFormat: $.datepicker.ISO_8601,
changeMonth: true,
changeYear: true
});
$start_date.closest("div").on("click", function() {
$start_date.datepicker("show");
});
});
| mit |
liangrog/lmdo | lmdo/config_parser.py | 506 | from abc import ABCMeta, abstractmethod
class ConfigParser:
"""Configuration file parser ABC"""
__metaclass__ = ABCMeta
"""
Config parser interface
All parsers for configuaration will
need to comply with this interface
so lmdo can understand it
"""
@abstractmethod
def get(self, *args, **kwargs):
"""Get value from config file"""
pass
@abstractmethod
def validate(self, *args, **kwargs):
"""Validate config file"""
pass
| mit |
shopery/elcodi | src/Elcodi/Component/Tax/Factory/TaxFactory.php | 1124 | <?php
/*
* This file is part of the Elcodi package.
*
* Copyright (c) 2014-2015 Elcodi.com
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* Feel free to edit as you please, and have fun.
*
* @author Marc Morera <[email protected]>
* @author Aldo Chiecchia <[email protected]>
* @author Elcodi Team <[email protected]>
*/
namespace Elcodi\Component\Tax\Factory;
use Elcodi\Component\Core\Factory\Abstracts\AbstractFactory;
use Elcodi\Component\Tax\Entity\Tax;
/**
* Class TaxFactory
*/
class TaxFactory extends AbstractFactory
{
/**
* Creates an instance of an entity.
*
* This method must return always an empty instance
*
* @return Tax Empty entity
*/
public function create()
{
/**
* @var Tax $tax
*/
$classNamespace = $this->getEntityNamespace();
$tax = new $classNamespace();
$tax
->setName('')
->setDescription('')
->setValue(0)
->setEnabled(false);
return $tax;
}
}
| mit |
jeremymcwilliams/pubcom | postgresql/html/plperl-data.html | 3049 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>Data Values in PL/Perl</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REV="MADE"
HREF="mailto:[email protected]"><LINK
REL="HOME"
TITLE="PostgreSQL 9.0.5 Documentation"
HREF="index.html"><LINK
REL="UP"
TITLE="PL/Perl - Perl Procedural Language"
HREF="plperl.html"><LINK
REL="PREVIOUS"
TITLE="PL/Perl Functions and Arguments"
HREF="plperl-funcs.html"><LINK
REL="NEXT"
TITLE="Built-in Functions"
HREF="plperl-builtins.html"><LINK
REL="STYLESHEET"
TYPE="text/css"
HREF="stylesheet.css"><META
HTTP-EQUIV="Content-Type"
CONTENT="text/html; charset=ISO-8859-1"><META
NAME="creation"
CONTENT="2011-09-22T22:21:03"></HEAD
><BODY
CLASS="SECT1"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="5"
ALIGN="center"
VALIGN="bottom"
><A
HREF="index.html"
>PostgreSQL 9.0.5 Documentation</A
></TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="top"
><A
TITLE="PL/Perl Functions and Arguments"
HREF="plperl-funcs.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="top"
><A
TITLE="PL/Perl - Perl Procedural Language"
HREF="plperl.html"
>Fast Backward</A
></TD
><TD
WIDTH="60%"
ALIGN="center"
VALIGN="bottom"
>Chapter 41. PL/Perl - Perl Procedural Language</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="top"
><A
TITLE="PL/Perl - Perl Procedural Language"
HREF="plperl.html"
>Fast Forward</A
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="top"
><A
TITLE="Built-in Functions"
HREF="plperl-builtins.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="PLPERL-DATA"
>41.2. Data Values in PL/Perl</A
></H1
><P
> The argument values supplied to a PL/Perl function's code are
simply the input arguments converted to text form (just as if they
had been displayed by a <TT
CLASS="COMMAND"
>SELECT</TT
> statement).
Conversely, the <CODE
CLASS="FUNCTION"
>return</CODE
> and <CODE
CLASS="FUNCTION"
>return_next</CODE
>
commands will accept any string that is acceptable input format
for the function's declared return type.
</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="plperl-funcs.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="plperl-builtins.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>PL/Perl Functions and Arguments</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="plperl.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Built-in Functions</TD
></TR
></TABLE
></DIV
></BODY
></HTML
> | mit |
dalifreire/takes | src/main/java/org/takes/facets/fork/TkMethods.java | 1835 | /**
* The MIT License (MIT)
*
* Copyright (c) 2014-2016 Yegor Bugayenko
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.takes.facets.fork;
import java.util.Arrays;
import lombok.ToString;
import org.takes.Take;
import org.takes.tk.TkWrap;
/**
* Take that acts on request with specified methods only.
* <p>The class is immutable and thread-safe.
*
* @author Aleksey Popov ([email protected])
* @version $Id$
* @since 0.16.1
*/
@ToString(callSuper = true)
public class TkMethods extends TkWrap {
/**
* Ctor.
*
* @param take Original take
* @param methods Methods the take should act
*/
public TkMethods(final Take take, final String ...methods) {
super(
new TkFork(new FkMethods(Arrays.asList(methods), take))
);
}
}
| mit |
veewee/grumphp | test/Unit/Task/CloverCoverageTest.php | 4169 | <?php
declare(strict_types=1);
namespace GrumPHPTest\Unit\Task;
use GrumPHP\Task\CloverCoverage;
use GrumPHP\Task\Context\GitPreCommitContext;
use GrumPHP\Task\Context\RunContext;
use GrumPHP\Task\TaskInterface;
use GrumPHP\Test\Task\AbstractTaskTestCase;
use GrumPHP\Util\Filesystem;
use Prophecy\Argument;
use Prophecy\Prophecy\ObjectProphecy;
class CloverCoverageTest extends AbstractTaskTestCase
{
/**
* @var Filesystem|ObjectProphecy
*/
private $filesystem;
protected function provideTask(): TaskInterface
{
$this->filesystem = $this->prophesize(Filesystem::class);
return new CloverCoverage(
$this->filesystem->reveal()
);
}
public function provideConfigurableOptions(): iterable
{
yield 'defaults' => [
[
'clover_file' => 'coverage.xml',
],
[
'level' => 100,
'clover_file' => 'coverage.xml',
]
];
}
public function provideRunContexts(): iterable
{
yield 'run-context' => [
true,
$this->mockContext(RunContext::class)
];
yield 'pre-commit-context' => [
true,
$this->mockContext(GitPreCommitContext::class)
];
yield 'other' => [
false,
$this->mockContext()
];
}
public function provideFailsOnStuff(): iterable
{
yield 'fileDoesntExist' => [
[
'clover_file' => 'coverage.xml',
],
$this->mockContext(RunContext::class, ['coverage.xml']),
function () {
$this->filesystem->exists('coverage.xml')->willReturn(false);
},
'Invalid input file provided'
];
yield 'level0' => [
[
'clover_file' => 'coverage.xml',
'level' => 0,
],
$this->mockContext(RunContext::class, ['coverage.xml']),
function () {
$this->filesystem->exists('coverage.xml')->willReturn(true);
},
'An integer checked percentage must be given as second parameter'
];
yield 'levelNotReached' => [
[
'clover_file' => 'coverage.xml',
'level' => 100,
],
$this->mockContext(RunContext::class, ['coverage.xml']),
function () {
$this->filesystem->exists('coverage.xml')->willReturn(true);
$this->filesystem->readFromFileInfo(Argument::which('getBasename', 'coverage.xml'))->willReturn(
file_get_contents(TEST_BASE_PATH.'/fixtures/clover_coverage/60-percent-coverage.xml')
);
},
'Code coverage is 60%, which is below the accepted 100%'
];
}
public function providePassesOnStuff(): iterable
{
yield 'levelReached' => [
[
'clover_file' => 'coverage.xml',
'level' => 50,
],
$this->mockContext(RunContext::class, ['coverage.xml']),
function () {
$this->filesystem->exists('coverage.xml')->willReturn(true);
$this->filesystem->readFromFileInfo(Argument::which('getBasename', 'coverage.xml'))->willReturn(
file_get_contents(TEST_BASE_PATH.'/fixtures/clover_coverage/60-percent-coverage.xml')
);
},
];
}
public function provideSkipsOnStuff(): iterable
{
yield 'noMetricElements' => [
[
'clover_file' => 'coverage.xml',
'level' => 50,
],
$this->mockContext(RunContext::class, ['coverage.xml']),
function () {
$this->filesystem->exists('coverage.xml')->willReturn(true);
$this->filesystem->readFromFileInfo(Argument::which('getBasename', 'coverage.xml'))->willReturn(
file_get_contents(TEST_BASE_PATH.'/fixtures/clover_coverage/0-elements.xml')
);
}
];
}
}
| mit |
digimark1/trackngo-dash | application/views/customer/customer_view.php | 8679 | <div>
<div id="dashboard-main">
<!-- <form id="create_note" class="form-horizontal" method="post" action="<?= site_url('api/create_note') ?>">
<div class="input-append">
<input tabindex="1" type="text" name="title" placeholder="Note Title" />
<input tabindex="3" type="submit" class="btn btn-success" value="Create" />
</div>
<div class="clearfix"></div>
<textarea tabindex="2" name="content"></textarea>
</form>-->
<div id="list_user">
<span class="ajax-loader-gray"></span>
</div>
<div id="category-actions">
<div id="category-button"><a style="outline: medium none;" hidefocus="true" href="<?php echo site_url('customer/'); ?>"><img src="<?php echo base_url() ?>/public/img/images/customers-bt-w.png" style=" width:40px; height:40px; margin-top:10px" alt="View All Loads"></a></div>
<div class="loads-title" id="category-title" style="height: 32px;padding-top: 15px;"><h2 style="font-weight: 600;letter-spacing: 1px;padding-right: 5px;">CUSTOMERS</h2></div>
<div id="category-button"><a style="outline: medium none;" hidefocus="true" href="<?php echo site_url('customer/'); ?>"><img src="<?php echo base_url() ?>/public/img/images/loads-list-bt-45w.png" width="45" height="70" alt="View All Loads"></a></div>
<?php
if (in_array("customer/add", $roles)) {
?>
<div id="category-button"><a style="outline: medium none;" hidefocus="true" href="<?php echo site_url('customer/add'); ?>"><img src="<?php echo base_url() ?>/public/img/images/loads-add-bt-45w.png" width="45" height="70" alt="Add a Load"></a></div>
<?php } ?>
<div id="category-button"></div>
<div id="category-search" class="search-customer"></div>
<div id="category-search" class="search-carrier"></div>
<div id="category-search" class="search-loads"></div>
</div>
<div class="table-responsive">
<table id="list_load" class="table table-hover table-bordered table-striped">
<thead>
<tr style="background-color: #EBEBEB">
<th>#</th>
<th>Name</th>
<th>Phone</th>
<th>Email</th>
<th>Address</th>
<th>City</th>
<th>State</th>
<th>Country</th>
<?php echo in_array('customer/edit', $roles) || in_array('customer/trash', $roles) ? '<th>Actions</th>' : ''; ?>
</tr>
</thead>
<tbody>
<?php
$i = 1;
foreach ($customers as $customer => $row) {
$country = '';
switch ($row['country']) {
case 1:
$country = 'USA';
break;
case 2:
$country = 'Canada';
break;
default:
echo "Your favorite color is neither red, blue, nor green!";
}
echo '<tr id="customer_' . $row['idts_customer'] . '">';
echo '<td>' . $i++ . '</td>';
echo '<td>' . $row['name'] . '</td>';
echo '<td>' . $row['phone'] . '</td>';
echo '<td>' . $row['email'] . '</td>';
echo '<td>' . $row['address'] . '</td>';
echo '<td>' . $row['city'] . '</td>';
echo '<td>' . $row['state'] . '</td>';
echo '<td>' . $country . '</td>';
echo in_array('customer/edit', $roles) || in_array('customer/trash', $roles) ? '<td>' : '';
echo in_array('customer/edit', $roles) ? '<a href="customer/edit/' . $row['idts_customer'] . '">Edit</a>' : '';
echo in_array('customer/trash', $roles) ? ' <a id="' . $row['idts_customer'] . '" class="trash">Trash</a>' : '';
echo in_array('customer/edit', $roles) || in_array('customer/trash', $roles) ? '</td>' : '';
echo '</tr>';
}
?>
</tbody>
</table>
</div>
<!-- Load view dialog -->
<div class="modal fade" id="load_view_dialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel">Load Details</h4>
</div>
<div class="modal-body">
<fieldset>
<!-- Form Name -->
<legend>Load Details</legend>
<div id="load_detail"></div>
</fieldset>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Hidden content -->
<div id="popover_content" style="display: none">
<ul>
<li><a data-id="4" class="editLink" title="Edit this Load" href=""><i class="icon-pencil"></i> Edit</a></li>
<li><a data-id="4" class="editLink" title="Send message to driver" href=""><i class="icon-user"></i> Send Message</a></li>
<li></li>
</ul>
</div>
<style>
.popover-content ul{
margin: 0 0 10px 5px;
}
.popover-content ul li{
list-style: none;
}
</style>
<script>
$(function () {
$('#list_load tbody tr').on('click', function (event) {
$(this).addClass('highlight').siblings().removeClass('highlight');
});
$('body').on('click', '.po', function (evt) {
evt.preventDefault();
var load_id = $(this).data('load_id');
var editHtml = '<ul><li data-load_edit="' + load_id + '">Edit</li></ul>';
// $('#abc').append(editHtml);
var popover = $(this).attr('id');
$('#popover_content ul li a.editLink').attr('href', 'load/update/' + popover)
$(this).popover({
"trigger": "manual",
"html": "true",
"title": 'Load Options # ' + $(this).html() + '<span style="margin-left:15px;" class="pull-right"><a href="#" onclick="$("#' + popover + '").popover("toggle");" class="text-danger popover-close" data-bypass="true" title="Close"><i class="fa fa-close"></i>X</a></span>',
"content": $('#popover_content').html()
// "content":'<ul><li><a data-id="4" title="Edit this Load" href="load/update/'+popover+'"><i class="icon-pencil"></i> Edit</a> </li></ul>'
});
$(this).popover('toggle');
});
$('body').on('click', '.trash', function (evt) {
evt.preventDefault();
var customer = $(this);
var id = customer.attr('id');
var r = confirm("Confirm trashing customer?");
if (r == true) {
$.ajax({
type: "POST",
url: 'customer/change_status/' + id + '/' + 0,
async: true,
dataType: "json",
beforeSend: function () {
$('#result_destination').html('Loading...');
$('#result_destination').show();
},
success: function (data) {
if (data.status == 1) {
$('#customer_' + id).remove();
console.log('customer deleted');
} else {
alert('User could not be trashed. Please contact administrator.');
}
}
});
}
});
});
</script> | mit |
s-takatsu/aspnetboilerplate-samples | PlugInDemo/PlugInDemo.Core/PlugInDemoConsts.cs | 140 | namespace PlugInDemo
{
public class PlugInDemoConsts
{
public const string LocalizationSourceName = "PlugInDemo";
}
} | mit |
KellyChan/python-examples | c/geeksforgeeks/linkedlist/sort_by_freq.c | 1708 | struct BSTNode
{
struct BSTNode * left;
int data;
int freq;
struct BSTNode * right;
};
struct dataFreq
{
int data;
int freq;
};
int compare (const void * a, const void * b)
{
return ((*(const dataFreq*)b).freq - (*(const dataFreq*)a).freq);
}
BSTNode * newNode (int data)
{
struct BSTNode * node = new BSTNode;
node->data = data;
node->left = NULL;
node->right = NULL;
node->freq = 1;
return (node);
}
BSTNode * insert (BSTNode * root, int data)
{
if (root == NULL)
return newNode (data);
if (data == root->data)
root->freq += 1;
else if (data < root->data)
root->left = insert (root->left, data);
else
root->right = insert (root->right, data);
return root;
}
void store (BSTNode * root, dataFreq count[], int *index)
{
if (root == NULL) return;
store (root->left, count, index);
count[(*index)].freq = root->freq;
count[(*index)].data = root->data;
(*index)++;
store(root->right, count, index);
}
void sortByFrequency (int array[], int n)
{
struct BSTNode * root = NULL;
for (int i = 0; i < n; ++i)
root = insert (root, array[i]);
dataFreq count[n];
int index = 0;
store(root, count, &index);
qsort(count, index, sizeof(count[0]), compare);
int j = 0;
for (int i = 0; i < index; ++i)
{
for (int freq = count[i].freq; freq > 0; freq--)
{
array[j++] = count[i].data;
}
}
}
void printArray(int array[], int n)
{
for (int i = 0; i < n; ++i)
std::cout << array[i] << " ";
std::cout << std::endl;
}
int main()
{
int array[] = {2, 3, 2, 4, 5, 12, 2, 3, 3, 3, 12};
int n = sizeof(array)/sizeof(array[0]);
sortByFrequency(array, n);
printArray(array, n);
return 0;
}
| mit |
hoho/dosido | nodejs/deps/v8/src/objects/code-cache-inl.h | 757 | // Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_OBJECTS_CODE_CACHE_INL_H_
#define V8_OBJECTS_CODE_CACHE_INL_H_
#include "src/objects/code-cache.h"
// Has to be the last include (doesn't have include guards):
#include "src/objects/object-macros.h"
namespace v8 {
namespace internal {
CAST_ACCESSOR(CodeCacheHashTable)
Handle<Object> CodeCacheHashTableShape::AsHandle(Isolate* isolate,
HashTableKey* key) {
return key->AsHandle(isolate);
}
} // namespace internal
} // namespace v8
#include "src/objects/object-macros-undef.h"
#endif // V8_OBJECTS_CODE_CACHE_INL_H_
| mit |
Turistforeningen/node-im-metadata | test.js | 4447 | /*jshint laxbreak:true */
var assert = require('assert');
var metadata = require('./index');
describe('metadata.cmd()', function() {
it('returns command without exif data', function() {
var cmd = 'identify -format "name=\nsize=%[size]\nformat=%m\n'
+ 'colorspace=%[colorspace]\nheight=%[height]\nwidth=%[width]\n'
+ 'orientation=%[orientation]\n" /foo/bar/baz';
assert.equal(metadata.cmd('/foo/bar/baz'), cmd);
});
it('returns command with exif data', function() {
var cmd = 'identify -format "name=\nsize=%[size]\nformat=%m\n'
+ 'colorspace=%[colorspace]\nheight=%[height]\nwidth=%[width]\n'
+ 'orientation=%[orientation]\n%[exif:*]" /foo/bar/baz';
assert.equal(metadata.cmd('/foo/bar/baz', {exif: true}), cmd);
});
});
describe('metadata.parse()', function() {
var path = '/foo/bar/baz.jpg';
it('returns object for single value', function() {
assert.deepEqual(metadata.parse(path, 'foo=bar'), {
path: path,
foo: 'bar'
});
});
it('returns object for metadata string', function() {
assert.deepEqual(metadata.parse(path, 'foo=bar\nbar=foo'), {
path: path,
foo: 'bar',
bar: 'foo'
});
});
it('skips empty lines', function() {
assert.deepEqual(metadata.parse(path, 'foo=bar\n\nbar=foo\n\n'), {
path: path,
foo: 'bar',
bar: 'foo'
});
});
it('returns correct size for bogus value', function() {
assert.deepEqual(metadata.parse(path, 'size=4.296MBB'), {
path: path,
size: 4504682
});
});
it('returns size in bytes', function() {
assert.deepEqual(metadata.parse(path, 'size=20MB'), {
path: path,
size: 20 * 1024 * 1024
});
});
it('returns RGB for sRGB colorspace', function() {
assert.deepEqual(metadata.parse(path, 'colorspace=sRGB'), {
path: path,
colorspace: 'RGB'
});
});
it('returns "" for Undefined orientation', function() {
assert.deepEqual(metadata.parse(path, 'orientation=Undefined'), {
path: path,
orientation: ''
});
});
it('returns height and widt for auto-orient', function() {
var meta = 'width=100\nheight=150\norientation=';
var opts = {autoOrient: true};
var orientation = [
'TopLeft', 'TopRight', 'BottomRight', 'BottomLeft',
'LeftTop', 'RightTop', 'RightBottom', 'LeftBottom'
];
for (var i = 0; i < 4; i++) {
assert.deepEqual(metadata.parse(path, meta + orientation[i], opts), {
height: 150,
width: 100,
path: path,
orientation: orientation[i]
});
}
for (var j = 4; j < 8; j++) {
assert.deepEqual(metadata.parse(path, meta + orientation[j], opts), {
height: 100,
width: 150,
path: path,
orientation: orientation[j]
});
}
});
});
describe('metadata()', function() {
it('returns metadata for image', function(done) {
metadata('./assets/image.jpg', { exif: false }, function(err, data) {
assert.ifError(err);
assert.equal(data.path, './assets/image.jpg');
assert.equal(data.name, '');
assert.equal(data.size, 4504682);
assert.equal(data.format, 'JPEG');
assert.equal(data.colorspace, 'RGB');
assert.equal(data.height, 3456);
assert.equal(data.width, 5184);
assert.equal(data.orientation, 'TopLeft');
assert.equal(typeof data.exif, 'undefined');
done();
});
});
it('returns metadata for image with exif data', function(done) {
metadata('./assets/image.jpg', { exif: true }, function(err, data) {
assert.ifError(err);
assert.equal(data.path, './assets/image.jpg');
assert.equal(data.name, '');
assert.equal(data.size, 4504682);
assert.equal(data.format, 'JPEG');
assert.equal(data.colorspace, 'RGB');
assert.equal(data.height, 3456);
assert.equal(data.width, 5184);
assert.equal(data.orientation, 'TopLeft');
assert.equal(typeof data.exif, 'object');
assert.equal(Object.keys(data.exif).length, 36);
assert.equal(data.exif.ApertureValue, '37/8');
done();
});
});
it('returns correct height and width for auto-orient', function(done) {
metadata('./assets/orient.jpg', { autoOrient: true }, function(err, data) {
assert.ifError(err);
assert.equal(data.height, 3264);
assert.equal(data.width, 2448);
done();
});
});
});
| mit |
squatteur/economizzer | views/dashboard/overview.php | 7769 | <?php
use miloschuman\highcharts\Highcharts;
use yii\web\JsExpression;
use yii\data\SqlDataProvider;
use yii\grid\GridView;
use app\models\Cashbook;
$this->title = 'Economizzer';
$this->title = Yii::t('app', 'Overview');
?>
<div class="dashboard-index">
<div class="row">
<div class="col-md-6"><?php echo $this->render('_menu'); ?></div>
<div class="col-md-6"></div>
</div>
<hr/>
<div class="row">
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading"><strong><?php echo Yii::t('app', 'Performance');?></strong></div>
<div class="panel-body" style="height: 250px;">
<?php
/* testing get currency by locale */
//$sum = 4362;
//echo Yii::$app->formatter->asCurrency(str_replace(',', '', $sum));
$balance = ((round((int)$currentmonth_revenue)-abs(round((int)$currentmonth_expense))) >=0 ? (round((int)$currentmonth_revenue)-abs(round((int)$currentmonth_expense))) : 0);
echo Highcharts::widget([
'options' => [
'credits' => ['enabled' => false],
'chart'=> ['height'=> 200,],
'title' => [
'text' => Yii::t('app', 'Expense'),
'align' => 'center',
'verticalAlign' => 'middle',
'style' => [
'fontSize'=> '12px',
'color' => '#e74c3c',
]
],
'colors'=> ['#18bc9c','#e74c3c'],
'tooltip'=> ['pointFormat'=> Yii::t('app', 'Percentage').': <b>{point.percentage:.1f}%</b>'],
'plotOptions'=> [
'pie'=> [
'allowPointSelect'=> true,
'cursor'=> 'pointer',
'size'=> '100%',
'innerSize'=> '60%',
'dataLabels'=> ['enabled'=> false,],
'center'=> ['50%', '55%'],
]
],
'series'=> [[
'type'=> 'pie',
'name'=> 'Valor',
'data'=> [
[Yii::t('app', 'Balance'), 'y'=> $balance],
[Yii::t('app', 'Expense'), 'y'=> abs(round((int)$currentmonth_expense)), ['sliced'=> true]],
]
]]
]
]);
?>
</div></div></div>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading"><strong><?php echo Yii::t('app', 'Evolution');?></strong></div>
<div class="panel-body" style="height: 250px;">
<?php
if(round((int)($currentmonth_revenue+($previousmonth_revenue - abs((int)$previousmonth_expense)))) >= abs(round((int)$currentmonth_expense)))
{
$overbalance = "<div>". Yii::t('app', 'Monthly balance'). "<h3 class=\"label label-success pull-right\">".Yii::t('app', 'Positive')."</h3></div>";
}else{
$overbalance = "<div>". Yii::t('app', 'Monthly balance'). "<span class=\"label label-danger pull-right\">".Yii::t('app', 'Negative')."</span></div>";
}
echo $overbalance;
?>
<table class="table table-bordered text-center">
<thead>
<tr>
<th class="text-center"><i class="fa fa-line-chart"></i></th>
<th class="text-center"><?php echo Yii::t('app', 'Previous Month');?></th>
<th class="text-center"><?php echo Yii::t('app', 'Current Month');?></th>
</tr>
</thead>
<tbody>
<tr class="text-success">
<td><?php echo Yii::t('app', 'Revenue');?></td>
<td><?php echo Yii::t('app', '$')." ".number_format((float)$previousmonth_revenue,2);?></td>
<td><?php echo Yii::t('app', '$')." ".number_format((float)($currentmonth_revenue+($previousmonth_revenue - abs((float)$previousmonth_expense))),2);?></td>
</tr>
<tr class="text-danger">
<td><?php echo Yii::t('app', 'Expense');?></td>
<td><?php echo Yii::t('app', '$')." ".number_format(abs((float)$previousmonth_expense),2);?></td>
<td><?php echo Yii::t('app', '$')." ".number_format(abs((float)$currentmonth_expense),2);?></td>
</tr>
<tr class="text-primary">
<td><?php echo Yii::t('app', 'Balance');?></td>
<td><?php echo Yii::t('app', '$')." ".number_format(((float)$previousmonth_revenue - abs((float)$previousmonth_expense)),2);?></td>
<td><?php echo Yii::t('app', '$')." ".number_format(((float)$currentmonth_revenue+($previousmonth_revenue - abs((float)$previousmonth_expense)) - abs((float)$currentmonth_expense)),2);?></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading"><strong><?php echo Yii::t('app', 'Expenses by Category');?></strong></div>
<div class="panel-body">
<?php
echo Highcharts::widget([
'options' => [
'credits' => ['enabled' => false],
'title' => [
'text' => '',
],
'xAxis' => [
'categories' => $cat,
],
'yAxis' => [
'min' => 0,
'title' => '',
],
'series' => [
[
'type' => 'bar',
'colorByPoint'=> true,
'name' => Yii::t('app', 'Category'),
'data' => $value,
'colors' => $color,
],
],
]
]);
?>
</div>
</div>
</div>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading"><strong><?php echo Yii::t('app', 'Expenses by Segment');?></strong></div>
<div class="panel-body">
<?php
echo Highcharts::widget([
'options' => [
'credits' => ['enabled' => false],
'title' => [
'text' => '',
],
'xAxis' => [
'categories' => $seg,
],
'yAxis' => [
'min' => 0,
'title' => '',
],
'series' => [
[
'type' => 'column',
'colorByPoint'=> true,
'name' => Yii::t('app', 'Segment'),
'data' => $total,
'colors' => $colorseg,
],
],
]
]);
?>
</div>
</div>
</div>
</div>
</div>
| mit |
jadarnel27/nunit | src/NUnitFramework/tests/Syntax/ArbitraryConstraintMatching.cs | 4211 | // ***********************************************************************
// Copyright (c) 2009 Charlie Poole, Rob Prouse
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// ***********************************************************************
using System;
using System.Collections.Generic;
using NUnit.Framework.Constraints;
namespace NUnit.Framework.Syntax
{
[TestFixture]
public class ArbitraryConstraintMatching
{
Constraint custom = new CustomConstraint();
Constraint another = new AnotherConstraint();
[Test]
public void CanMatchCustomConstraint()
{
IResolveConstraint constraint = new ConstraintExpression().Matches(custom);
Assert.That(constraint.Resolve().ToString(), Is.EqualTo("<custom>"));
}
[Test]
public void CanMatchCustomConstraintAfterPrefix()
{
IResolveConstraint constraint = Is.All.Matches(custom);
Assert.That(constraint.Resolve().ToString(), Is.EqualTo("<all <custom>>"));
}
[Test]
public void CanMatchCustomConstraintsUnderAndOperator()
{
IResolveConstraint constraint = Is.All.Matches(custom).And.Matches(another);
Assert.That(constraint.Resolve().ToString(), Is.EqualTo("<all <and <custom> <another>>>"));
}
[Test]
public void CanMatchPredicate()
{
IResolveConstraint constraint = new ConstraintExpression().Matches(new Predicate<int>(IsEven));
Assert.That(constraint.Resolve().ToString(), Is.EqualTo("<predicate>"));
Assert.That(42, constraint);
}
bool IsEven(int num)
{
return (num & 1) == 0;
}
[Test]
public void CanMatchLambda()
{
IResolveConstraint constraint = new ConstraintExpression().Matches<int>( (x) => (x & 1) == 0);
Assert.That(constraint.Resolve().ToString(), Is.EqualTo("<predicate>"));
Assert.That(42, constraint);
}
class CustomConstraint : Constraint
{
public override ConstraintResult ApplyTo<TActual>(TActual actual)
{
throw new NotImplementedException();
}
}
class AnotherConstraint : CustomConstraint
{
}
[Test]
public void ApplyMatchesToProperty()
{
var unit = new Unit();
// All forms should pass
Assert.That(unit, Has.Property("Items").With.Property("Count").EqualTo(5));
Assert.That(unit, Has.Property("Items").With.Count.EqualTo(5));
Assert.That(unit, Has.Property("Items").Property("Count").EqualTo(5));
Assert.That(unit, Has.Property("Items").Count.EqualTo(5));
// This is the one the bug refers to
Assert.That(unit, Has.Property("Items").Matches(Has.Count.EqualTo(5)));
}
private class Unit
{
public List<int> Items { get; private set; }
public Unit()
{
Items = new List<int>(new int[] { 1, 2, 3, 4, 5 });
}
}
}
}
| mit |
brev/nupic.tools | test/github_payloads/status_nupic_pending.js | 10928 | module.exports = {
"sha": "6d1fd68d5d273f6c46113f5843731131ad226d64",
"name": "numenta/experiments",
"target_url": "https://travis-ci.org/numenta/experiments",
"description": "NuPIC Status: Travis CI build has not started.",
"state": "pending",
"branches": [],
"commit": {
"sha": "6d1fd68d5d273f6c46113f5843731131ad226d64",
"commit": {
"author": {
"name": "Matthew Taylor",
"email": "[email protected]",
"date": "2014-03-25T04:38:48Z"
},
"committer": {
"name": "Matthew Taylor",
"email": "[email protected]",
"date": "2014-03-25T04:38:48Z"
},
"message": "Update README.md",
"tree": {
"sha": "067e3d6dd8e046735031285b633fe7c20c4b2b27",
"url": "https://api.github.com/repos/numenta/experiments/git/trees/067e3d6dd8e046735031285b633fe7c20c4b2b27"
},
"url": "https://api.github.com/repos/numenta/experiments/git/commits/6d1fd68d5d273f6c46113f5843731131ad226d64",
"comment_count": 0
},
"url": "https://api.github.com/repos/numenta/experiments/commits/6d1fd68d5d273f6c46113f5843731131ad226d64",
"html_url": "https://github.com/numenta/experiments/commit/6d1fd68d5d273f6c46113f5843731131ad226d64",
"comments_url": "https://api.github.com/repos/numenta/experiments/commits/6d1fd68d5d273f6c46113f5843731131ad226d64/comments",
"author": {
"login": "rhyolight",
"id": 15566,
"avatar_url": "https://avatars.githubusercontent.com/u/15566?",
"gravatar_id": "92b95d73c678f23c6060e63bff3dbcbd",
"url": "https://api.github.com/users/rhyolight",
"html_url": "https://github.com/rhyolight",
"followers_url": "https://api.github.com/users/rhyolight/followers",
"following_url": "https://api.github.com/users/rhyolight/following{/other_user}",
"gists_url": "https://api.github.com/users/rhyolight/gists{/gist_id}",
"starred_url": "https://api.github.com/users/rhyolight/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rhyolight/subscriptions",
"organizations_url": "https://api.github.com/users/rhyolight/orgs",
"repos_url": "https://api.github.com/users/rhyolight/repos",
"events_url": "https://api.github.com/users/rhyolight/events{/privacy}",
"received_events_url": "https://api.github.com/users/rhyolight/received_events",
"type": "User",
"site_admin": false
},
"committer": {
"login": "rhyolight",
"id": 15566,
"avatar_url": "https://avatars.githubusercontent.com/u/15566?",
"gravatar_id": "92b95d73c678f23c6060e63bff3dbcbd",
"url": "https://api.github.com/users/rhyolight",
"html_url": "https://github.com/rhyolight",
"followers_url": "https://api.github.com/users/rhyolight/followers",
"following_url": "https://api.github.com/users/rhyolight/following{/other_user}",
"gists_url": "https://api.github.com/users/rhyolight/gists{/gist_id}",
"starred_url": "https://api.github.com/users/rhyolight/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rhyolight/subscriptions",
"organizations_url": "https://api.github.com/users/rhyolight/orgs",
"repos_url": "https://api.github.com/users/rhyolight/repos",
"events_url": "https://api.github.com/users/rhyolight/events{/privacy}",
"received_events_url": "https://api.github.com/users/rhyolight/received_events",
"type": "User",
"site_admin": false
},
"parents": [{
"sha": "9594d18d57ca80cdb66aacce2475eebca61c1593",
"url": "https://api.github.com/repos/numenta/experiments/commits/9594d18d57ca80cdb66aacce2475eebca61c1593",
"html_url": "https://github.com/numenta/experiments/commit/9594d18d57ca80cdb66aacce2475eebca61c1593"
}]
},
"repository": {
"id": 10708772,
"name": "experiments",
"full_name": "numenta/experiments",
"owner": {
"login": "numenta",
"id": 1039191,
"avatar_url": "https://avatars.githubusercontent.com/u/1039191?",
"gravatar_id": "faac04630eba5ec1aeda8bcbca3ff018",
"url": "https://api.github.com/users/numenta",
"html_url": "https://github.com/numenta",
"followers_url": "https://api.github.com/users/numenta/followers",
"following_url": "https://api.github.com/users/numenta/following{/other_user}",
"gists_url": "https://api.github.com/users/numenta/gists{/gist_id}",
"starred_url": "https://api.github.com/users/numenta/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/numenta/subscriptions",
"organizations_url": "https://api.github.com/users/numenta/orgs",
"repos_url": "https://api.github.com/users/numenta/repos",
"events_url": "https://api.github.com/users/numenta/events{/privacy}",
"received_events_url": "https://api.github.com/users/numenta/received_events",
"type": "Organization",
"site_admin": false
},
"private": false,
"html_url": "https://github.com/numenta/experiments",
"description": "A junk repo for experimenting with git flows and toolins",
"fork": false,
"url": "https://api.github.com/repos/numenta/experiments",
"forks_url": "https://api.github.com/repos/numenta/experiments/forks",
"keys_url": "https://api.github.com/repos/numenta/experiments/keys{/key_id}",
"collaborators_url": "https://api.github.com/repos/numenta/experiments/collaborators{/collaborator}",
"teams_url": "https://api.github.com/repos/numenta/experiments/teams",
"hooks_url": "https://api.github.com/repos/numenta/experiments/hooks",
"issue_events_url": "https://api.github.com/repos/numenta/experiments/issues/events{/number}",
"events_url": "https://api.github.com/repos/numenta/experiments/events",
"assignees_url": "https://api.github.com/repos/numenta/experiments/assignees{/user}",
"branches_url": "https://api.github.com/repos/numenta/experiments/branches{/branch}",
"tags_url": "https://api.github.com/repos/numenta/experiments/tags",
"blobs_url": "https://api.github.com/repos/numenta/experiments/git/blobs{/sha}",
"git_tags_url": "https://api.github.com/repos/numenta/experiments/git/tags{/sha}",
"git_refs_url": "https://api.github.com/repos/numenta/experiments/git/refs{/sha}",
"trees_url": "https://api.github.com/repos/numenta/experiments/git/trees{/sha}",
"statuses_url": "https://api.github.com/repos/numenta/experiments/statuses/{sha}",
"languages_url": "https://api.github.com/repos/numenta/experiments/languages",
"stargazers_url": "https://api.github.com/repos/numenta/experiments/stargazers",
"contributors_url": "https://api.github.com/repos/numenta/experiments/contributors",
"subscribers_url": "https://api.github.com/repos/numenta/experiments/subscribers",
"subscription_url": "https://api.github.com/repos/numenta/experiments/subscription",
"commits_url": "https://api.github.com/repos/numenta/experiments/commits{/sha}",
"git_commits_url": "https://api.github.com/repos/numenta/experiments/git/commits{/sha}",
"comments_url": "https://api.github.com/repos/numenta/experiments/comments{/number}",
"issue_comment_url": "https://api.github.com/repos/numenta/experiments/issues/comments/{number}",
"contents_url": "https://api.github.com/repos/numenta/experiments/contents/{+path}",
"compare_url": "https://api.github.com/repos/numenta/experiments/compare/{base}...{head}",
"merges_url": "https://api.github.com/repos/numenta/experiments/merges",
"archive_url": "https://api.github.com/repos/numenta/experiments/{archive_format}{/ref}",
"downloads_url": "https://api.github.com/repos/numenta/experiments/downloads",
"issues_url": "https://api.github.com/repos/numenta/experiments/issues{/number}",
"pulls_url": "https://api.github.com/repos/numenta/experiments/pulls{/number}",
"milestones_url": "https://api.github.com/repos/numenta/experiments/milestones{/number}",
"notifications_url": "https://api.github.com/repos/numenta/experiments/notifications{?since,all,participating}",
"labels_url": "https://api.github.com/repos/numenta/experiments/labels{/name}",
"releases_url": "https://api.github.com/repos/numenta/experiments/releases{/id}",
"created_at": "2013-06-15T16:23:06Z",
"updated_at": "2014-03-25T04:30:09Z",
"pushed_at": "2014-03-25T04:30:07Z",
"git_url": "git://github.com/numenta/experiments.git",
"ssh_url": "[email protected]:numenta/experiments.git",
"clone_url": "https://github.com/numenta/experiments.git",
"svn_url": "https://github.com/numenta/experiments",
"homepage": null,
"size": 344,
"stargazers_count": 2,
"watchers_count": 2,
"language": null,
"has_issues": true,
"has_downloads": true,
"has_wiki": true,
"forks_count": 4,
"mirror_url": null,
"open_issues_count": 7,
"forks": 4,
"open_issues": 7,
"watchers": 2,
"default_branch": "master",
"master_branch": "master"
},
"sender": {
"login": "numenta-ci",
"id": 4650657,
"avatar_url": "https://avatars.githubusercontent.com/u/4650657?",
"gravatar_id": "00d730d6342f80cdad84a37a176d0c49",
"url": "https://api.github.com/users/numenta-ci",
"html_url": "https://github.com/numenta-ci",
"followers_url": "https://api.github.com/users/numenta-ci/followers",
"following_url": "https://api.github.com/users/numenta-ci/following{/other_user}",
"gists_url": "https://api.github.com/users/numenta-ci/gists{/gist_id}",
"starred_url": "https://api.github.com/users/numenta-ci/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/numenta-ci/subscriptions",
"organizations_url": "https://api.github.com/users/numenta-ci/orgs",
"repos_url": "https://api.github.com/users/numenta-ci/repos",
"events_url": "https://api.github.com/users/numenta-ci/events{/privacy}",
"received_events_url": "https://api.github.com/users/numenta-ci/received_events",
"type": "User",
"site_admin": false
}
}; | mit |
phalcon/zephir | tests/Extension/DynamicPropTest.php | 1941 | <?php
declare(strict_types=1);
/**
* This file is part of the Zephir.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Extension;
use PHPUnit\Framework\TestCase;
use Stub\Oo\DynamicProp;
final class DynamicPropTest extends TestCase
{
public function testSetProperty(): void
{
$class = new DynamicProp();
$this->assertNull($class->test);
$class->setPropertyInt('test');
$this->assertSame(10, $class->test);
$class->setPropertyBoolTrue('test');
$this->assertTrue($class->test);
$class->setPropertyBoolFalse('test');
$this->assertFalse($class->test);
$class->setPropertyString('test');
$this->assertSame('string', $class->test);
$class->setPropertyChar('test');
$this->assertSame(\ord('A'), $class->test);
$class->setPropertyUChar('test');
$this->assertSame(\ord('B') - 1, $class->test);
$class->setPropertyNull('test');
$this->assertNull($class->test);
$class->setPropertyVariableInt('test');
$this->assertSame(10, $class->test);
$class->setPropertyVariableString('test');
$this->assertSame('test', $class->test);
$class->setPropertyVariableBoolTrue('test');
$this->assertTrue($class->test);
$class->setPropertyVariableBoolFalse('test');
$this->assertFalse($class->test);
$class->setPropertyInt('property');
$this->assertSame(10, $class->property);
$class->setExistingStringProperty();
$this->assertSame('works', $class->test);
$class->setExistingStringPropertyString('test');
$this->assertSame('test', $class->eproperty);
$class->setNonExistingStringProperty();
$this->assertSame('works', $class->property);
}
}
| mit |
PrJared/sabbath-school-lessons | src/cs/2018-03/08/04.md | 3184 | ---
title: Rozprava
date: 21/08/2018
---
> <p></p>
> 19Proto já soudím, abychom nedělali potíže pohanům, kteří se obracejí k Bohu, 20ale jen jim napsali, aby se vyhýbali všemu, co přišlo do styku s pohanskou bohoslužbou, aby nežili ve smilstvu, aby nejedli maso zvířat, která nebyla zbavena krve, a aby nepožívali krev. 21Vždyť Mojžíš má odedávna po městech své kazatele, kteří čtou jeho Zákon v synagógách každou sobotu.“ (Sk 15,19–21)
**Osobní studium**
`Přečti si text Skutky 15,7–11. Jaké argumenty předložil Petr při diskuzi v Jeruzalémě?`
Lukáš samozřejmě nezaznamenává celý průběh setkání. Bylo by zajímavé znát argumenty pro výroky judaizátorů (Sk 15,5) nebo celou odpověď Pavla a Barnabáše (Sk 15,12). Skutečnost, že máme k dispozici Petrovu a Jakubovu řeč, ukazuje mimo jiné na důležitost těchto dvou mužů mezi apoštoly.
Petr ve své řeči promluvil ke shromážděným apoštolům a starším. Připomněl jim svou zkušenost s Kornéliem, která se odehrála před několika lety. Jeho argumenty jsou v podstatě stejné jako při jeho tehdejší obhajobě před bratry v Jeruzalémě (Sk 11,4–17). A přestože byl Kornélius neobřezaným pohanem, samotný Bůh ukázal svůj souhlas s jeho obrácením tím, že jemu i celému jeho domu dal stejný dar Ducha, jaký přijali apoštolové o Letnicích.
Ve své prozřetelnosti Bůh nepoužil nikoho menšího než Petra, aby přesvědčil judské věřící, že v otázce spasení nedělá mezi Židy a pohany žádný rozdíl. A přestože věřící pohané neměli ze starozákonních pravidel a nařízení očišťující užitek, tak tito křesťané nemohli být v žádném případě považováni za nečisté, protože samotný Bůh očistil jejich srdce. Petrovo závěrečné vyjádření je stejné, jaké by použil i Pavel:
„Věříme přece, že jsme stejně jako oni spaseni milostí Pána Ježíše.“ (Sk 15,11)
`Přečti si text Sk 15,13–21. Vlastními slovy shrň návrh řešení, který přednesl Jakub. Co ho podle tebe k takové formulaci vedlo?`
Zdá se, že Jakub měl mezi apoštoly určitou autoritu (porovnej s texty Sk 12,17; 21,18; Ga 2,9.12). Bez ohledu na to, co Jakub chápal pod znovu vybudováním Davidova domu (citát Am 9,11.12, kde se hovoří o obnově Davidova království), jeho hlavním cílem bylo poukázat na to, že Bůh už daroval pohanům vstup do zreorganizovaného či nově zřízeného „Božího lidu“, a tak se mohou stát součástí Izraele.
Z toho vyplýval i Jakubův návrh, aby po křesťanech z pohanů nebyla vyžadována žádná další omezení nebo požadavky kromě těch, jež byly běžné u cizinců, kteří si přáli žít na území Izraele.
**Aplikace**
`Přestože otázka požadavků kladených na křesťany z pohanů byla výbušným tématem a Lukáš opakovaně připomíná, že se o této otázce hodně a vášnivě diskutovalo (Sk 15,2.7), nakonec se věřící shodli na přijatelném řešení, se kterým se mohli ztotožnit. Co můžeš udělat ty, aby se i vaše společenství shodlo na důležitých otázkách?` | mit |
SergKam/uade | client/lib/angular/docs/partials/api/ng/directive/ngSrc.html | 2326 | <a href='https://github.com/angular/angular.js/edit/v1.5.x/src/ng/directive/attrs.js?message=docs(ngSrc)%3A%20describe%20your%20change...#L102' class='improve-docs btn btn-primary'><i class="glyphicon glyphicon-edit"> </i>Improve this Doc</a>
<a href='https://github.com/angular/angular.js/tree/v1.5.0-rc.1/src/ng/directive/attrs.js#L102' class='view-source pull-right btn btn-primary'>
<i class="glyphicon glyphicon-zoom-in"> </i>View Source
</a>
<header class="api-profile-header">
<h1 class="api-profile-header-heading">ngSrc</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- directive in module <a href="api/ng">ng</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<p>Using Angular markup like <code>{{hash}}</code> in a <code>src</code> attribute doesn't
work right: The browser will fetch from the URL with the literal
text <code>{{hash}}</code> until Angular replaces the expression inside
<code>{{hash}}</code>. The <code>ngSrc</code> directive solves this problem.</p>
<p>The buggy way to write it:</p>
<pre><code class="lang-html"><img src="http://www.gravatar.com/avatar/{{hash}}" alt="Description"/>
</code></pre>
<p>The correct way to write it:</p>
<pre><code class="lang-html"><img ng-src="http://www.gravatar.com/avatar/{{hash}}" alt="Description" />
</code></pre>
</div>
<div>
<h2>Directive Info</h2>
<ul>
<li>This directive executes at priority level 99.</li>
</ul>
<h2 id="usage">Usage</h2>
<div class="usage">
<ul>
<li>as attribute:
<pre><code><IMG ng-src="template"> ... </IMG></code></pre>
</li>
</div>
<section class="api-section">
<h3>Arguments</h3>
<table class="variables-matrix input-arguments">
<thead>
<tr>
<th>Param</th>
<th>Type</th>
<th>Details</th>
</tr>
</thead>
<tbody>
<tr>
<td>
ngSrc
</td>
<td>
<a href="" class="label type-hint type-hint-template">template</a>
</td>
<td>
<p>any string which can contain <code>{{}}</code> markup.</p>
</td>
</tr>
</tbody>
</table>
</section>
</div>
| mit |
syeerzy/visualfsharp | vsintegration/src/FSharp.ProjectSystem.Base/Project/ConfigProvider.cs | 39397 | // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
using Microsoft.VisualStudio.Shell.Interop;
using System;
using System.Runtime.InteropServices;
using Microsoft.VisualStudio.OLE.Interop;
using Microsoft.VisualStudio.Shell;
using System.Diagnostics;
using System.Globalization;
using System.Collections;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using EnvDTE;
using System.Diagnostics.CodeAnalysis;
/* This file provides a basefunctionallity for IVsCfgProvider2.
Instead of using the IVsProjectCfgEventsHelper object we have our own little sink and call our own helper methods
similiar to the interface. But there is no real benefit in inheriting from the interface in the first place.
Using the helper object seems to be:
a) undocumented
b) not really wise in the managed world
*/
namespace Microsoft.VisualStudio.FSharp.ProjectSystem
{
[CLSCompliant(false)]
[ComVisible(true)]
public class ConfigProvider : IVsCfgProvider2, IVsProjectCfgProvider, IVsExtensibleObject
{
private ProjectNode project;
private EventSinkCollection cfgEventSinks = new EventSinkCollection();
private List<KeyValuePair<KeyValuePair<string, string>, string>> newCfgProps = new List<KeyValuePair<KeyValuePair<string, string>, string>>();
private Dictionary<ConfigCanonicalName, ProjectConfig> configurationsList = new Dictionary<ConfigCanonicalName, ProjectConfig>();
/// <summary>
/// The associated project.
/// </summary>
public ProjectNode ProjectMgr
{
get
{
return this.project;
}
}
/// <summary>
/// If the project system wants to add custom properties to the property group then
/// they provide us with this data.
/// Returns/sets the [(<propName, propCondition>) <propValue>] collection
/// </summary>
public virtual List<KeyValuePair<KeyValuePair<string, string>, string>> NewConfigProperties
{
get
{
return newCfgProps;
}
set
{
newCfgProps = value;
}
}
internal ConfigProvider(ProjectNode manager)
{
this.project = manager;
}
/// <summary>
/// Creates new Project Configuartion objects based on the configuration name.
/// </summary>
/// <param name="canonicalName">The name of the configuration</param>
/// <returns>An instance of a ProjectConfig object.</returns>
internal ProjectConfig GetProjectConfiguration(ConfigCanonicalName canonicalName)
{
// if we already created it, return the cached one
if (configurationsList.ContainsKey(canonicalName))
{
return configurationsList[canonicalName];
}
ProjectConfig requestedConfiguration = CreateProjectConfiguration(canonicalName);
configurationsList.Add(canonicalName, requestedConfiguration);
return requestedConfiguration;
}
internal virtual ProjectConfig CreateProjectConfiguration(ConfigCanonicalName canonicalName)
{
return new ProjectConfig(this.project, canonicalName);
}
/// <summary>
/// Provides access to the IVsProjectCfg interface implemented on a project's configuration object.
/// </summary>
/// <param name="projectCfgCanonicalName">The canonical name of the configuration to access.</param>
/// <param name="projectCfg">The IVsProjectCfg interface of the configuration identified by szProjectCfgCanonicalName.</param>
/// <returns>If the method succeeds, it returns S_OK. If it fails, it returns an error code. </returns>
public virtual int OpenProjectCfg(string projectCfgCanonicalName, out IVsProjectCfg projectCfg)
{
if (projectCfgCanonicalName == null)
{
throw new ArgumentNullException("projectCfgCanonicalName");
}
projectCfg = null;
// Be robust in release
if (projectCfgCanonicalName == null)
{
return VSConstants.E_INVALIDARG;
}
Debug.Assert(this.project != null && this.project.BuildProject != null);
string[] configs = GetPropertiesConditionedOn(ProjectFileConstants.Configuration);
string[] platforms = GetPropertiesConditionedOn(ProjectFileConstants.Platform);
var configCanonicalName = new ConfigCanonicalName(projectCfgCanonicalName);
foreach (string config in configs)
{
foreach (string platform in platforms)
{
if (configCanonicalName == new ConfigCanonicalName(config, platform))
{
projectCfg = this.GetProjectConfiguration(configCanonicalName);
if (projectCfg != null)
{
return VSConstants.S_OK;
}
else
{
return VSConstants.E_FAIL;
}
}
}
}
return VSConstants.E_INVALIDARG;
}
/// <summary>
/// Checks whether or not this configuration provider uses independent configurations.
/// </summary>
/// <param name="usesIndependentConfigurations">true if independent configurations are used, false if they are not used. By default returns true.</param>
/// <returns>If the method succeeds, it returns S_OK. If it fails, it returns an error code.</returns>
public virtual int get_UsesIndependentConfigurations(out int usesIndependentConfigurations)
{
usesIndependentConfigurations = 1;
return VSConstants.S_OK;
}
/// <summary>
/// Copies an existing configuration name or creates a new one.
/// </summary>
/// <param name="name">The name of the new configuration.</param>
/// <param name="cloneName">the name of the configuration to copy, or a null reference, indicating that AddCfgsOfCfgName should create a new configuration.</param>
/// <param name="fPrivate">Flag indicating whether or not the new configuration is private. If fPrivate is set to true, the configuration is private. If set to false, the configuration is public. This flag can be ignored.</param>
/// <returns>If the method succeeds, it returns S_OK. If it fails, it returns an error code. </returns>
public virtual int AddCfgsOfCfgName(string name, string cloneName, int fPrivate)
{
// We need to QE/QS the project file
if (!this.ProjectMgr.QueryEditProjectFile(false))
{
throw Marshal.GetExceptionForHR(VSConstants.OLE_E_PROMPTSAVECANCELLED);
}
// Get all configs
this.project.BuildProject.ReevaluateIfNecessary();
List<Microsoft.Build.Construction.ProjectPropertyGroupElement> configGroup = new List<Microsoft.Build.Construction.ProjectPropertyGroupElement>(this.project.BuildProject.Xml.PropertyGroups);
// platform -> property group
var configToClone = new Dictionary<string,Microsoft.Build.Construction.ProjectPropertyGroupElement>(StringComparer.Ordinal);
if (cloneName != null)
{
// Find the configuration to clone
foreach (var currentConfig in configGroup)
{
// Only care about conditional property groups
if (currentConfig.Condition == null || currentConfig.Condition.Length == 0)
continue;
var configCanonicalName = ConfigCanonicalName.OfCondition(currentConfig.Condition);
// Skip if it isn't the group we want
if (String.Compare(configCanonicalName.ConfigName, cloneName, StringComparison.OrdinalIgnoreCase) != 0)
continue;
if (!configToClone.ContainsKey(configCanonicalName.Platform))
configToClone.Add(configCanonicalName.Platform, currentConfig);
}
}
var platforms = GetPlatformsFromProject();
if (platforms.Length == 0) platforms = new[] { String.Empty };
foreach (var platform in platforms)
{
// If we have any property groups to clone, and we do not have sourec for this platform, skip
if (configToClone.Count > 0 && !configToClone.ContainsKey(platform)) continue;
var newCanonicalName = new ConfigCanonicalName(name, platform);
Microsoft.Build.Construction.ProjectPropertyGroupElement newConfig = null;
if (configToClone.ContainsKey(platform))
{
// Clone the configuration settings
newConfig = this.project.ClonePropertyGroup(configToClone[platform]);
//Will be added later with the new values to the path
foreach (Microsoft.Build.Construction.ProjectPropertyElement property in newConfig.Properties)
{
if (property.Name.Equals("OutputPath", StringComparison.OrdinalIgnoreCase))
{
property.Parent.RemoveChild(property);
}
}
}
else
{
// no source to clone from, lets just create a new empty config
PopulateEmptyConfig(ref newConfig);
if (!String.IsNullOrEmpty(newCanonicalName.MSBuildPlatform))
newConfig.AddProperty(ProjectFileConstants.PlatformTarget, newCanonicalName.PlatformTarget);
}
//add the output path
this.AddOutputPath(newConfig, name);
// Set the condition that will define the new configuration
string newCondition = newCanonicalName.ToMSBuildCondition();
newConfig.Condition = newCondition;
}
NotifyOnCfgNameAdded(name);
return VSConstants.S_OK;
}
private void PopulateEmptyConfig(ref Microsoft.Build.Construction.ProjectPropertyGroupElement newConfig)
{
newConfig = this.project.BuildProject.Xml.AddPropertyGroup();
// Get the list of property name, condition value from the config provider
IList<KeyValuePair<KeyValuePair<string, string>, string>> propVals = this.NewConfigProperties;
foreach (KeyValuePair<KeyValuePair<string, string>, string> data in propVals)
{
KeyValuePair<string, string> propData = data.Key;
string value = data.Value;
Microsoft.Build.Construction.ProjectPropertyElement newProperty = newConfig.AddProperty(propData.Key, value);
if (!String.IsNullOrEmpty(propData.Value))
newProperty.Condition = propData.Value;
}
}
private void AddOutputPath(Microsoft.Build.Construction.ProjectPropertyGroupElement newConfig, string configName)
{
//add the output path
string outputBasePath = this.ProjectMgr.OutputBaseRelativePath;
if (outputBasePath.EndsWith(Path.DirectorySeparatorChar.ToString(), StringComparison.Ordinal))
outputBasePath = Path.GetDirectoryName(outputBasePath);
newConfig.AddProperty("OutputPath", Path.Combine(outputBasePath, configName) + Path.DirectorySeparatorChar.ToString());
}
/// <summary>
/// Copies an existing platform name or creates a new one.
/// </summary>
/// <param name="platformName">The name of the new platform.</param>
/// <param name="clonePlatformName">The name of the platform to copy, or a null reference, indicating that AddCfgsOfPlatformName should create a new platform.</param>
/// <returns>If the method succeeds, it returns S_OK. If it fails, it returns an error code.</returns>
public virtual int AddCfgsOfPlatformName(string platformName, string clonePlatformName)
{
// We need to QE/QS the project file
if (!this.ProjectMgr.QueryEditProjectFile(false))
{
throw Marshal.GetExceptionForHR(VSConstants.OLE_E_PROMPTSAVECANCELLED);
}
// Get all configs
this.project.BuildProject.ReevaluateIfNecessary();
List<Microsoft.Build.Construction.ProjectPropertyGroupElement> configGroup = new List<Microsoft.Build.Construction.ProjectPropertyGroupElement>(this.project.BuildProject.Xml.PropertyGroups);
// configName -> property group
var configToClone = new Dictionary<string, Microsoft.Build.Construction.ProjectPropertyGroupElement>(StringComparer.Ordinal);
if (clonePlatformName != null)
{
// Find the configuration to clone
foreach (var currentConfig in configGroup)
{
// Only care about conditional property groups
if (currentConfig.Condition == null || currentConfig.Condition.Length == 0)
continue;
var configCanonicalName = ConfigCanonicalName.OfCondition(currentConfig.Condition);
// Skip if it isn't the group we want
if (!configCanonicalName.MatchesPlatform(clonePlatformName))
continue;
if (!configToClone.ContainsKey(configCanonicalName.ConfigName))
configToClone.Add(configCanonicalName.ConfigName, currentConfig);
}
}
var configNames = GetPropertiesConditionedOn(ProjectFileConstants.Configuration);
if (configNames.Length == 0) return VSConstants.E_FAIL;
foreach (var configName in configNames)
{
// If we have any property groups to clone, and we do not have sourec for this config, skip
if (configToClone.Count > 0 && !configToClone.ContainsKey(configName)) continue;
var newCanonicalName = new ConfigCanonicalName(configName, platformName);
Microsoft.Build.Construction.ProjectPropertyGroupElement newConfig = null;
if (configToClone.ContainsKey(configName))
{
// Clone the configuration settings
newConfig = this.project.ClonePropertyGroup(configToClone[configName]);
foreach (Microsoft.Build.Construction.ProjectPropertyElement property in newConfig.Properties)
{
if (property.Name.Equals(ProjectFileConstants.PlatformTarget, StringComparison.OrdinalIgnoreCase))
{
property.Parent.RemoveChild(property);
}
}
}
else
{
// no source to clone from, lets just create a new empty config
PopulateEmptyConfig(ref newConfig);
this.AddOutputPath(newConfig, configName);
}
newConfig.AddProperty(ProjectFileConstants.PlatformTarget, newCanonicalName.PlatformTarget);
// Set the condition that will define the new configuration
string newCondition = newCanonicalName.ToMSBuildCondition();
newConfig.Condition = newCondition;
}
NotifyOnPlatformNameAdded(platformName);
return VSConstants.S_OK;
}
/// <summary>
/// Deletes a specified configuration name.
/// </summary>
/// <param name="name">The name of the configuration to be deleted.</param>
/// <returns>If the method succeeds, it returns S_OK. If it fails, it returns an error code. </returns>
public virtual int DeleteCfgsOfCfgName(string name)
{
// We need to QE/QS the project file
if (!this.ProjectMgr.QueryEditProjectFile(false))
{
throw Marshal.GetExceptionForHR(VSConstants.OLE_E_PROMPTSAVECANCELLED);
}
if (name == null)
{
Debug.Fail(String.Format(CultureInfo.CurrentCulture, "Name of the configuration should not be null if you want to delete it from project: {0}", MSBuildProject.GetFullPath((this.project.BuildProject))));
// The configuration " '$(Configuration)' == " does not exist, so technically the goal
// is achieved so return S_OK
return VSConstants.S_OK;
}
this.project.BuildProject.ReevaluateIfNecessary();
var configGroups = new List<Microsoft.Build.Construction.ProjectPropertyGroupElement>(this.project.BuildProject.Xml.PropertyGroups);
var groupsToDelete = new List<Microsoft.Build.Construction.ProjectPropertyGroupElement>();
foreach (var config in configGroups)
{
var configCanonicalName = ConfigCanonicalName.OfCondition(config.Condition);
if (configCanonicalName.MatchesConfigName(name))
{
groupsToDelete.Add(config);
configurationsList.Remove(configCanonicalName);
}
}
foreach (var group in groupsToDelete)
{
group.Parent.RemoveChild(group);
}
NotifyOnCfgNameDeleted(name);
return VSConstants.S_OK;
}
/// <summary>
/// Deletes a specified platform name.
/// </summary>
/// <param name="platName">The platform name to delete.</param>
/// <returns>If the method succeeds, it returns S_OK. If it fails, it returns an error code.</returns>
public virtual int DeleteCfgsOfPlatformName(string platName)
{
// We need to QE/QS the project file
if (!this.ProjectMgr.QueryEditProjectFile(false))
{
throw Marshal.GetExceptionForHR(VSConstants.OLE_E_PROMPTSAVECANCELLED);
}
if (platName == null)
{
Debug.Fail(String.Format(CultureInfo.CurrentCulture, "Name of the platform should not be null if you want to delete it from project: {0}", MSBuildProject.GetFullPath((this.project.BuildProject))));
return VSConstants.S_OK;
}
this.project.BuildProject.ReevaluateIfNecessary();
var configGroups = new List<Microsoft.Build.Construction.ProjectPropertyGroupElement>(this.project.BuildProject.Xml.PropertyGroups);
var groupsToDelete = new List<Microsoft.Build.Construction.ProjectPropertyGroupElement>();
foreach (var config in configGroups)
{
var configCanonicalName = ConfigCanonicalName.OfCondition(config.Condition);
if (configCanonicalName.MatchesPlatform(platName))
{
groupsToDelete.Add(config);
configurationsList.Remove(configCanonicalName);
}
}
foreach (var group in groupsToDelete)
{
group.Parent.RemoveChild(group);
}
NotifyOnPlatformNameDeleted(platName);
return VSConstants.S_OK;
}
/// <summary>
/// Returns the existing configurations stored in the project file.
/// </summary>
/// <param name="celt">Specifies the requested number of property names. If this number is unknown, celt can be zero.</param>
/// <param name="names">On input, an allocated array to hold the number of configuration property names specified by celt. This parameter can also be a null reference if the celt parameter is zero.
/// On output, names contains configuration property names.</param>
/// <param name="actual">The actual number of property names returned.</param>
/// <returns>If the method succeeds, it returns S_OK. If it fails, it returns an error code.</returns>
public virtual int GetCfgNames(uint celt, string[] names, uint[] actual)
{
// get's called twice, once for allocation, then for retrieval
int i = 0;
string[] configList = GetPropertiesConditionedOn(ProjectFileConstants.Configuration);
if (configList.Length == 0)
{
configList = new[] { ProjectConfig.Debug };
}
if (names != null)
{
foreach (string config in configList)
{
names[i++] = config;
if (i == celt)
break;
}
}
else
i = configList.Length;
if (actual != null)
{
actual[0] = (uint)i;
}
return VSConstants.S_OK;
}
/// <summary>
/// Returns the configuration associated with a specified configuration or platform name.
/// </summary>
/// <param name="name">The name of the configuration to be returned.</param>
/// <param name="platName">The name of the platform for the configuration to be returned.</param>
/// <param name="cfg">The implementation of the IVsCfg interface.</param>
/// <returns>If the method succeeds, it returns S_OK. If it fails, it returns an error code.</returns>
public virtual int GetCfgOfName(string name, string platName, out IVsCfg cfg)
{
cfg = null;
cfg = this.GetProjectConfiguration(new ConfigCanonicalName(name, platName));
return VSConstants.S_OK;
}
/// <summary>
/// Returns a specified configuration property.
/// </summary>
/// <param name="propid">Specifies the property identifier for the property to return. For valid propid values, see __VSCFGPROPID.</param>
/// <param name="var">The value of the property.</param>
/// <returns>If the method succeeds, it returns S_OK. If it fails, it returns an error code.</returns>
public virtual int GetCfgProviderProperty(int propid, out object var)
{
var = false;
switch ((__VSCFGPROPID)propid)
{
case __VSCFGPROPID.VSCFGPROPID_SupportsCfgAdd:
var = true;
break;
case __VSCFGPROPID.VSCFGPROPID_SupportsCfgDelete:
var = true;
break;
case __VSCFGPROPID.VSCFGPROPID_SupportsCfgRename:
var = true;
break;
case __VSCFGPROPID.VSCFGPROPID_SupportsPlatformAdd:
var = true;
break;
case __VSCFGPROPID.VSCFGPROPID_SupportsPlatformDelete:
var = true;
break;
}
return VSConstants.S_OK;
}
/// <summary>
/// Returns the per-configuration objects for this object.
/// </summary>
/// <param name="celt">Number of configuration objects to be returned or zero, indicating a request for an unknown number of objects.</param>
/// <param name="a">On input, pointer to an interface array or a null reference. On output, this parameter points to an array of IVsCfg interfaces belonging to the requested configuration objects.</param>
/// <param name="actual">The number of configuration objects actually returned or a null reference, if this information is not necessary.</param>
/// <param name="flags">Flags that specify settings for project configurations, or a null reference (Nothing in Visual Basic) if no additional flag settings are required. For valid prgrFlags values, see __VSCFGFLAGS.</param>
/// <returns>If the method succeeds, it returns S_OK. If it fails, it returns an error code.</returns>
public virtual int GetCfgs(uint celt, IVsCfg[] a, uint[] actual, uint[] flags)
{
if (flags != null)
flags[0] = 0;
int i = 0;
string[] configList = GetPropertiesConditionedOn(ProjectFileConstants.Configuration);
string[] platforms = GetPropertiesConditionedOn(ProjectFileConstants.Platform);
if (configList.Length == 0)
{
configList = new[] { ProjectConfig.Debug };
}
if (platforms.Length == 0)
{
platforms = new[] { ProjectConfig.AnyCPU };
}
if (a != null)
{
foreach (string configName in configList)
{
foreach (string platformName in platforms)
{
a[i] = this.GetProjectConfiguration(new ConfigCanonicalName(configName, platformName));
i++;
if (i == celt)
break;
}
if (i == celt)
break;
}
}
else
i = configList.Length * platforms.Length;
if (actual != null)
actual[0] = (uint)i;
return VSConstants.S_OK;
}
/// <summary>
/// Returns one or more platform names.
/// </summary>
/// <param name="celt">Specifies the requested number of platform names. If this number is unknown, celt can be zero.</param>
/// <param name="names">On input, an allocated array to hold the number of platform names specified by celt. This parameter can also be a null reference if the celt parameter is zero. On output, names contains platform names.</param>
/// <param name="actual">The actual number of platform names returned.</param>
/// <returns>If the method succeeds, it returns S_OK. If it fails, it returns an error code.</returns>
public virtual int GetPlatformNames(uint celt, string[] names, uint[] actual)
{
string[] platforms = this.GetPlatformsFromProject();
return GetPlatforms(celt, names, actual, platforms);
}
/// <summary>
/// Returns the set of platforms that are installed on the user's machine.
/// </summary>
/// <param name="celt">Specifies the requested number of supported platform names. If this number is unknown, celt can be zero.</param>
/// <param name="names">On input, an allocated array to hold the number of names specified by celt. This parameter can also be a null reference (Nothing in Visual Basic)if the celt parameter is zero. On output, names contains the names of supported platforms</param>
/// <param name="actual">The actual number of platform names returned.</param>
/// <returns>If the method succeeds, it returns S_OK. If it fails, it returns an error code.</returns>
public virtual int GetSupportedPlatformNames(uint celt, string[] names, uint[] actual)
{
string[] platforms = this.GetSupportedPlatformsFromProject();
return GetPlatforms(celt, names, actual, platforms);
}
/// <summary>
/// Assigns a new name to a configuration.
/// </summary>
/// <param name="old">The old name of the target configuration.</param>
/// <param name="newname">The new name of the target configuration.</param>
/// <returns>If the method succeeds, it returns S_OK. If it fails, it returns an error code.</returns>
public virtual int RenameCfgsOfCfgName(string old, string newname)
{
this.project.BuildProject.ReevaluateIfNecessary();
foreach (var config in this.project.BuildProject.Xml.PropertyGroups)
{
// Only care about conditional property groups
if (config.Condition == null || config.Condition.Length == 0)
continue;
var configCanonicalName = ConfigCanonicalName.OfCondition(config.Condition);
// Skip if it isn't the group we want
if (!configCanonicalName.MatchesConfigName(old))
continue;
var newCanonicalName = new ConfigCanonicalName(newname, configCanonicalName.Platform);
// Change the name
config.Condition = newCanonicalName.ToMSBuildCondition();
var propertyCollection = config.Properties;
var outputPathProperty = propertyCollection.Where(p => p.Name == ProjectFileConstants.OutputPath).FirstOrDefault();
if (outputPathProperty != null)
{
string outputBasePath = this.ProjectMgr.OutputBaseRelativePath;
if (outputBasePath.EndsWith(Path.DirectorySeparatorChar.ToString(), StringComparison.Ordinal))
outputBasePath = Path.GetDirectoryName(outputBasePath);
var expectedOutputPathValue = Path.Combine(outputBasePath, old);
if (String.Equals(expectedOutputPathValue, outputPathProperty.Value, StringComparison.OrdinalIgnoreCase))
{
var newOutputPathValue = Path.Combine(outputBasePath, newname);
config.SetProperty(ProjectFileConstants.OutputPath, newOutputPathValue);
}
}
// Update the name in our config list
if (configurationsList.ContainsKey(configCanonicalName))
{
ProjectConfig configuration = configurationsList[configCanonicalName];
configurationsList.Remove(configCanonicalName);
configurationsList.Add(newCanonicalName, configuration);
// notify the configuration of its new name
configuration.ConfigName = newname;
}
}
NotifyOnCfgNameRenamed(old, newname);
return VSConstants.S_OK;
}
/// <summary>
/// Cancels a registration for configuration event notification.
/// </summary>
/// <param name="cookie">The cookie used for registration.</param>
/// <returns>If the method succeeds, it returns S_OK. If it fails, it returns an error code.</returns>
public virtual int UnadviseCfgProviderEvents(uint cookie)
{
this.cfgEventSinks.RemoveAt(cookie);
return VSConstants.S_OK;
}
/// <summary>
/// Registers the caller for configuration event notification.
/// </summary>
/// <param name="sink">Reference to the IVsCfgProviderEvents interface to be called to provide notification of configuration events.</param>
/// <param name="cookie">Reference to a token representing the completed registration</param>
/// <returns>If the method succeeds, it returns S_OK. If it fails, it returns an error code.</returns>
public virtual int AdviseCfgProviderEvents(IVsCfgProviderEvents sink, out uint cookie)
{
cookie = this.cfgEventSinks.Add(sink);
return VSConstants.S_OK;
}
/// <summary>
/// Proved access to an IDispatchable object being a list of configuration properties
/// </summary>
/// <param name="configurationName">Combined Name and Platform for the configuration requested</param>
/// <param name="configurationProperties">The IDispatchcable object</param>
/// <returns>S_OK if successful</returns>
public virtual int GetAutomationObject(string configurationName, out object configurationProperties)
{
//Init out param
configurationProperties = null;
var canonicalCfgName = new ConfigCanonicalName(configurationName);
// Get the configuration
IVsCfg cfg;
ErrorHandler.ThrowOnFailure(this.GetCfgOfName(canonicalCfgName.ConfigName, canonicalCfgName.Platform, out cfg));
// Get the properties of the configuration
configurationProperties = ((ProjectConfig)cfg).ConfigurationProperties;
return VSConstants.S_OK;
}
/// <summary>
/// Called when a new configuration name was added.
/// </summary>
/// <param name="name">The name of configuration just added.</param>
private void NotifyOnCfgNameAdded(string name)
{
foreach (IVsCfgProviderEvents sink in this.cfgEventSinks)
{
ErrorHandler.ThrowOnFailure(sink.OnCfgNameAdded(name));
}
}
/// <summary>
/// Called when a config name was deleted.
/// </summary>
/// <param name="name">The name of the configuration.</param>
private void NotifyOnCfgNameDeleted(string name)
{
foreach (IVsCfgProviderEvents sink in this.cfgEventSinks)
{
ErrorHandler.ThrowOnFailure(sink.OnCfgNameDeleted(name));
}
}
/// <summary>
/// Called when a config name was renamed
/// </summary>
/// <param name="oldName">Old configuration name</param>
/// <param name="newName">New configuration name</param>
private void NotifyOnCfgNameRenamed(string oldName, string newName)
{
foreach (IVsCfgProviderEvents sink in this.cfgEventSinks)
{
ErrorHandler.ThrowOnFailure(sink.OnCfgNameRenamed(oldName, newName));
}
}
/// <summary>
/// Called when a platform name was added
/// </summary>
/// <param name="platformName">The name of the platform.</param>
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
private void NotifyOnPlatformNameAdded(string platformName)
{
foreach (IVsCfgProviderEvents sink in this.cfgEventSinks)
{
ErrorHandler.ThrowOnFailure(sink.OnPlatformNameAdded(platformName));
}
}
/// <summary>
/// Called when a platform name was deleted
/// </summary>
/// <param name="platformName">The name of the platform.</param>
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
private void NotifyOnPlatformNameDeleted(string platformName)
{
foreach (IVsCfgProviderEvents sink in this.cfgEventSinks)
{
ErrorHandler.ThrowOnFailure(sink.OnPlatformNameDeleted(platformName));
}
}
/// <summary>
/// Gets all the platforms defined in the project
/// </summary>
/// <returns>An array of platform names.</returns>
private string[] GetPlatformsFromProject()
{
string[] platforms = GetPropertiesConditionedOn(ProjectFileConstants.Platform);
if (platforms.Length == 0)
{
platforms = new[] { ProjectConfig.AnyCPU };
}
for (int i = 0; i < platforms.Length; i++)
{
platforms[i] = new ConfigCanonicalName("", platforms[i]).Platform;
}
return platforms;
}
/// <summary>
/// Return the supported platform names.
/// </summary>
/// <returns>An array of supported platform names.</returns>
private string[] GetSupportedPlatformsFromProject()
{
this.project.BuildProject.ReevaluateIfNecessary();
string platforms = this.ProjectMgr.BuildProject.GetPropertyValue(ProjectFileConstants.AvailablePlatforms);
if (platforms == null)
{
return new string[] { };
}
if (platforms.Contains(","))
{
return platforms.Split(',');
}
return new string[] { platforms };
}
/// <summary>
/// Common method for handling platform names.
/// </summary>
/// <param name="celt">Specifies the requested number of platform names. If this number is unknown, celt can be zero.</param>
/// <param name="names">On input, an allocated array to hold the number of platform names specified by celt. This parameter can also be null if the celt parameter is zero. On output, names contains platform names</param>
/// <param name="actual">A count of the actual number of platform names returned.</param>
/// <param name="platforms">An array of available platform names</param>
/// <returns>A count of the actual number of platform names returned.</returns>
/// <devremark>The platforms array is never null. It is assured by the callers.</devremark>
private static int GetPlatforms(uint celt, string[] names, uint[] actual, string[] platforms)
{
Debug.Assert(platforms != null, "The plaforms array should never be null");
if (names == null)
{
if (actual == null || actual.Length == 0)
{
throw new ArgumentException(SR.GetString(SR.InvalidParameter, CultureInfo.CurrentUICulture), "actual");
}
actual[0] = (uint)platforms.Length;
return VSConstants.S_OK;
}
//Degenarate case
if (celt == 0)
{
if (actual != null && actual.Length != 0)
{
actual[0] = (uint)platforms.Length;
}
return VSConstants.S_OK;
}
uint returned = 0;
for (int i = 0; i < platforms.Length && names.Length > returned; i++)
{
names[returned] = platforms[i];
returned++;
}
if (actual != null && actual.Length != 0)
{
actual[0] = returned;
}
if (celt > returned)
{
return VSConstants.S_FALSE;
}
return VSConstants.S_OK;
}
/// <summary>
/// Get all the configurations in the project.
/// </summary>
private string[] GetPropertiesConditionedOn(string constant)
{
List<string> configurations;
this.project.BuildProject.ReevaluateIfNecessary();
this.project.BuildProject.ConditionedProperties.TryGetValue(constant, out configurations);
return (configurations == null) ? new string[] { } : configurations.ToArray();
}
}
}
| mit |
fullcalendar/fullcalendar | packages/common/src/util/geom.ts | 1786 | export interface Point {
left: number
top: number
}
export interface Rect {
left: number
right: number
top: number
bottom: number
}
export function pointInsideRect(point: Point, rect: Rect): boolean {
return point.left >= rect.left &&
point.left < rect.right &&
point.top >= rect.top &&
point.top < rect.bottom
}
// Returns a new rectangle that is the intersection of the two rectangles. If they don't intersect, returns false
export function intersectRects(rect1: Rect, rect2: Rect): Rect | false {
let res = {
left: Math.max(rect1.left, rect2.left),
right: Math.min(rect1.right, rect2.right),
top: Math.max(rect1.top, rect2.top),
bottom: Math.min(rect1.bottom, rect2.bottom),
}
if (res.left < res.right && res.top < res.bottom) {
return res
}
return false
}
export function translateRect(rect: Rect, deltaX: number, deltaY: number): Rect {
return {
left: rect.left + deltaX,
right: rect.right + deltaX,
top: rect.top + deltaY,
bottom: rect.bottom + deltaY,
}
}
// Returns a new point that will have been moved to reside within the given rectangle
export function constrainPoint(point: Point, rect: Rect): Point {
return {
left: Math.min(Math.max(point.left, rect.left), rect.right),
top: Math.min(Math.max(point.top, rect.top), rect.bottom),
}
}
// Returns a point that is the center of the given rectangle
export function getRectCenter(rect: Rect): Point {
return {
left: (rect.left + rect.right) / 2,
top: (rect.top + rect.bottom) / 2,
}
}
// Subtracts point2's coordinates from point1's coordinates, returning a delta
export function diffPoints(point1: Point, point2: Point): Point {
return {
left: point1.left - point2.left,
top: point1.top - point2.top,
}
}
| mit |
PrJared/sabbath-school-lessons | src/da/2019-03/08/03.md | 2341 | ---
title: Overvind det onde med det gode
date: 19/08/2019
---
Når vi tænker på, hvad Jesus lærte, er det værd at huske de mennesker, han talte til, og de forhold, de levede under. Jesus var begyndt at tiltrække store skarer fra de områder, hvori han havde arbejdet (se Matt 4,25: 5,1). De fleste af dem var helt almindelige mennesker, som levede under Romerrigets styre; men nogle af dem var jødiske herskere og religiøse ledere. Almindelige menneskers tilværelse var vanskelig. De havde få muligheder, var tynget af tunge skatter og bebyrdet med religiøse traditioner.
Når Jesus underviste disse mennesker, var han tydeligt optaget af at tilbyde dem en måde, hvorved de kunne leve godt og med værdighed og mod uanset deres situation. Vi finder et eksempel i Matt 5,38-48. Disse udtalelser – ”vend også den anden kind til“, ”giv dem også kappen“, ”gå en ekstra mil“ – er så kendte, at de indgår som almindeligt kendte fraser i mange sprog. Men dette kan ofte komme til at skjule de radikale handlinger og holdninger, som Jesus lærer.
De scenarier, som Jesus beskrev, var almindelige hændelser for mange af hans tilhørere. Ofte blev de voldeligt angrebet af deres ”overordnede“ eller herrer. De stod ofte i gæld og mistede deres ejendom til udlejere eller ågersvende. Ofte blev de presset til arbejde af de okkuperende romerske soldater. Jesus lærte folket at svare med hæderlighed og at behandle deres undertrykkere bedre, end de fortjente, for på dem måde at modsætte sig tabet af deres egen menneskelighed. Selv om disse undertrykkere forsøgte at udøve deres magt, havde folket altid friheden til at vælge, hvordan de ville reagere. Ved at reagere uden vold og med gavmildhed ville de afsløre undertrykkelsens ondskab og uretfærdighed.
`Læs Matt 5,38-48 Rom 12,20-21. Sammenlign de to tekster. Hvordan skal vi omsætte disse radikale principper i vores eget liv?`
`Til at tænke over. Jesus opsummerede hele ”loven og profeterne“, alle de hellige skrifter, som vi ofte kalder Det Gamle Testamente, i et enkelt princip, som er blevet kendt som den gyldne regel: ”Alt, hvad I vil, at mennesker skal gøre mod jer, det skal I også gøre mod dem“ (Matt 7,12). Hvordan kan du her og nu gøre en indsats for at følge det, Jesus her befaler os, uanset hvad det vil koste?` | mit |
centaurustech/unlock | config/environments/test.rb | 1867 | Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
# and recreated between test runs. Don't rely on the data there!
config.cache_classes = true
# Do not eager load code on boot. This avoids loading your whole application
# just for the purpose of running a single test. If you are using a tool that
# preloads Rails for running tests, you may have to set it to true.
config.eager_load = false
# Configure static asset server for tests with Cache-Control for performance.
config.serve_static_assets = true
config.static_cache_control = 'public, max-age=3600'
# Show full error reports and disable caching.
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
# Raise exceptions instead of rendering exception templates.
config.action_dispatch.show_exceptions = false
# Disable request forgery protection in test environment.
config.action_controller.allow_forgery_protection = false
# Tell Action Mailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test
# Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
config.action_mailer.asset_host = 'http://localhost:3000'
end
Rails.application.routes.default_url_options[:host]= 'localhost:3000'
| mit |
xundaokeji/three.js | examples/webgl_geometry_extrude_shapes.html | 4314 | <!DOCTYPE html>
<html lang="en">
<head>
<title>three.js webgl - geometry - extrude shapes</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<style>
body {
font-family: Monospace;
background-color: #222;
margin: 0px;
overflow: hidden;
}
a {
color: #f80;
}
</style>
</head>
<body>
<script src="../build/three.js"></script>
<script src="js/controls/TrackballControls.js"></script>
<script>
var container;
var camera, scene, renderer, controls;
init();
animate();
function init() {
var info = document.createElement( 'div' );
info.style.position = 'absolute';
info.style.top = '10px';
info.style.width = '100%';
info.style.textAlign = 'center';
info.style.color = '#fff';
info.style.link = '#f80';
info.innerHTML = '<a href="http://threejs.org" target="_blank">three.js</a> webgl - geometry extrude shapes';
document.body.appendChild( info );
renderer = new THREE.WebGLRenderer();
renderer.setClearColor( 0x222222 );
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild( renderer.domElement );
scene = new THREE.Scene();
camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 1000 );
camera.position.set( 0, 0, 500 );
controls = new THREE.TrackballControls( camera, renderer.domElement );
controls.minDistance = 200;
controls.maxDistance = 500;
scene.add( new THREE.AmbientLight( 0x222222 ) );
var light = new THREE.PointLight( 0xffffff );
light.position.copy( camera.position );
scene.add( light );
//
var closedSpline = new THREE.CatmullRomCurve3( [
new THREE.Vector3( -60, -100, 60 ),
new THREE.Vector3( -60, 20, 60 ),
new THREE.Vector3( -60, 120, 60 ),
new THREE.Vector3( 60, 20, -60 ),
new THREE.Vector3( 60, -100, -60 )
] );
closedSpline.type = 'catmullrom';
closedSpline.closed = true;
var extrudeSettings = {
steps : 100,
bevelEnabled : false,
extrudePath : closedSpline
};
var pts = [], count = 3;
for ( var i = 0; i < count; i ++ ) {
var l = 20;
var a = 2 * i / count * Math.PI;
pts.push( new THREE.Vector2 ( Math.cos( a ) * l, Math.sin( a ) * l ) );
}
var shape = new THREE.Shape( pts );
var geometry = new THREE.ExtrudeGeometry( shape, extrudeSettings );
var material = new THREE.MeshLambertMaterial( { color: 0xb00000, wireframe: false } );
var mesh = new THREE.Mesh( geometry, material );
scene.add( mesh );
//
var randomPoints = [];
for ( var i = 0; i < 10; i ++ ) {
randomPoints.push( new THREE.Vector3( ( i - 4.5 ) * 50, THREE.Math.randFloat( - 50, 50 ), THREE.Math.randFloat( - 50, 50 ) ) );
}
var randomSpline = new THREE.CatmullRomCurve3( randomPoints );
//
var extrudeSettings = {
steps : 200,
bevelEnabled : false,
extrudePath : randomSpline
};
var pts = [], numPts = 5;
for ( var i = 0; i < numPts * 2; i ++ ) {
var l = i % 2 == 1 ? 10 : 20;
var a = i / numPts * Math.PI;
pts.push( new THREE.Vector2 ( Math.cos( a ) * l, Math.sin( a ) * l ) );
}
var shape = new THREE.Shape( pts );
var geometry = new THREE.ExtrudeGeometry( shape, extrudeSettings );
var material2 = new THREE.MeshLambertMaterial( { color: 0xff8000, wireframe: false } );
var mesh = new THREE.Mesh( geometry, material2 );
scene.add( mesh );
//
var materials = [ material, material2 ];
var extrudeSettings = {
amount : 20,
steps : 1,
material : 1,
extrudeMaterial : 0,
bevelEnabled : true,
bevelThickness : 2,
bevelSize : 4,
bevelSegments : 1
};
var geometry = new THREE.ExtrudeGeometry( shape, extrudeSettings );
var mesh = new THREE.Mesh( geometry, materials );
mesh.position.set( 50, 100, 50 );
scene.add( mesh );
}
function animate() {
requestAnimationFrame( animate );
controls.update();
renderer.render( scene, camera );
}
</script>
</body>
</html>
| mit |
nickchikore/Product-Developer-Test | node_modules/modestmaps/test/spec/Layer.js | 1490 | describe('Layer', function() {
// Currently not testing subdomain-based templatedmapprovider, since
// the implementation should be kind of undefined.
it('layer can be created and destroyed', function() {
var p = new MM.TemplatedLayer(
'http://{S}.tile.openstreetmap.org/{Z}/{X}/{Y}.png', ['a']);
var l = new MM.Layer(p);
l.destroy();
expect(l.map).toEqual(null);
});
// Currently not testing subdomain-based templatedmapprovider, since
// the implementation should be kind of undefined.
it('causes the map to throw requesterror when things are not accessible', function() {
var manager, message, p;
var fourohfour = 'http://fffffffffffffffffffffffffffffffff.org/404.png';
runs(function() {
p = new MM.TemplatedLayer(fourohfour);
p.requestManager.addCallback('requesterror', function(a, b, c) {
manager = a;
message = b;
});
var m = new MM.Map(document.createElement('div'), p, { x: 500, y: 500 });
m.setCenter({ lat: 0, lon: 0 }).setZoom(5);
});
waits(500);
runs(function() {
expect(manager).toEqual(p.requestManager);
expect(jasmine.isDomNode(message.element)).toBeTruthy();
expect(message.url).toEqual(fourohfour);
expect(message.url).toEqual('http://fffffffffffffffffffffffffffffffff.org/404.png');
});
});
});
| mit |
passiful/node-incense | dist/widgets/stickies/stickies.css | 202 | .stickies {
font-size: 11px;
min-width: 80px;
min-height: 80px;
max-width: 240px;
max-height: auto;
width: 100%;
height: 100%;
overflow: auto;
padding: 0.5em;
background: #ffff98; }
| mit |
cdnjs/cdnjs | ajax/libs/buefy/0.8.20/cjs/message.js | 2270 | 'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
require('./chunk-14c82365.js');
require('./helpers.js');
require('./chunk-cd0dcc1d.js');
require('./chunk-d7fda995.js');
var __chunk_5 = require('./chunk-13e039f5.js');
var __chunk_19 = require('./chunk-3b860353.js');
//
var script = {
name: 'BMessage',
mixins: [__chunk_19.MessageMixin],
props: {
ariaCloseLabel: String
},
data: function data() {
return {
newIconSize: this.iconSize || this.size || 'is-large'
};
}
};
/* script */
const __vue_script__ = script;
/* template */
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('transition',{attrs:{"name":"fade"}},[(_vm.isActive)?_c('article',{staticClass:"message",class:[_vm.type, _vm.size]},[(_vm.title)?_c('header',{staticClass:"message-header"},[_c('p',[_vm._v(_vm._s(_vm.title))]),_vm._v(" "),(_vm.closable)?_c('button',{staticClass:"delete",attrs:{"type":"button","aria-label":_vm.ariaCloseLabel},on:{"click":_vm.close}}):_vm._e()]):_vm._e(),_vm._v(" "),_c('section',{staticClass:"message-body"},[_c('div',{staticClass:"media"},[(_vm.computedIcon && _vm.hasIcon)?_c('div',{staticClass:"media-left"},[_c('b-icon',{class:_vm.type,attrs:{"icon":_vm.computedIcon,"pack":_vm.iconPack,"both":"","size":_vm.newIconSize}})],1):_vm._e(),_vm._v(" "),_c('div',{staticClass:"media-content"},[_vm._t("default")],2)])])]):_vm._e()])};
var __vue_staticRenderFns__ = [];
/* style */
const __vue_inject_styles__ = undefined;
/* scoped */
const __vue_scope_id__ = undefined;
/* module identifier */
const __vue_module_identifier__ = undefined;
/* functional template */
const __vue_is_functional_template__ = false;
/* style inject */
/* style inject SSR */
var Message = __chunk_5.__vue_normalize__(
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
__vue_inject_styles__,
__vue_script__,
__vue_scope_id__,
__vue_is_functional_template__,
__vue_module_identifier__,
undefined,
undefined
);
var Plugin = {
install: function install(Vue) {
__chunk_5.registerComponent(Vue, Message);
}
};
__chunk_5.use(Plugin);
exports.BMessage = Message;
exports.default = Plugin;
| mit |
jiamings/tsong.me | _posts/reading/2016-11-24-noise-infusion-training.md | 1903 | ---
layout: post
title: Learning to Generate Samples from Noise Through Infusion Training
author: Jiaming Song
tags:
- reading
---
## Learning to Generate Samples from Noise Through Infusion Training
### Sampling through Markov Chain
The generative model is defined through the following procedure:
1. Using a simple factorial distribution $$p^{(0)}(z^{(0)})$$ draw an initial sample $$z^{(0)} \sim p^{(0)}$$, where $$z^{(0)}$$ has the same dimension as the data.
2. Repeatedly apply T times a stochastic transition operator $$p^{(t)}(z^{(t)}\lvert z^{(t-1)})$$, which provides a more "denoised" sample $$z^{(t)}$$.
3. Obtain $$z^{(T)}$$ as the final sample.
Thus the generative model is $$p(z^{(t)}) = p^{(0)}(z^{(0)}) (\prod_{t=1}^T p^{(t)}(z^{(t)} \lvert z^{(t-1)}))$$.
### Infusion Training Procedure
Let $$\theta^{(t)}$$ be the prarmeters for $$p^{(t)}$$. We can share the parameters of $$t > 0$$ across time.
One procedure would be the greedy layerwise procedure - use greedy layerwize maximum likelihood training on each layer. This intuitive way of training, however, makes no sense - for $$ t > 1 $$ the objective becomes essentially the same as training the first objective. To see this, we show that $$p^{(1)}(x \lvert z^{(0)}) = p^{(1)}(x)$$, since $$z^{(0)}$$ and $$x$$ are drawn independently.
One way to solve this is to introduce some dependency on $x$. Formally, one can introduce a infused transition as $$q_i^{(t)}(z_i^{(t)}\lvert z_i^{(t-1)}, x) = (1 - \omega) p_i^{(t)}(z_i^{(t)}\lvert z_i^{(t-1)}) + \omega \delta_{x_i} (z_i^{(t)})$$
The procedure can be explained as follows. For each $$x$$ in training data:
- Sample the infusion chain
- Perform a gradient step so that $$p$$ learns to "denoise" every $$z^{(t)}$$ into $$x$$.
$$
\theta^{(t)} \leftarrow \theta^{(t)} + \eta \frac{\partial \log p^{(t)}(x \lvert z^{(t-1)}; \theta^{(t)})}{\partial \theta^{(t)}}
$$
| mit |
cyberpuffin/remanddel | node_modules/lite-server/node_modules/browser-sync/node_modules/rx/ts/core/subjects/anonymoussubject.js | 186 | /// <reference path="./subject.ts" />
var Rx;
(function (Rx) {
})(Rx || (Rx = {}));
(function () {
var s = new Rx.AnonymousSubject();
});
//# sourceMappingURL=anonymoussubject.js.map | mit |
cdnjs/cdnjs | ajax/libs/highcharts/8.2.2/modules/marker-clusters.src.js | 81899 | /**
* @license Highcharts JS v8.2.2 (2020-10-22)
*
* Marker clusters module for Highcharts
*
* (c) 2010-2019 Wojciech Chmiel
*
* License: www.highcharts.com/license
*/
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
module.exports = factory;
} else if (typeof define === 'function' && define.amd) {
define('highcharts/modules/marker-clusters', ['highcharts'], function (Highcharts) {
factory(Highcharts);
factory.Highcharts = Highcharts;
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
var _modules = Highcharts ? Highcharts._modules : {};
function _registerModule(obj, path, args, fn) {
if (!obj.hasOwnProperty(path)) {
obj[path] = fn.apply(null, args);
}
}
_registerModule(_modules, 'Extensions/MarkerClusters.js', [_modules['Core/Animation/AnimationUtilities.js'], _modules['Core/Series/Series.js'], _modules['Core/Chart/Chart.js'], _modules['Core/Globals.js'], _modules['Core/Options.js'], _modules['Core/Series/Point.js'], _modules['Core/Renderer/SVG/SVGRenderer.js'], _modules['Core/Utilities.js'], _modules['Core/Axis/Axis.js']], function (A, BaseSeries, Chart, H, O, Point, SVGRenderer, U, Axis) {
/* *
*
* Marker clusters module.
*
* (c) 2010-2020 Torstein Honsi
*
* Author: Wojciech Chmiel
*
* License: www.highcharts.com/license
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
var animObject = A.animObject;
var defaultOptions = O.defaultOptions;
var addEvent = U.addEvent,
defined = U.defined,
error = U.error,
isArray = U.isArray,
isFunction = U.isFunction,
isObject = U.isObject,
isNumber = U.isNumber,
merge = U.merge,
objectEach = U.objectEach,
relativeLength = U.relativeLength,
syncTimeout = U.syncTimeout;
/**
* Function callback when a cluster is clicked.
*
* @callback Highcharts.MarkerClusterDrillCallbackFunction
*
* @param {Highcharts.Point} this
* The point where the event occured.
*
* @param {Highcharts.PointClickEventObject} event
* Event arguments.
*/
''; // detach doclets from following code
/* eslint-disable no-invalid-this */
var Series = H.Series,
Scatter = BaseSeries.seriesTypes.scatter,
baseGeneratePoints = Series.prototype.generatePoints,
stateIdCounter = 0,
// Points that ids are included in the oldPointsStateId array
// are hidden before animation. Other ones are destroyed.
oldPointsStateId = [];
/**
* Options for marker clusters, the concept of sampling the data
* values into larger blocks in order to ease readability and
* increase performance of the JavaScript charts.
*
* Note: marker clusters module is not working with `boost`
* and `draggable-points` modules.
*
* The marker clusters feature requires the marker-clusters.js
* file to be loaded, found in the modules directory of the download
* package, or online at [code.highcharts.com/modules/marker-clusters.js
* ](code.highcharts.com/modules/marker-clusters.js).
*
* @sample maps/marker-clusters/europe
* Maps marker clusters
* @sample highcharts/marker-clusters/basic
* Scatter marker clusters
* @sample maps/marker-clusters/optimized-kmeans
* Marker clusters with colorAxis
*
* @product highcharts highmaps
* @since 8.0.0
* @optionparent plotOptions.scatter.cluster
*
* @private
*/
var clusterDefaultOptions = {
/**
* Whether to enable the marker-clusters module.
*
* @sample maps/marker-clusters/basic
* Maps marker clusters
* @sample highcharts/marker-clusters/basic
* Scatter marker clusters
*/
enabled: false,
/**
* When set to `false` prevent cluster overlapping - this option
* works only when `layoutAlgorithm.type = "grid"`.
*
* @sample highcharts/marker-clusters/grid
* Prevent overlapping
*/
allowOverlap: true,
/**
* Options for the cluster marker animation.
* @type {boolean|Partial<Highcharts.AnimationOptionsObject>}
* @default { "duration": 500 }
*/
animation: {
/** @ignore-option */
duration: 500
},
/**
* Zoom the plot area to the cluster points range when a cluster is clicked.
*/
drillToCluster: true,
/**
* The minimum amount of points to be combined into a cluster.
* This value has to be greater or equal to 2.
*
* @sample highcharts/marker-clusters/basic
* At least three points in the cluster
*/
minimumClusterSize: 2,
/**
* Options for layout algorithm. Inside there
* are options to change the type of the algorithm,
gridSize,
* distance or iterations.
*/
layoutAlgorithm: {
/**
* Type of the algorithm used to combine points into a cluster.
* There are three available algorithms:
*
* 1) `grid` - grid-based clustering technique. Points are assigned
* to squares of set size depending on their position on the plot
* area. Points inside the grid square are combined into a cluster.
* The grid size can be controlled by `gridSize` property
* (grid size changes at certain zoom levels).
*
* 2) `kmeans` - based on K-Means clustering technique. In the
* first step,
points are divided using the grid method (distance
* property is a grid size) to find the initial amount of clusters.
* Next,
each point is classified by computing the distance between
* each cluster center and that point. When the closest cluster
* distance is lower than distance property set by a user the point
* is added to this cluster otherwise is classified as `noise`. The
* algorithm is repeated until each cluster center not change its
* previous position more than one pixel. This technique is more
* accurate but also more time consuming than the `grid` algorithm,
* especially for big datasets.
*
* 3) `optimizedKmeans` - based on K-Means clustering technique. This
* algorithm uses k-means algorithm only on the chart initialization
* or when chart extremes have greater range than on initialization.
* When a chart is redrawn the algorithm checks only clustered points
* distance from the cluster center and rebuild it when the point is
* spaced enough to be outside the cluster. It provides performance
* improvement and more stable clusters position yet can be used rather
* on small and sparse datasets.
*
* By default,
the algorithm depends on visible quantity of points
* and `kmeansThreshold`. When there are more visible points than the
* `kmeansThreshold` the `grid` algorithm is used,
otherwise `kmeans`.
*
* The custom clustering algorithm can be added by assigning a callback
* function as the type property. This function takes an array of
* `processedXData`,
`processedYData`,
`processedXData` indexes and
* `layoutAlgorithm` options as arguments and should return an object
* with grouped data.
*
* The algorithm should return an object like that:
* <pre>{
* clusterId1: [{
* x: 573,
* y: 285,
* index: 1 // point index in the data array
* }, {
* x: 521,
* y: 197,
* index: 2
* }],
* clusterId2: [{
* ...
* }]
* ...
* }</pre>
*
* `clusterId` (example above - unique id of a cluster or noise)
* is an array of points belonging to a cluster. If the
* array has only one point or fewer points than set in
* `cluster.minimumClusterSize` it won't be combined into a cluster.
*
* @sample maps/marker-clusters/optimized-kmeans
* Optimized K-Means algorithm
* @sample highcharts/marker-clusters/kmeans
* K-Means algorithm
* @sample highcharts/marker-clusters/grid
* Grid algorithm
* @sample maps/marker-clusters/custom-alg
* Custom algorithm
*
* @type {string|Function}
* @see [cluster.minimumClusterSize](#plotOptions.scatter.marker.cluster.minimumClusterSize)
* @apioption plotOptions.scatter.cluster.layoutAlgorithm.type
*/
/**
* When `type` is set to the `grid`,
* `gridSize` is a size of a grid square element either as a number
* defining pixels,
or a percentage defining a percentage
* of the plot area width.
*
* @type {number|string}
*/
gridSize: 50,
/**
* When `type` is set to `kmeans`,
* `iterations` are the number of iterations that this algorithm will be
* repeated to find clusters positions.
*
* @type {number}
* @apioption plotOptions.scatter.cluster.layoutAlgorithm.iterations
*/
/**
* When `type` is set to `kmeans`,
* `distance` is a maximum distance between point and cluster center
* so that this point will be inside the cluster. The distance
* is either a number defining pixels or a percentage
* defining a percentage of the plot area width.
*
* @type {number|string}
*/
distance: 40,
/**
* When `type` is set to `undefined` and there are more visible points
* than the kmeansThreshold the `grid` algorithm is used to find
* clusters,
otherwise `kmeans`. It ensures good performance on
* large datasets and better clusters arrangement after the zoom.
*/
kmeansThreshold: 100
},
/**
* Options for the cluster marker.
* @extends plotOptions.series.marker
* @excluding enabledThreshold,
states
* @type {Highcharts.PointMarkerOptionsObject}
*/
marker: {
/** @internal */
symbol: 'cluster',
/** @internal */
radius: 15,
/** @internal */
lineWidth: 0,
/** @internal */
lineColor: '#ffffff'
},
/**
* Fires when the cluster point is clicked and `drillToCluster` is enabled.
* One parameter,
`event`,
is passed to the function. The default action
* is to zoom to the cluster points range. This can be prevented
* by calling `event.preventDefault()`.
*
* @type {Highcharts.MarkerClusterDrillCallbackFunction}
* @product highcharts highmaps
* @see [cluster.drillToCluster](#plotOptions.scatter.marker.cluster.drillToCluster)
* @apioption plotOptions.scatter.cluster.events.drillToCluster
*/
/**
* An array defining zones within marker clusters.
*
* In styled mode,
the color zones are styled with the
* `.highcharts-cluster-zone-{n}` class,
or custom
* classed from the `className`
* option.
*
* @sample highcharts/marker-clusters/basic
* Marker clusters zones
* @sample maps/marker-clusters/custom-alg
* Zones on maps
*
* @type {Array<*>}
* @product highcharts highmaps
* @apioption plotOptions.scatter.cluster.zones
*/
/**
* Styled mode only. A custom class name for the zone.
*
* @sample highcharts/css/color-zones/
* Zones styled by class name
*
* @type {string}
* @apioption plotOptions.scatter.cluster.zones.className
*/
/**
* Settings for the cluster marker belonging to the zone.
*
* @see [cluster.marker](#plotOptions.scatter.cluster.marker)
* @extends plotOptions.scatter.cluster.marker
* @product highcharts highmaps
* @apioption plotOptions.scatter.cluster.zones.marker
*/
/**
* The value where the zone starts.
*
* @type {number}
* @product highcharts highmaps
* @apioption plotOptions.scatter.cluster.zones.from
*/
/**
* The value where the zone ends.
*
* @type {number}
* @product highcharts highmaps
* @apioption plotOptions.scatter.cluster.zones.to
*/
/**
* The fill color of the cluster marker in hover state. When
* `undefined`,
the series' or point's fillColor for normal
* state is used.
*
* @type {Highcharts.ColorType}
* @apioption plotOptions.scatter.cluster.states.hover.fillColor
*/
/**
* Options for the cluster data labels.
* @type {Highcharts.DataLabelsOptions}
*/
dataLabels: {
/** @internal */
enabled: true,
/** @internal */
format: '{point.clusterPointsAmount}',
/** @internal */
verticalAlign: 'middle',
/** @internal */
align: 'center',
/** @internal */
style: {
color: 'contrast'
},
/** @internal */
inside: true
}
};
(defaultOptions.plotOptions || {}).series = merge((defaultOptions.plotOptions || {}).series, {
cluster: clusterDefaultOptions,
tooltip: {
/**
* The HTML of the cluster point's in the tooltip. Works only with
* marker-clusters module and analogously to
* [pointFormat](#tooltip.pointFormat).
*
* The cluster tooltip can be also formatted using
* `tooltip.formatter` callback function and `point.isCluster` flag.
*
* @sample highcharts/marker-clusters/grid
* Format tooltip for cluster points.
*
* @sample maps/marker-clusters/europe/
* Format tooltip for clusters using tooltip.formatter
*
* @apioption tooltip.clusterFormat
*/
clusterFormat: '<span>Clustered points: ' +
'{point.clusterPointsAmount}</span><br/>'
}
});
// Utils.
/* eslint-disable require-jsdoc */
function getClusterPosition(points) {
var pointsLen = points.length,
sumX = 0,
sumY = 0,
i;
for (i = 0; i < pointsLen; i++) {
sumX += points[i].x;
sumY += points[i].y;
}
return {
x: sumX / pointsLen,
y: sumY / pointsLen
};
}
// Prepare array with sorted data objects to be
// compared in getPointsState method.
function getDataState(clusteredData, stateDataLen) {
var state = [];
state.length = stateDataLen;
clusteredData.clusters.forEach(function (cluster) {
cluster.data.forEach(function (elem) {
state[elem.dataIndex] = elem;
});
});
clusteredData.noise.forEach(function (noise) {
state[noise.data[0].dataIndex] = noise.data[0];
});
return state;
}
function fadeInElement(elem, opacity, animation) {
elem
.attr({
opacity: opacity
})
.animate({
opacity: 1
}, animation);
}
function fadeInStatePoint(stateObj, opacity, animation, fadeinGraphic, fadeinDataLabel) {
if (stateObj.point) {
if (fadeinGraphic && stateObj.point.graphic) {
stateObj.point.graphic.show();
fadeInElement(stateObj.point.graphic, opacity, animation);
}
if (fadeinDataLabel && stateObj.point.dataLabel) {
stateObj.point.dataLabel.show();
fadeInElement(stateObj.point.dataLabel, opacity, animation);
}
}
}
function hideStatePoint(stateObj, hideGraphic, hideDataLabel) {
if (stateObj.point) {
if (hideGraphic && stateObj.point.graphic) {
stateObj.point.graphic.hide();
}
if (hideDataLabel && stateObj.point.dataLabel) {
stateObj.point.dataLabel.hide();
}
}
}
function destroyOldPoints(oldState) {
if (oldState) {
objectEach(oldState, function (state) {
if (state.point && state.point.destroy) {
state.point.destroy();
}
});
}
}
function fadeInNewPointAndDestoryOld(newPointObj, oldPoints, animation, opacity) {
// Fade in new point.
fadeInStatePoint(newPointObj, opacity, animation, true, true);
// Destroy old animated points.
oldPoints.forEach(function (p) {
if (p.point && p.point.destroy) {
p.point.destroy();
}
});
}
// Generate unique stateId for a state element.
function getStateId() {
return Math.random().toString(36).substring(2, 7) + '-' + stateIdCounter++;
}
// Useful for debugging.
// function drawGridLines(
// series: Highcharts.Series,
// options: Highcharts.MarkerClusterLayoutAlgorithmOptions
// ): void {
// var chart = series.chart,
// xAxis = series.xAxis,
// yAxis = series.yAxis,
// xAxisLen = series.xAxis.len,
// yAxisLen = series.yAxis.len,
// i, j, elem, text,
// currentX = 0,
// currentY = 0,
// scaledGridSize = 50,
// gridX = 0,
// gridY = 0,
// gridOffset = series.getGridOffset(),
// mapXSize, mapYSize;
// if (series.debugGridLines && series.debugGridLines.length) {
// series.debugGridLines.forEach(function (gridItem): void {
// if (gridItem && gridItem.destroy) {
// gridItem.destroy();
// }
// });
// }
// series.debugGridLines = [];
// scaledGridSize = series.getScaledGridSize(options);
// mapXSize = Math.abs(
// xAxis.toPixels(xAxis.dataMax || 0) -
// xAxis.toPixels(xAxis.dataMin || 0)
// );
// mapYSize = Math.abs(
// yAxis.toPixels(yAxis.dataMax || 0) -
// yAxis.toPixels(yAxis.dataMin || 0)
// );
// gridX = Math.ceil(mapXSize / scaledGridSize);
// gridY = Math.ceil(mapYSize / scaledGridSize);
// for (i = 0; i < gridX; i++) {
// currentX = i * scaledGridSize;
// if (
// gridOffset.plotLeft + currentX >= 0 &&
// gridOffset.plotLeft + currentX < xAxisLen
// ) {
// for (j = 0; j < gridY; j++) {
// currentY = j * scaledGridSize;
// if (
// gridOffset.plotTop + currentY >= 0 &&
// gridOffset.plotTop + currentY < yAxisLen
// ) {
// if (j % 2 === 0 && i % 2 === 0) {
// var rect = chart.renderer
// .rect(
// gridOffset.plotLeft + currentX,
// gridOffset.plotTop + currentY,
// scaledGridSize * 2,
// scaledGridSize * 2
// )
// .attr({
// stroke: series.color,
// 'stroke-width': '2px'
// })
// .add()
// .toFront();
// series.debugGridLines.push(rect);
// }
// elem = chart.renderer
// .rect(
// gridOffset.plotLeft + currentX,
// gridOffset.plotTop + currentY,
// scaledGridSize,
// scaledGridSize
// )
// .attr({
// stroke: series.color,
// opacity: 0.3,
// 'stroke-width': '1px'
// })
// .add()
// .toFront();
// text = chart.renderer
// .text(
// j + '-' + i,
// gridOffset.plotLeft + currentX + 2,
// gridOffset.plotTop + currentY + 7
// )
// .css({
// fill: 'rgba(0, 0, 0, 0.7)',
// fontSize: '7px'
// })
// .add()
// .toFront();
// series.debugGridLines.push(elem);
// series.debugGridLines.push(text);
// }
// }
// }
// }
// }
/* eslint-enable require-jsdoc */
// Cluster symbol.
SVGRenderer.prototype.symbols.cluster = function (x, y, width, height) {
var w = width / 2,
h = height / 2,
outerWidth = 1,
space = 1,
inner,
outer1,
outer2;
inner = this.arc(x + w, y + h, w - space * 4, h - space * 4, {
start: Math.PI * 0.5,
end: Math.PI * 2.5,
open: false
});
outer1 = this.arc(x + w, y + h, w - space * 3, h - space * 3, {
start: Math.PI * 0.5,
end: Math.PI * 2.5,
innerR: w - outerWidth * 2,
open: false
});
outer2 = this.arc(x + w, y + h, w - space, h - space, {
start: Math.PI * 0.5,
end: Math.PI * 2.5,
innerR: w,
open: false
});
return outer2.concat(outer1, inner);
};
Scatter.prototype.animateClusterPoint = function (clusterObj) {
var series = this,
xAxis = series.xAxis,
yAxis = series.yAxis,
chart = series.chart,
clusterOptions = series.options.cluster,
animation = animObject((clusterOptions || {}).animation),
animDuration = animation.duration || 500,
pointsState = (series.markerClusterInfo || {}).pointsState,
newState = (pointsState || {}).newState,
oldState = (pointsState || {}).oldState,
parentId,
oldPointObj,
newPointObj,
oldPoints = [],
newPointBBox,
offset = 0,
newX = 0,
newY = 0,
isOldPointGrahic = false,
isCbHandled = false;
if (oldState && newState) {
newPointObj = newState[clusterObj.stateId];
newX = xAxis.toPixels(newPointObj.x) - chart.plotLeft;
newY = yAxis.toPixels(newPointObj.y) - chart.plotTop;
// Point has one ancestor.
if (newPointObj.parentsId.length === 1) {
parentId = (newState || {})[clusterObj.stateId].parentsId[0];
oldPointObj = oldState[parentId];
// If old and new poistions are the same do not animate.
if (newPointObj.point &&
newPointObj.point.graphic &&
oldPointObj &&
oldPointObj.point &&
oldPointObj.point.plotX &&
oldPointObj.point.plotY &&
oldPointObj.point.plotX !== newPointObj.point.plotX &&
oldPointObj.point.plotY !== newPointObj.point.plotY) {
newPointBBox = newPointObj.point.graphic.getBBox();
offset = newPointBBox.width / 2;
newPointObj.point.graphic.attr({
x: oldPointObj.point.plotX - offset,
y: oldPointObj.point.plotY - offset
});
newPointObj.point.graphic.animate({
x: newX - (newPointObj.point.graphic.radius || 0),
y: newY - (newPointObj.point.graphic.radius || 0)
}, animation, function () {
isCbHandled = true;
// Destroy old point.
if (oldPointObj.point && oldPointObj.point.destroy) {
oldPointObj.point.destroy();
}
});
// Data label animation.
if (newPointObj.point.dataLabel &&
newPointObj.point.dataLabel.alignAttr &&
oldPointObj.point.dataLabel &&
oldPointObj.point.dataLabel.alignAttr) {
newPointObj.point.dataLabel.attr({
x: oldPointObj.point.dataLabel.alignAttr.x,
y: oldPointObj.point.dataLabel.alignAttr.y
});
newPointObj.point.dataLabel.animate({
x: newPointObj.point.dataLabel.alignAttr.x,
y: newPointObj.point.dataLabel.alignAttr.y
}, animation);
}
}
}
else if (newPointObj.parentsId.length === 0) {
// Point has no ancestors - new point.
// Hide new point.
hideStatePoint(newPointObj, true, true);
syncTimeout(function () {
// Fade in new point.
fadeInStatePoint(newPointObj, 0.1, animation, true, true);
}, animDuration / 2);
}
else {
// Point has many ancestors.
// Hide new point before animation.
hideStatePoint(newPointObj, true, true);
newPointObj.parentsId.forEach(function (elem) {
if (oldState && oldState[elem]) {
oldPointObj = oldState[elem];
oldPoints.push(oldPointObj);
if (oldPointObj.point &&
oldPointObj.point.graphic) {
isOldPointGrahic = true;
oldPointObj.point.graphic.show();
oldPointObj.point.graphic.animate({
x: newX - (oldPointObj.point.graphic.radius || 0),
y: newY - (oldPointObj.point.graphic.radius || 0),
opacity: 0.4
}, animation, function () {
isCbHandled = true;
fadeInNewPointAndDestoryOld(newPointObj, oldPoints, animation, 0.7);
});
if (oldPointObj.point.dataLabel &&
oldPointObj.point.dataLabel.y !== -9999 &&
newPointObj.point &&
newPointObj.point.dataLabel &&
newPointObj.point.dataLabel.alignAttr) {
oldPointObj.point.dataLabel.show();
oldPointObj.point.dataLabel.animate({
x: newPointObj.point.dataLabel.alignAttr.x,
y: newPointObj.point.dataLabel.alignAttr.y,
opacity: 0.4
}, animation);
}
}
}
});
// Make sure point is faded in.
syncTimeout(function () {
if (!isCbHandled) {
fadeInNewPointAndDestoryOld(newPointObj, oldPoints, animation, 0.85);
}
}, animDuration);
if (!isOldPointGrahic) {
syncTimeout(function () {
fadeInNewPointAndDestoryOld(newPointObj, oldPoints, animation, 0.1);
}, animDuration / 2);
}
}
}
};
Scatter.prototype.getGridOffset = function () {
var series = this,
chart = series.chart,
xAxis = series.xAxis,
yAxis = series.yAxis,
plotLeft = 0,
plotTop = 0;
if (series.dataMinX && series.dataMaxX) {
plotLeft = xAxis.reversed ?
xAxis.toPixels(series.dataMaxX) : xAxis.toPixels(series.dataMinX);
}
else {
plotLeft = chart.plotLeft;
}
if (series.dataMinY && series.dataMaxY) {
plotTop = yAxis.reversed ?
yAxis.toPixels(series.dataMinY) : yAxis.toPixels(series.dataMaxY);
}
else {
plotTop = chart.plotTop;
}
return { plotLeft: plotLeft, plotTop: plotTop };
};
Scatter.prototype.getScaledGridSize = function (options) {
var series = this,
xAxis = series.xAxis,
search = true,
k = 1,
divider = 1,
processedGridSize = options.processedGridSize ||
clusterDefaultOptions.layoutAlgorithm.gridSize,
gridSize,
scale,
level;
if (!series.gridValueSize) {
series.gridValueSize = Math.abs(xAxis.toValue(processedGridSize) - xAxis.toValue(0));
}
gridSize = xAxis.toPixels(series.gridValueSize) - xAxis.toPixels(0);
scale = +(processedGridSize / gridSize).toFixed(14);
// Find the level and its divider.
while (search && scale !== 1) {
level = Math.pow(2, k);
if (scale > 0.75 && scale < 1.25) {
search = false;
}
else if (scale >= (1 / level) && scale < 2 * (1 / level)) {
search = false;
divider = level;
}
else if (scale <= level && scale > level / 2) {
search = false;
divider = 1 / level;
}
k++;
}
return (processedGridSize / divider) / scale;
};
Scatter.prototype.getRealExtremes = function () {
var _a,
_b;
var series = this,
chart = series.chart,
xAxis = series.xAxis,
yAxis = series.yAxis,
realMinX = xAxis ? xAxis.toValue(chart.plotLeft) : 0,
realMaxX = xAxis ?
xAxis.toValue(chart.plotLeft + chart.plotWidth) : 0,
realMinY = yAxis ? yAxis.toValue(chart.plotTop) : 0,
realMaxY = yAxis ?
yAxis.toValue(chart.plotTop + chart.plotHeight) : 0;
if (realMinX > realMaxX) {
_a = [realMinX, realMaxX], realMaxX = _a[0], realMinX = _a[1];
}
if (realMinY > realMaxY) {
_b = [realMinY, realMaxY], realMaxY = _b[0], realMinY = _b[1];
}
return {
minX: realMinX,
maxX: realMaxX,
minY: realMinY,
maxY: realMaxY
};
};
Scatter.prototype.onDrillToCluster = function (event) {
var point = event.point || event.target;
point.firePointEvent('drillToCluster', event, function (e) {
var _a,
_b;
var point = e.point || e.target,
series = point.series,
xAxis = point.series.xAxis,
yAxis = point.series.yAxis,
chart = point.series.chart,
clusterOptions = series.options.cluster,
drillToCluster = (clusterOptions || {}).drillToCluster,
offsetX,
offsetY,
sortedDataX,
sortedDataY,
minX,
minY,
maxX,
maxY;
if (drillToCluster && point.clusteredData) {
sortedDataX = point.clusteredData.map(function (data) {
return data.x;
}).sort(function (a, b) { return a - b; });
sortedDataY = point.clusteredData.map(function (data) {
return data.y;
}).sort(function (a, b) { return a - b; });
minX = sortedDataX[0];
maxX = sortedDataX[sortedDataX.length - 1];
minY = sortedDataY[0];
maxY = sortedDataY[sortedDataY.length - 1];
offsetX = Math.abs((maxX - minX) * 0.1);
offsetY = Math.abs((maxY - minY) * 0.1);
chart.pointer.zoomX = true;
chart.pointer.zoomY = true;
// Swap when minus values.
if (minX > maxX) {
_a = [maxX, minX], minX = _a[0], maxX = _a[1];
}
if (minY > maxY) {
_b = [maxY, minY], minY = _b[0], maxY = _b[1];
}
chart.zoom({
originalEvent: e,
xAxis: [{
axis: xAxis,
min: minX - offsetX,
max: maxX + offsetX
}],
yAxis: [{
axis: yAxis,
min: minY - offsetY,
max: maxY + offsetY
}]
});
}
});
};
Scatter.prototype.getClusterDistancesFromPoint = function (clusters, pointX, pointY) {
var series = this,
xAxis = series.xAxis,
yAxis = series.yAxis,
pointClusterDistance = [],
j,
distance;
for (j = 0; j < clusters.length; j++) {
distance = Math.sqrt(Math.pow(xAxis.toPixels(pointX) -
xAxis.toPixels(clusters[j].posX), 2) +
Math.pow(yAxis.toPixels(pointY) -
yAxis.toPixels(clusters[j].posY), 2));
pointClusterDistance.push({
clusterIndex: j,
distance: distance
});
}
return pointClusterDistance.sort(function (a, b) { return a.distance - b.distance; });
};
// Point state used when animation is enabled to compare
// and bind old points with new ones.
Scatter.prototype.getPointsState = function (clusteredData, oldMarkerClusterInfo, dataLength) {
var oldDataStateArr = oldMarkerClusterInfo ?
getDataState(oldMarkerClusterInfo,
dataLength) : [],
newDataStateArr = getDataState(clusteredData,
dataLength),
state = {},
newState,
oldState,
i;
// Clear global array before populate with new ids.
oldPointsStateId = [];
// Build points state structure.
clusteredData.clusters.forEach(function (cluster) {
state[cluster.stateId] = {
x: cluster.x,
y: cluster.y,
id: cluster.stateId,
point: cluster.point,
parentsId: []
};
});
clusteredData.noise.forEach(function (noise) {
state[noise.stateId] = {
x: noise.x,
y: noise.y,
id: noise.stateId,
point: noise.point,
parentsId: []
};
});
// Bind new and old state.
for (i = 0; i < newDataStateArr.length; i++) {
newState = newDataStateArr[i];
oldState = oldDataStateArr[i];
if (newState &&
oldState &&
newState.parentStateId &&
oldState.parentStateId &&
state[newState.parentStateId] &&
state[newState.parentStateId].parentsId.indexOf(oldState.parentStateId) === -1) {
state[newState.parentStateId].parentsId.push(oldState.parentStateId);
if (oldPointsStateId.indexOf(oldState.parentStateId) === -1) {
oldPointsStateId.push(oldState.parentStateId);
}
}
}
return state;
};
Scatter.prototype.markerClusterAlgorithms = {
grid: function (dataX, dataY, dataIndexes, options) {
var series = this,
xAxis = series.xAxis,
yAxis = series.yAxis,
grid = {},
gridOffset = series.getGridOffset(),
scaledGridSize,
x,
y,
gridX,
gridY,
key,
i;
// drawGridLines(series, options);
scaledGridSize = series.getScaledGridSize(options);
for (i = 0; i < dataX.length; i++) {
x = xAxis.toPixels(dataX[i]) - gridOffset.plotLeft;
y = yAxis.toPixels(dataY[i]) - gridOffset.plotTop;
gridX = Math.floor(x / scaledGridSize);
gridY = Math.floor(y / scaledGridSize);
key = gridY + '-' + gridX;
if (!grid[key]) {
grid[key] = [];
}
grid[key].push({
dataIndex: dataIndexes[i],
x: dataX[i],
y: dataY[i]
});
}
return grid;
},
kmeans: function (dataX, dataY, dataIndexes, options) {
var series = this,
clusters = [],
noise = [],
group = {},
pointMaxDistance = options.processedDistance ||
clusterDefaultOptions.layoutAlgorithm.distance,
iterations = options.iterations,
// Max pixel difference beetwen new and old cluster position.
maxClusterShift = 1,
currentIteration = 0,
repeat = true,
pointX = 0,
pointY = 0,
tempPos,
pointClusterDistance = [],
groupedData,
key,
i,
j;
options.processedGridSize = options.processedDistance;
// Use grid method to get groupedData object.
groupedData = series.markerClusterAlgorithms ?
series.markerClusterAlgorithms.grid.call(series, dataX, dataY, dataIndexes, options) : {};
// Find clusters amount and its start positions
// based on grid grouped data.
for (key in groupedData) {
if (groupedData[key].length > 1) {
tempPos = getClusterPosition(groupedData[key]);
clusters.push({
posX: tempPos.x,
posY: tempPos.y,
oldX: 0,
oldY: 0,
startPointsLen: groupedData[key].length,
points: []
});
}
}
// Start kmeans iteration process.
while (repeat) {
clusters.map(function (c) {
c.points.length = 0;
return c;
});
noise.length = 0;
for (i = 0; i < dataX.length; i++) {
pointX = dataX[i];
pointY = dataY[i];
pointClusterDistance = series.getClusterDistancesFromPoint(clusters, pointX, pointY);
if (pointClusterDistance.length &&
pointClusterDistance[0].distance < pointMaxDistance) {
clusters[pointClusterDistance[0].clusterIndex].points.push({
x: pointX,
y: pointY,
dataIndex: dataIndexes[i]
});
}
else {
noise.push({
x: pointX,
y: pointY,
dataIndex: dataIndexes[i]
});
}
}
// When cluster points array has only one point the
// point should be classified again.
for (j = 0; j < clusters.length; j++) {
if (clusters[j].points.length === 1) {
pointClusterDistance = series.getClusterDistancesFromPoint(clusters, clusters[j].points[0].x, clusters[j].points[0].y);
if (pointClusterDistance[1].distance < pointMaxDistance) {
// Add point to the next closest cluster.
clusters[pointClusterDistance[1].clusterIndex].points
.push(clusters[j].points[0]);
// Clear points array.
clusters[pointClusterDistance[0].clusterIndex]
.points.length = 0;
}
}
}
// Compute a new clusters position and check if it
// is different than the old one.
repeat = false;
for (j = 0; j < clusters.length; j++) {
tempPos = getClusterPosition(clusters[j].points);
clusters[j].oldX = clusters[j].posX;
clusters[j].oldY = clusters[j].posY;
clusters[j].posX = tempPos.x;
clusters[j].posY = tempPos.y;
// Repeat the algorithm if at least one cluster
// is shifted more than maxClusterShift property.
if (clusters[j].posX > clusters[j].oldX + maxClusterShift ||
clusters[j].posX < clusters[j].oldX - maxClusterShift ||
clusters[j].posY > clusters[j].oldY + maxClusterShift ||
clusters[j].posY < clusters[j].oldY - maxClusterShift) {
repeat = true;
}
}
// If iterations property is set repeat the algorithm
// specified amount of times.
if (iterations) {
repeat = currentIteration < iterations - 1;
}
currentIteration++;
}
clusters.forEach(function (cluster, i) {
group['cluster' + i] = cluster.points;
});
noise.forEach(function (noise, i) {
group['noise' + i] = [noise];
});
return group;
},
optimizedKmeans: function (processedXData, processedYData, dataIndexes, options) {
var series = this,
xAxis = series.xAxis,
yAxis = series.yAxis,
pointMaxDistance = options.processedDistance ||
clusterDefaultOptions.layoutAlgorithm.gridSize,
group = {},
extremes = series.getRealExtremes(),
clusterMarkerOptions = (series.options.cluster || {}).marker,
offset,
distance,
radius;
if (!series.markerClusterInfo || (series.initMaxX && series.initMaxX < extremes.maxX ||
series.initMinX && series.initMinX > extremes.minX ||
series.initMaxY && series.initMaxY < extremes.maxY ||
series.initMinY && series.initMinY > extremes.minY)) {
series.initMaxX = extremes.maxX;
series.initMinX = extremes.minX;
series.initMaxY = extremes.maxY;
series.initMinY = extremes.minY;
group = series.markerClusterAlgorithms ?
series.markerClusterAlgorithms.kmeans.call(series, processedXData, processedYData, dataIndexes, options) : {};
series.baseClusters = null;
}
else {
if (!series.baseClusters) {
series.baseClusters = {
clusters: series.markerClusterInfo.clusters,
noise: series.markerClusterInfo.noise
};
}
series.baseClusters.clusters.forEach(function (cluster) {
cluster.pointsOutside = [];
cluster.pointsInside = [];
cluster.data.forEach(function (dataPoint) {
distance = Math.sqrt(Math.pow(xAxis.toPixels(dataPoint.x) -
xAxis.toPixels(cluster.x), 2) +
Math.pow(yAxis.toPixels(dataPoint.y) -
yAxis.toPixels(cluster.y), 2));
if (cluster.clusterZone &&
cluster.clusterZone.marker &&
cluster.clusterZone.marker.radius) {
radius = cluster.clusterZone.marker.radius;
}
else if (clusterMarkerOptions &&
clusterMarkerOptions.radius) {
radius = clusterMarkerOptions.radius;
}
else {
radius = clusterDefaultOptions.marker.radius;
}
offset = pointMaxDistance - radius >= 0 ?
pointMaxDistance - radius : radius;
if (distance > radius + offset &&
defined(cluster.pointsOutside)) {
cluster.pointsOutside.push(dataPoint);
}
else if (defined(cluster.pointsInside)) {
cluster.pointsInside.push(dataPoint);
}
});
if (cluster.pointsInside.length) {
group[cluster.id] = cluster.pointsInside;
}
cluster.pointsOutside.forEach(function (p, i) {
group[cluster.id + '_noise' + i] = [p];
});
});
series.baseClusters.noise.forEach(function (noise) {
group[noise.id] = noise.data;
});
}
return group;
}
};
Scatter.prototype.preventClusterCollisions = function (props) {
var series = this,
xAxis = series.xAxis,
yAxis = series.yAxis,
_a = props.key.split('-').map(parseFloat),
gridY = _a[0],
gridX = _a[1],
gridSize = props.gridSize,
groupedData = props.groupedData,
defaultRadius = props.defaultRadius,
clusterRadius = props.clusterRadius,
gridXPx = gridX * gridSize,
gridYPx = gridY * gridSize,
xPixel = xAxis.toPixels(props.x),
yPixel = yAxis.toPixels(props.y),
gridsToCheckCollision = [],
pointsLen = 0,
radius = 0,
clusterMarkerOptions = (series.options.cluster || {}).marker,
zoneOptions = (series.options.cluster || {}).zones,
gridOffset = series.getGridOffset(),
nextXPixel,
nextYPixel,
signX,
signY,
cornerGridX,
cornerGridY,
i,
j,
itemX,
itemY,
nextClusterPos,
maxDist,
keys,
x,
y;
// Distance to the grid start.
xPixel -= gridOffset.plotLeft;
yPixel -= gridOffset.plotTop;
for (i = 1; i < 5; i++) {
signX = i % 2 ? -1 : 1;
signY = i < 3 ? -1 : 1;
cornerGridX = Math.floor((xPixel + signX * clusterRadius) / gridSize);
cornerGridY = Math.floor((yPixel + signY * clusterRadius) / gridSize);
keys = [
cornerGridY + '-' + cornerGridX,
cornerGridY + '-' + gridX,
gridY + '-' + cornerGridX
];
for (j = 0; j < keys.length; j++) {
if (gridsToCheckCollision.indexOf(keys[j]) === -1 &&
keys[j] !== props.key) {
gridsToCheckCollision.push(keys[j]);
}
}
}
gridsToCheckCollision.forEach(function (item) {
var _a;
if (groupedData[item]) {
// Cluster or noise position is already computed.
if (!groupedData[item].posX) {
nextClusterPos = getClusterPosition(groupedData[item]);
groupedData[item].posX = nextClusterPos.x;
groupedData[item].posY = nextClusterPos.y;
}
nextXPixel = xAxis.toPixels(groupedData[item].posX || 0) -
gridOffset.plotLeft;
nextYPixel = yAxis.toPixels(groupedData[item].posY || 0) -
gridOffset.plotTop;
_a = item.split('-').map(parseFloat), itemY = _a[0], itemX = _a[1];
if (zoneOptions) {
pointsLen = groupedData[item].length;
for (i = 0; i < zoneOptions.length; i++) {
if (pointsLen >= zoneOptions[i].from &&
pointsLen <= zoneOptions[i].to) {
if (defined((zoneOptions[i].marker || {}).radius)) {
radius = zoneOptions[i].marker.radius || 0;
}
else if (clusterMarkerOptions &&
clusterMarkerOptions.radius) {
radius = clusterMarkerOptions.radius;
}
else {
radius = clusterDefaultOptions.marker.radius;
}
}
}
}
if (groupedData[item].length > 1 &&
radius === 0 &&
clusterMarkerOptions &&
clusterMarkerOptions.radius) {
radius = clusterMarkerOptions.radius;
}
else if (groupedData[item].length === 1) {
radius = defaultRadius;
}
maxDist = clusterRadius + radius;
radius = 0;
if (itemX !== gridX &&
Math.abs(xPixel - nextXPixel) < maxDist) {
xPixel = itemX - gridX < 0 ? gridXPx + clusterRadius :
gridXPx + gridSize - clusterRadius;
}
if (itemY !== gridY &&
Math.abs(yPixel - nextYPixel) < maxDist) {
yPixel = itemY - gridY < 0 ? gridYPx + clusterRadius :
gridYPx + gridSize - clusterRadius;
}
}
});
x = xAxis.toValue(xPixel + gridOffset.plotLeft);
y = yAxis.toValue(yPixel + gridOffset.plotTop);
groupedData[props.key].posX = x;
groupedData[props.key].posY = y;
return { x: x, y: y };
};
// Check if user algorithm result is valid groupedDataObject.
Scatter.prototype.isValidGroupedDataObject = function (groupedData) {
var result = false,
i;
if (!isObject(groupedData)) {
return false;
}
objectEach(groupedData, function (elem) {
result = true;
if (!isArray(elem) || !elem.length) {
result = false;
return;
}
for (i = 0; i < elem.length; i++) {
if (!isObject(elem[i]) || (!elem[i].x || !elem[i].y)) {
result = false;
return;
}
}
});
return result;
};
Scatter.prototype.getClusteredData = function (groupedData, options) {
var series = this,
groupedXData = [],
groupedYData = [],
clusters = [], // Container for clusters.
noise = [], // Container for points not belonging to any cluster.
groupMap = [],
index = 0,
// Prevent minimumClusterSize lower than 2.
minimumClusterSize = Math.max(2,
options.minimumClusterSize || 2),
stateId,
point,
points,
pointUserOptions,
pointsLen,
marker,
clusterPos,
pointOptions,
clusterTempPos,
zoneOptions,
clusterZone,
clusterZoneClassName,
i,
k;
// Check if groupedData is valid when user uses a custom algorithm.
if (isFunction(options.layoutAlgorithm.type) &&
!series.isValidGroupedDataObject(groupedData)) {
error('Highcharts marker-clusters module: ' +
'The custom algorithm result is not valid!', false, series.chart);
return false;
}
for (k in groupedData) {
if (groupedData[k].length >= minimumClusterSize) {
points = groupedData[k];
stateId = getStateId();
pointsLen = points.length;
// Get zone options for cluster.
if (options.zones) {
for (i = 0; i < options.zones.length; i++) {
if (pointsLen >= options.zones[i].from &&
pointsLen <= options.zones[i].to) {
clusterZone = options.zones[i];
clusterZone.zoneIndex = i;
zoneOptions = options.zones[i].marker;
clusterZoneClassName = options.zones[i].className;
}
}
}
clusterTempPos = getClusterPosition(points);
if (options.layoutAlgorithm.type === 'grid' &&
!options.allowOverlap) {
marker = series.options.marker || {};
clusterPos = series.preventClusterCollisions({
x: clusterTempPos.x,
y: clusterTempPos.y,
key: k,
groupedData: groupedData,
gridSize: series.getScaledGridSize(options.layoutAlgorithm),
defaultRadius: marker.radius || 3 + (marker.lineWidth || 0),
clusterRadius: (zoneOptions && zoneOptions.radius) ?
zoneOptions.radius :
(options.marker || {}).radius ||
clusterDefaultOptions.marker.radius
});
}
else {
clusterPos = {
x: clusterTempPos.x,
y: clusterTempPos.y
};
}
for (i = 0; i < pointsLen; i++) {
points[i].parentStateId = stateId;
}
clusters.push({
x: clusterPos.x,
y: clusterPos.y,
id: k,
stateId: stateId,
index: index,
data: points,
clusterZone: clusterZone,
clusterZoneClassName: clusterZoneClassName
});
groupedXData.push(clusterPos.x);
groupedYData.push(clusterPos.y);
groupMap.push({
options: {
formatPrefix: 'cluster',
dataLabels: options.dataLabels,
marker: merge(options.marker, {
states: options.states
}, zoneOptions || {})
}
});
// Save cluster data points options.
if (series.options.data && series.options.data.length) {
for (i = 0; i < pointsLen; i++) {
if (isObject(series.options.data[points[i].dataIndex])) {
points[i].options =
series.options.data[points[i].dataIndex];
}
}
}
index++;
zoneOptions = null;
}
else {
for (i = 0; i < groupedData[k].length; i++) {
// Points not belonging to any cluster.
point = groupedData[k][i];
stateId = getStateId();
pointOptions = null;
pointUserOptions =
((series.options || {}).data || [])[point.dataIndex];
groupedXData.push(point.x);
groupedYData.push(point.y);
point.parentStateId = stateId;
noise.push({
x: point.x,
y: point.y,
id: k,
stateId: stateId,
index: index,
data: groupedData[k]
});
if (pointUserOptions &&
typeof pointUserOptions === 'object' &&
!isArray(pointUserOptions)) {
pointOptions = merge(pointUserOptions, { x: point.x, y: point.y });
}
else {
pointOptions = {
userOptions: pointUserOptions,
x: point.x,
y: point.y
};
}
groupMap.push({ options: pointOptions });
index++;
}
}
}
return {
clusters: clusters,
noise: noise,
groupedXData: groupedXData,
groupedYData: groupedYData,
groupMap: groupMap
};
};
// Destroy clustered data points.
Scatter.prototype.destroyClusteredData = function () {
var clusteredSeriesData = this.markerClusterSeriesData;
// Clear previous groups.
(clusteredSeriesData || []).forEach(function (point) {
if (point && point.destroy) {
point.destroy();
}
});
this.markerClusterSeriesData = null;
};
// Hide clustered data points.
Scatter.prototype.hideClusteredData = function () {
var series = this,
clusteredSeriesData = this.markerClusterSeriesData,
oldState = ((series.markerClusterInfo || {}).pointsState || {}).oldState || {},
oldPointsId = oldPointsStateId.map(function (elem) {
return (oldState[elem].point || {}).id || '';
});
(clusteredSeriesData || []).forEach(function (point) {
// If an old point is used in animation hide it, otherwise destroy.
if (point &&
oldPointsId.indexOf(point.id) !== -1) {
if (point.graphic) {
point.graphic.hide();
}
if (point.dataLabel) {
point.dataLabel.hide();
}
}
else {
if (point && point.destroy) {
point.destroy();
}
}
});
};
// Override the generatePoints method by adding a reference to grouped data.
Scatter.prototype.generatePoints = function () {
var series = this,
chart = series.chart,
xAxis = series.xAxis,
yAxis = series.yAxis,
clusterOptions = series.options.cluster,
realExtremes = series.getRealExtremes(),
visibleXData = [],
visibleYData = [],
visibleDataIndexes = [],
oldPointsState,
oldDataLen,
oldMarkerClusterInfo,
kmeansThreshold,
cropDataOffsetX,
cropDataOffsetY,
seriesMinX,
seriesMaxX,
seriesMinY,
seriesMaxY,
type,
algorithm,
clusteredData,
groupedData,
layoutAlgOptions,
point,
i;
if (clusterOptions &&
clusterOptions.enabled &&
series.xData &&
series.yData &&
!chart.polar) {
type = clusterOptions.layoutAlgorithm.type;
layoutAlgOptions = clusterOptions.layoutAlgorithm;
// Get processed algorithm properties.
layoutAlgOptions.processedGridSize = relativeLength(layoutAlgOptions.gridSize ||
clusterDefaultOptions.layoutAlgorithm.gridSize, chart.plotWidth);
layoutAlgOptions.processedDistance = relativeLength(layoutAlgOptions.distance ||
clusterDefaultOptions.layoutAlgorithm.distance, chart.plotWidth);
kmeansThreshold = layoutAlgOptions.kmeansThreshold ||
clusterDefaultOptions.layoutAlgorithm.kmeansThreshold;
// Offset to prevent cluster size changes.
cropDataOffsetX = Math.abs(xAxis.toValue(layoutAlgOptions.processedGridSize / 2) -
xAxis.toValue(0));
cropDataOffsetY = Math.abs(yAxis.toValue(layoutAlgOptions.processedGridSize / 2) -
yAxis.toValue(0));
// Get only visible data.
for (i = 0; i < series.xData.length; i++) {
if (!series.dataMaxX) {
if (!defined(seriesMaxX) ||
!defined(seriesMinX) ||
!defined(seriesMaxY) ||
!defined(seriesMinY)) {
seriesMaxX = seriesMinX = series.xData[i];
seriesMaxY = seriesMinY = series.yData[i];
}
else if (isNumber(series.yData[i]) &&
isNumber(seriesMaxY) &&
isNumber(seriesMinY)) {
seriesMaxX = Math.max(series.xData[i], seriesMaxX);
seriesMinX = Math.min(series.xData[i], seriesMinX);
seriesMaxY = Math.max(series.yData[i] || seriesMaxY, seriesMaxY);
seriesMinY = Math.min(series.yData[i] || seriesMinY, seriesMinY);
}
}
// Crop data to visible ones with appropriate offset to prevent
// cluster size changes on the edge of the plot area.
if (series.xData[i] >= (realExtremes.minX - cropDataOffsetX) &&
series.xData[i] <= (realExtremes.maxX + cropDataOffsetX) &&
(series.yData[i] || realExtremes.minY) >=
(realExtremes.minY - cropDataOffsetY) &&
(series.yData[i] || realExtremes.maxY) <=
(realExtremes.maxY + cropDataOffsetY)) {
visibleXData.push(series.xData[i]);
visibleYData.push(series.yData[i]);
visibleDataIndexes.push(i);
}
}
// Save data max values.
if (defined(seriesMaxX) && defined(seriesMinX) &&
isNumber(seriesMaxY) && isNumber(seriesMinY)) {
series.dataMaxX = seriesMaxX;
series.dataMinX = seriesMinX;
series.dataMaxY = seriesMaxY;
series.dataMinY = seriesMinY;
}
if (isFunction(type)) {
algorithm = type;
}
else if (series.markerClusterAlgorithms) {
if (type && series.markerClusterAlgorithms[type]) {
algorithm = series.markerClusterAlgorithms[type];
}
else {
algorithm = visibleXData.length < kmeansThreshold ?
series.markerClusterAlgorithms.kmeans :
series.markerClusterAlgorithms.grid;
}
}
else {
algorithm = function () {
return false;
};
}
groupedData = algorithm.call(this, visibleXData, visibleYData, visibleDataIndexes, layoutAlgOptions);
clusteredData = groupedData ? series.getClusteredData(groupedData, clusterOptions) : groupedData;
// When animation is enabled get old points state.
if (clusterOptions.animation &&
series.markerClusterInfo &&
series.markerClusterInfo.pointsState &&
series.markerClusterInfo.pointsState.oldState) {
// Destroy old points.
destroyOldPoints(series.markerClusterInfo.pointsState.oldState);
oldPointsState = series.markerClusterInfo.pointsState.newState;
}
else {
oldPointsState = {};
}
// Save points old state info.
oldDataLen = series.xData.length;
oldMarkerClusterInfo = series.markerClusterInfo;
if (clusteredData) {
series.processedXData = clusteredData.groupedXData;
series.processedYData = clusteredData.groupedYData;
series.hasGroupedData = true;
series.markerClusterInfo = clusteredData;
series.groupMap = clusteredData.groupMap;
}
baseGeneratePoints.apply(this);
if (clusteredData && series.markerClusterInfo) {
// Mark cluster points. Safe point reference in the cluster object.
(series.markerClusterInfo.clusters || []).forEach(function (cluster) {
point = series.points[cluster.index];
point.isCluster = true;
point.clusteredData = cluster.data;
point.clusterPointsAmount = cluster.data.length;
cluster.point = point;
// Add zoom to cluster range.
addEvent(point, 'click', series.onDrillToCluster);
});
// Safe point reference in the noise object.
(series.markerClusterInfo.noise || []).forEach(function (noise) {
noise.point = series.points[noise.index];
});
// When animation is enabled save points state.
if (clusterOptions.animation &&
series.markerClusterInfo) {
series.markerClusterInfo.pointsState = {
oldState: oldPointsState,
newState: series.getPointsState(clusteredData, oldMarkerClusterInfo, oldDataLen)
};
}
// Record grouped data in order to let it be destroyed the next time
// processData runs.
if (!clusterOptions.animation) {
this.destroyClusteredData();
}
else {
this.hideClusteredData();
}
this.markerClusterSeriesData =
this.hasGroupedData ? this.points : null;
}
}
else {
baseGeneratePoints.apply(this);
}
};
// Handle animation.
addEvent(Chart, 'render', function () {
var chart = this;
(chart.series || []).forEach(function (series) {
if (series.markerClusterInfo) {
var options = series.options.cluster,
pointsState = (series.markerClusterInfo || {}).pointsState,
oldState = (pointsState || {}).oldState;
if ((options || {}).animation &&
series.markerClusterInfo &&
series.chart.pointer.pinchDown.length === 0 &&
(series.xAxis.eventArgs || {}).trigger !== 'pan' &&
oldState &&
Object.keys(oldState).length) {
series.markerClusterInfo.clusters.forEach(function (cluster) {
series.animateClusterPoint(cluster);
});
series.markerClusterInfo.noise.forEach(function (noise) {
series.animateClusterPoint(noise);
});
}
}
});
});
// Override point prototype to throw a warning when trying to update
// clustered point.
addEvent(Point, 'update', function () {
if (this.dataGroup) {
error('Highcharts marker-clusters module: ' +
'Running `Point.update` when point belongs to clustered series' +
' is not supported.', false, this.series.chart);
return false;
}
});
// Destroy grouped data on series destroy.
addEvent(Series, 'destroy', Scatter.prototype.destroyClusteredData);
// Add classes, change mouse cursor.
addEvent(Series, 'afterRender', function () {
var series = this,
clusterZoomEnabled = (series.options.cluster || {}).drillToCluster;
if (series.markerClusterInfo && series.markerClusterInfo.clusters) {
series.markerClusterInfo.clusters.forEach(function (cluster) {
if (cluster.point && cluster.point.graphic) {
cluster.point.graphic.addClass('highcharts-cluster-point');
// Change cursor to pointer when drillToCluster is enabled.
if (clusterZoomEnabled && cluster.point) {
cluster.point.graphic.css({
cursor: 'pointer'
});
if (cluster.point.dataLabel) {
cluster.point.dataLabel.css({
cursor: 'pointer'
});
}
}
if (defined(cluster.clusterZone)) {
cluster.point.graphic.addClass(cluster.clusterZoneClassName ||
'highcharts-cluster-zone-' +
cluster.clusterZone.zoneIndex);
}
}
});
}
});
addEvent(Point, 'drillToCluster', function (event) {
var point = event.point || event.target,
series = point.series,
clusterOptions = series.options.cluster,
onDrillToCluster = ((clusterOptions || {}).events || {}).drillToCluster;
if (isFunction(onDrillToCluster)) {
onDrillToCluster.call(this, event);
}
});
// Destroy the old tooltip after zoom.
addEvent(Axis, 'setExtremes', function () {
var chart = this.chart,
animationDuration = 0,
animation;
chart.series.forEach(function (series) {
if (series.markerClusterInfo) {
animation = animObject((series.options.cluster || {}).animation);
animationDuration = animation.duration || 0;
}
});
syncTimeout(function () {
if (chart.tooltip) {
chart.tooltip.destroy();
}
}, animationDuration);
});
});
_registerModule(_modules, 'masters/modules/marker-clusters.src.js', [], function () {
});
})); | mit |
cmaoling/portfolio | name.abuchen.portfolio.tests/src/name/abuchen/portfolio/snapshot/AggregationTest.java | 3118 | package name.abuchen.portfolio.snapshot;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import java.time.LocalDate;
import java.util.Locale;
import org.junit.Test;
public class AggregationTest
{
@Test
public void testWeekly()
{
// first day of week is locale dependent
Locale locale = Locale.getDefault();
Locale.setDefault(Locale.GERMANY);
try
{
assertThat(Aggregation.Period.WEEKLY.getStartDateFor(LocalDate.of(2011, 10, 17)), //
is(LocalDate.of(2011, 10, 17)));
assertThat(Aggregation.Period.WEEKLY.getStartDateFor(LocalDate.of(2012, 1, 13)), //
is(LocalDate.of(2012, 1, 9)));
assertThat(Aggregation.Period.WEEKLY.getStartDateFor(LocalDate.of(2012, 8, 10)), //
is(LocalDate.of(2012, 8, 6)));
assertThat(Aggregation.Period.WEEKLY.getStartDateFor(LocalDate.of(2012, 9, 23)), //
is(LocalDate.of(2012, 9, 17)));
}
finally
{
Locale.setDefault(locale);
}
}
@Test
public void testMonthly()
{
assertThat(Aggregation.Period.MONTHLY.getStartDateFor(LocalDate.of(2011, 10, 17)), //
is(LocalDate.of(2011, 10, 1)));
assertThat(Aggregation.Period.MONTHLY.getStartDateFor(LocalDate.of(2012, 1, 13)), //
is(LocalDate.of(2012, 1, 1)));
assertThat(Aggregation.Period.MONTHLY.getStartDateFor(LocalDate.of(2012, 8, 10)), //
is(LocalDate.of(2012, 8, 1)));
assertThat(Aggregation.Period.MONTHLY.getStartDateFor(LocalDate.of(2012, 9, 23)), //
is(LocalDate.of(2012, 9, 1)));
}
@Test
public void testQuartlerly()
{
assertThat(Aggregation.Period.QUARTERLY.getStartDateFor(LocalDate.of(2011, 10, 17)), //
is(LocalDate.of(2011, 10, 1)));
assertThat(Aggregation.Period.QUARTERLY.getStartDateFor(LocalDate.of(2012, 1, 13)), //
is(LocalDate.of(2012, 1, 1)));
assertThat(Aggregation.Period.QUARTERLY.getStartDateFor(LocalDate.of(2012, 8, 10)), //
is(LocalDate.of(2012, 7, 1)));
assertThat(Aggregation.Period.QUARTERLY.getStartDateFor(LocalDate.of(2012, 9, 23)), //
is(LocalDate.of(2012, 7, 1)));
}
@Test
public void testYearly()
{
assertThat(Aggregation.Period.YEARLY.getStartDateFor(LocalDate.of(2011, 10, 17)), //
is(LocalDate.of(2011, 1, 1)));
assertThat(Aggregation.Period.YEARLY.getStartDateFor(LocalDate.of(2012, 1, 13)), //
is(LocalDate.of(2012, 1, 1)));
assertThat(Aggregation.Period.YEARLY.getStartDateFor(LocalDate.of(2012, 8, 10)), //
is(LocalDate.of(2012, 1, 1)));
assertThat(Aggregation.Period.YEARLY.getStartDateFor(LocalDate.of(2012, 9, 23)), //
is(LocalDate.of(2012, 1, 1)));
}
}
| epl-1.0 |
openhab/openhab2 | bundles/org.openhab.binding.milight/src/main/java/org/openhab/binding/milight/internal/handler/AbstractLedV3Handler.java | 2556 | /**
* Copyright (c) 2010-2020 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.milight.internal.handler;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.binding.milight.internal.MilightThingState;
import org.openhab.binding.milight.internal.protocol.QueueItem;
import org.openhab.binding.milight.internal.protocol.QueuedSend;
import org.openhab.core.thing.Thing;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* This class implements common functionality for Milight/Easybulb bulbs of protocol version 3.
* Most of the implementation is found in the specific bulb classes though.
* The class is state-less, use {@link MilightThingState} instead.
*
* @author David Graeff - Initial contribution
*/
@NonNullByDefault
public abstract class AbstractLedV3Handler extends AbstractLedHandler {
public static final int MAX_ANIM_MODES = 10;
protected final Logger logger = LoggerFactory.getLogger(AbstractLedV3Handler.class);
public AbstractLedV3Handler(Thing thing, QueuedSend sendQueue, int typeOffset) {
super(thing, sendQueue, typeOffset);
}
// we have to map [0,360] to [0,0xFF], where red equals hue=0 and the milight color 0xB0 (=176)
public static byte makeColor(int hue) {
int mHue = (360 + 248 - hue) % 360; // invert and shift
return (byte) (mHue * 255 / 360); // map to 256 values
}
@Override
public void setLedMode(int mode, MilightThingState state) {
// Not supported
}
@Override
public void setSaturation(int value, MilightThingState state) {
// Not supported
}
@Override
public void changeSaturation(int relativeSaturation, MilightThingState state) {
// Not supported
}
protected QueueItem createRepeatable(byte[] data) {
return QueueItem.createRepeatable(socket, delayTimeMS, repeatTimes, address, port, data);
}
protected QueueItem createRepeatable(int uidc, byte[] data) {
return new QueueItem(socket, uidc, data, true, delayTimeMS, repeatTimes, address, port);
}
protected QueueItem createNonRepeatable(byte[] data) {
return QueueItem.createNonRepeatable(socket, delayTimeMS, address, port, data);
}
}
| epl-1.0 |
ControlSystemStudio/cs-studio | applications/snl/snl-plugins/de.desy.language.snl/src/de/desy/language/snl/parser/parser/VariableParser.java | 1943 | package de.desy.language.snl.parser.parser;
import java.util.regex.Matcher;
import de.desy.language.snl.codeElements.PredefinedTypes;
import de.desy.language.snl.parser.Interval;
import de.desy.language.snl.parser.nodes.VariableNode;
public class VariableParser extends
AbstractOptimizedStatementParser<VariableNode> {
public VariableParser(Interval[] exclusions) {
super(exclusions);
}
@Override
protected String getPostPatternString() {
return "(\\s*;)";
}
@Override
protected String getPatternString() {
return getPrePatternString() + "([a-zA-Z_][0-9a-zA-Z_]*)(\\s*\\[\\s*\\d+\\s*\\])*"
+ getPostPatternString();
}
@Override
protected String getPrePatternString() {
final PredefinedTypes[] predefinedTypes = PredefinedTypes.values();
final StringBuffer typeBuffer = new StringBuffer(predefinedTypes[0]
.getElementName());
for (int i = 1; i < predefinedTypes.length; i++) {
final PredefinedTypes predefinedType = predefinedTypes[i];
if (!predefinedType.equals(PredefinedTypes.EVFLAG)) {
typeBuffer.append("|");
typeBuffer.append(predefinedType.getElementName());
}
}
return "(" + typeBuffer.toString() + ")(\\s+)";
}
@Override
protected void matchFound(final Matcher preMatcher,
final Matcher mainMatcher) {
this._statement = mainMatcher.group();
this._startOffSet = mainMatcher.start();
this._endOffSet = preMatcher.end() - 1;
final String type = mainMatcher.group(1);
final String varName = mainMatcher.group(3);
final boolean isArray = mainMatcher.group(4) != null;
this._found = true;
this._node = new VariableNode(varName, type, this
.getStartOffsetLastFound(), this.getEndOffsetLastFound(), isArray);
}
}
| epl-1.0 |
yuyf10/opendaylight-controller | opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/notify/NotificationPublishService.java | 1374 | /*
* Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
package org.opendaylight.controller.sal.core.api.notify;
import org.opendaylight.controller.sal.core.api.Broker;
import org.opendaylight.controller.sal.core.api.Provider;
import org.opendaylight.yangtools.yang.data.api.CompositeNode;
/**
* Notification Publishing Service
*
* The simplified process of the notification publishing is following:
*
* <ol>
* <li> {@link Provider} invokes {@link #sendNotification(CompositeNode)}
* <li> {@link Broker} finds {@link NotificationListener}s which subscribed for
* the notification type.
*
* <li>For each subscriber {@link Broker} invokes
* {@link NotificationListener#onNotification(CompositeNode)}
* </ol>
*/
public interface NotificationPublishService extends NotificationService {
/**
* Publishes a notification.
*
* Notification type is determined by the
* {@link CompositeNode#getNodeType()} of the
* <code>notification<code> parameter.
*
* @param notification
* Notification to publish
*/
void publish(CompositeNode notification);
}
| epl-1.0 |
ControlSystemStudio/cs-studio | applications/opibuilder/opibuilder-plugins/org.csstudio.opibuilder.alarm/doc/help-doc.html | 8376 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_25) on Tue Jul 30 19:09:30 JST 2013 -->
<title>API Help</title>
<meta name="date" content="2013-07-30">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="API Help";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="org/csstudio/opibuilder/scriptUtil/package-summary.html">Package</a></li>
<li>Class</li>
<li>Use</li>
<li><a href="org/csstudio/opibuilder/scriptUtil/package-tree.html">Tree</a></li>
<li><a href="deprecated-list.html">Deprecated</a></li>
<li><a href="index-files/index-1.html">Index</a></li>
<li class="navBarCell1Rev">Help</li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="index.html?help-doc.html" target="_top">Frames</a></li>
<li><a href="help-doc.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 class="title">How This API Document Is Organized</h1>
<div class="subTitle">This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.</div>
</div>
<div class="contentContainer">
<ul class="blockList">
<li class="blockList">
<h2>Package</h2>
<p>Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:</p>
<ul>
<li>Interfaces (italic)</li>
<li>Classes</li>
<li>Enums</li>
<li>Exceptions</li>
<li>Errors</li>
<li>Annotation Types</li>
</ul>
</li>
<li class="blockList">
<h2>Class/Interface</h2>
<p>Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:</p>
<ul>
<li>Class inheritance diagram</li>
<li>Direct Subclasses</li>
<li>All Known Subinterfaces</li>
<li>All Known Implementing Classes</li>
<li>Class/interface declaration</li>
<li>Class/interface description</li>
</ul>
<ul>
<li>Nested Class Summary</li>
<li>Field Summary</li>
<li>Constructor Summary</li>
<li>Method Summary</li>
</ul>
<ul>
<li>Field Detail</li>
<li>Constructor Detail</li>
<li>Method Detail</li>
</ul>
<p>Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.</p>
</li>
<li class="blockList">
<h2>Annotation Type</h2>
<p>Each annotation type has its own separate page with the following sections:</p>
<ul>
<li>Annotation Type declaration</li>
<li>Annotation Type description</li>
<li>Required Element Summary</li>
<li>Optional Element Summary</li>
<li>Element Detail</li>
</ul>
</li>
<li class="blockList">
<h2>Enum</h2>
<p>Each enum has its own separate page with the following sections:</p>
<ul>
<li>Enum declaration</li>
<li>Enum description</li>
<li>Enum Constant Summary</li>
<li>Enum Constant Detail</li>
</ul>
</li>
<li class="blockList">
<h2>Use</h2>
<p>Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.</p>
</li>
<li class="blockList">
<h2>Tree (Class Hierarchy)</h2>
<p>There is a <a href="overview-tree.html">Class Hierarchy</a> page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with <code>java.lang.Object</code>. The interfaces do not inherit from <code>java.lang.Object</code>.</p>
<ul>
<li>When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.</li>
<li>When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.</li>
</ul>
</li>
<li class="blockList">
<h2>Deprecated API</h2>
<p>The <a href="deprecated-list.html">Deprecated API</a> page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.</p>
</li>
<li class="blockList">
<h2>Index</h2>
<p>The <a href="index-files/index-1.html">Index</a> contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.</p>
</li>
<li class="blockList">
<h2>Prev/Next</h2>
<p>These links take you to the next or previous class, interface, package, or related page.</p>
</li>
<li class="blockList">
<h2>Frames/No Frames</h2>
<p>These links show and hide the HTML frames. All pages are available with or without frames.</p>
</li>
<li class="blockList">
<h2>All Classes</h2>
<p>The <a href="allclasses-noframe.html">All Classes</a> link shows all classes and interfaces except non-static nested types.</p>
</li>
<li class="blockList">
<h2>Serialized Form</h2>
<p>Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.</p>
</li>
<li class="blockList">
<h2>Constant Field Values</h2>
<p>The <a href="constant-values.html">Constant Field Values</a> page lists the static final fields and their values.</p>
</li>
</ul>
<em>This help file applies to API documentation generated using the standard doclet.</em></div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="org/csstudio/opibuilder/scriptUtil/package-summary.html">Package</a></li>
<li>Class</li>
<li>Use</li>
<li><a href="org/csstudio/opibuilder/scriptUtil/package-tree.html">Tree</a></li>
<li><a href="deprecated-list.html">Deprecated</a></li>
<li><a href="index-files/index-1.html">Index</a></li>
<li class="navBarCell1Rev">Help</li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="index.html?help-doc.html" target="_top">Frames</a></li>
<li><a href="help-doc.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
| epl-1.0 |
ignrodri/septalcurvature | src/CnicUiaSeptumCurvature/OsiriXAPI.framework/Versions/A/Headers/AnonymizationViewController.h | 1508 | /*=========================================================================
Program: OsiriX
Copyright (c) OsiriX Team
All rights reserved.
Distributed under GNU - LGPL
See http://www.osirix-viewer.com/copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
=========================================================================*/
#import <Cocoa/Cocoa.h>
@class N2AdaptiveBox, AnonymizationTagsView, DCMAttributeTag;
@interface AnonymizationViewController : NSViewController {
IBOutlet N2AdaptiveBox* annotationsBox;
IBOutlet NSPopUpButton* templatesPopup;
IBOutlet AnonymizationTagsView* tagsView;
IBOutlet NSButton* saveTemplateButton;
IBOutlet NSButton* deleteTemplateButton;
NSMutableArray* tags;
BOOL formatsAreOk;
}
@property(readonly) N2AdaptiveBox* annotationsBox;
@property(readonly) NSPopUpButton* templatesPopup;
@property(readonly) AnonymizationTagsView* tagsView;
@property(readonly,retain) NSMutableArray* tags; // do not add elements directly! use addTag and removeTag
@property(readonly) BOOL formatsAreOk;
-(id)initWithTags:(NSArray*)shownDcmTags values:(NSArray*)values;
-(void)adaptBoxToAnnotations;
-(void)addTag:(DCMAttributeTag*)tag;
-(void)removeTag:(DCMAttributeTag*)tag;
-(NSArray*)tagsValues;
-(void)setTagsValues:(NSArray*)t;
-(IBAction)saveTemplateAction:(id)sender;
-(IBAction)deleteTemplateAction:(id)sender;
@end
| epl-1.0 |
sistanlp/banner | src/main/java/edu/umass/cs/mallet/base/types/RankedFeatureVector.java | 6418 | /* Copyright (C) 2002 Univ. of Massachusetts Amherst, Computer Science Dept.
This file is part of "MALLET" (MAchine Learning for LanguagE Toolkit).
http://www.cs.umass.edu/~mccallum/mallet
This software is provided under the terms of the Common Public License,
version 1.0, as published by http://www.opensource.org. For further
information, see the file `LICENSE' included with this distribution. */
/**
A FeatureVector for which you can efficiently get the feature with
highest value, and other ranks.
@author Andrew McCallum <a href="mailto:[email protected]">[email protected]</a>
*/
package edu.umass.cs.mallet.base.types;
import edu.umass.cs.mallet.base.types.Label;
import edu.umass.cs.mallet.base.types.FeatureVector;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.PrintStream;
import java.io.OutputStream;
public class RankedFeatureVector extends FeatureVector
{
int[] rankOrder;
private static final int SORTINIT = -1;
int sortedTo = SORTINIT; /* Extent of latest sort */
public RankedFeatureVector (Alphabet dict,
int[] indices,
double[] values)
{
super (dict, indices, values);
}
public RankedFeatureVector (Alphabet dict, double[] values)
{
super (dict, values);
}
public RankedFeatureVector (Alphabet dict, DenseVector v)
{
this (dict, v.values);
}
public RankedFeatureVector (Alphabet dict, AugmentableFeatureVector v)
{
super (dict, v.indices, v.values, v.size, v.size,
true, true, true);
}
public RankedFeatureVector (Alphabet dict, SparseVector v)
{
super (dict, v.indices, v.values);
}
// xxx This bubble sort is a major inefficiency.
// Implement a O(n log(n)) method!
// No longer used!
protected void setRankOrder ()
{
this.rankOrder = new int[values.length];
for (int i = 0; i < rankOrder.length; i++) {
rankOrder[i] = i;
assert (!Double.isNaN(values[i]));
}
// BubbleSort from back
for (int i = rankOrder.length-1; i >= 0; i--) {
//if (i % 1000 == 0)
//System.out.println ("RankedFeatureVector.setRankOrder i="+i);
boolean swapped = false;
for (int j = 0; j < i; j++)
if (values[rankOrder[j]] < values[rankOrder[j+1]]) {
// swap
int r = rankOrder[j];
rankOrder[j] = rankOrder[j+1];
rankOrder[j+1] = r;
}
}
}
protected void setRankOrder (int extent, boolean reset)
{
int sortExtent;
// Set the number of cells to sort, making sure we don't go past the max.
// Since we are using insertion sort, sorting n-1 sorts the whole array.
sortExtent = (extent >= values.length) ? values.length - 1: extent;
if (sortedTo == SORTINIT || reset) { // reinitialize and sort
this.rankOrder = new int[values.length];
for (int i = 0; i < rankOrder.length; i++) {
rankOrder[i] = i;
assert (!Double.isNaN(values[i]));
}
}
// Selection sort
for (int i = sortedTo+1; i <= sortExtent; i++) {
double max = values[rankOrder[i]];
int maxIndex = i;
for(int j = i+1; j < rankOrder.length; j++) {
if (values[rankOrder[j]] > max) {
max = values[rankOrder[j]];
maxIndex = j;
}
}
//swap
int r = rankOrder[maxIndex];
rankOrder[maxIndex] = rankOrder[i];
rankOrder[i] = r;
sortedTo = i;
}
}
protected void setRankOrder (int extent) {
setRankOrder(extent, false);
}
public int getMaxValuedIndex ()
{
if (rankOrder == null)
setRankOrder (0);
return rankOrder[0];
}
public Object getMaxValuedObject ()
{
return dictionary.lookupObject (getMaxValuedIndex());
}
public int getMaxValuedIndexIn (FeatureSelection fs)
{
if (fs == null)
return getMaxValuedIndex();
assert (fs.getAlphabet() == dictionary);
// xxx Make this more efficient! I'm pretty sure that Java BitSet's can do this more efficiently
int i = 0;
while (!fs.contains(rankOrder[i])) {
setRankOrder (i);
i++;
}
//System.out.println ("RankedFeatureVector.getMaxValuedIndexIn feature="
//+dictionary.lookupObject(rankOrder[i]));
return rankOrder[i];
}
public Object getMaxValuedObjectIn (FeatureSelection fs)
{
return dictionary.lookupObject (getMaxValuedIndexIn(fs));
}
public double getMaxValue ()
{
if (rankOrder == null)
setRankOrder (0);
return values[rankOrder[0]];
}
public double getMaxValueIn (FeatureSelection fs)
{
if (fs == null)
return getMaxValue();
int i = 0;
while (!fs.contains(i)) {
setRankOrder (i);
i++;
}
return values[rankOrder[i]];
}
public int getIndexAtRank (int rank)
{
setRankOrder (rank);
return rankOrder[rank];
}
public Object getObjectAtRank (int rank)
{
setRankOrder (rank);
return dictionary.lookupObject (rankOrder[rank]);
}
public double getValueAtRank (int rank)
{
if (values == null)
return 1.0;
setRankOrder (rank);
if (rank >= rankOrder.length) {
rank = rankOrder.length -1;
System.err.println("rank larger than rankOrder.length. rank = " + rank + "rankOrder.length = " + rankOrder.length);
}
if (rankOrder[rank] >= values.length) {
System.err.println("rankOrder[rank] out of range.");
return 1.0;
}
return values[rankOrder[rank]];
}
/**
* Prints a human-readable version of this vector, with features listed in ranked order.
* @param out Stream to write to
*/
public void printByRank (OutputStream out)
{
printByRank(new PrintWriter (new OutputStreamWriter (out), true));
}
/**
* Prints a human-readable version of this vector, with features listed in ranked order.
* @param out Writer to write to
*/
public void printByRank (PrintWriter out)
{
for (int rank = 0; rank < numLocations (); rank++) {
int idx = getIndexAtRank (rank);
double val = getValueAtRank (rank);
Object obj = dictionary.lookupObject (idx);
out.println (obj+" "+val);
}
}
public int getRank (Object o)
{
throw new UnsupportedOperationException ("Not yet implemented");
}
public int getRank (int index)
{
throw new UnsupportedOperationException ("Not yet implemented");
}
public void set (int i, double v)
{
throw new UnsupportedOperationException (RankedFeatureVector.class.getName() + " is immutable");
}
public interface Factory
{
public RankedFeatureVector newRankedFeatureVector (InstanceList ilist);
}
public interface PerLabelFactory
{
public RankedFeatureVector[] newRankedFeatureVectors (InstanceList ilist);
}
}
| epl-1.0 |
bmaggi/Papyrus-SysML11 | tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnPrimitiveType.java | 6518 | /*****************************************************************************
* Copyright (c) 2011-2012 CEA LIST.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
*
* CEA LIST - Initial API and implementation
*
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
import org.junit.BeforeClass;
import org.junit.Test;
/**
* JUnit tests for element creation test (via palette tools) in a PrimitiveType.
*/
public class TestNodeCreationOnPrimitiveType extends AbstractTest {
public static View containerView;
@BeforeClass
public static void prepareContainerForTest() throws Exception {
try {
// force inherited provider loading...
createGraphicalNode(UMLElementTypes.PACKAGE, ElementTypes.PACKAGE.getSemanticHint(), getDiagramView());
createNodeFromPalette("blockdefinition.tool.primitivetype", getDiagramView(), true);
containerView = ViewUtil.getChildBySemanticHint(getDiagramView(), UMLGraphicalTypes.SHAPE_UML_PRIMITIVETYPE_AS_CLASSIFIER_ID);
if(containerView == null) {
throw new Exception("Unable to prepare container for test.");
}
} catch (Exception e) {
throw new Exception("Unable to prepare container for test.", e);
}
}
@Test
public void createActor() throws Exception {
createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
}
@Test
public void createActorPart() throws Exception {
createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
}
@Test
public void createBlock() throws Exception {
createNodeFromPalette("blockdefinition.tool.block", containerView, false);
}
@Test
public void createComment() throws Exception {
createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
}
@Test
public void createConstraint() throws Exception {
createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
}
@Test
public void createConstraintBlock() throws Exception {
createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
}
@Test
public void createConstraintProperty() throws Exception {
createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
}
@Test
public void createDataType() throws Exception {
createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
}
@Test
public void createDimension() throws Exception {
createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
}
@Test
public void createEnumeration() throws Exception {
createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
}
@Test
public void createEnumerationLiteral() throws Exception {
createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
}
@Test
public void createFlowPort() throws Exception {
createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
}
@Test
public void createFlowProperty() throws Exception {
createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
}
@Test
public void createFlowSpecification() throws Exception {
createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
}
@Test
public void createInstanceSpecification() throws Exception {
createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
}
@Test
public void createInterface() throws Exception {
createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
}
@Test
public void createModel() throws Exception {
createNodeFromPalette("blockdefinition.tool.model", containerView, false);
}
@Test
public void createOperation() throws Exception {
createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
}
@Test
public void createPackage() throws Exception {
createNodeFromPalette("blockdefinition.tool.package", containerView, false);
}
@Test
public void createPart() throws Exception {
createNodeFromPalette("blockdefinition.tool.part", containerView, false);
}
@Test
public void createPort() throws Exception {
createNodeFromPalette("blockdefinition.tool.port", containerView, false);
}
@Test
public void createPrimitiveType() throws Exception {
createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
}
@Test
public void createProperty() throws Exception {
createNodeFromPalette("blockdefinition.tool.property", containerView, false);
}
@Test
public void createReception() throws Exception {
createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
}
@Test
public void createReference() throws Exception {
createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
}
@Test
public void createSignal() throws Exception {
createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
}
@Test
public void createSlot() throws Exception {
createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
}
@Test
public void createUnit() throws Exception {
createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
}
@Test
public void createValue() throws Exception {
createNodeFromPalette("blockdefinition.tool.value", containerView, false);
}
@Test
public void createValueType() throws Exception {
createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
}
}
| epl-1.0 |
davidfestal/che | wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/urlfactory/DefaultFactoryUrl.java | 1696 | /*
* Copyright (c) 2012-2018 Red Hat, Inc.
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat, Inc. - initial API and implementation
*/
package org.eclipse.che.api.factory.server.urlfactory;
/**
* Default implementation of {@link RemoteFactoryUrl} which used with all factory URL's until there
* is no specific implementation for given URL.
*/
public class DefaultFactoryUrl implements RemoteFactoryUrl {
private String devfileFilename;
private String devfileFileLocation;
private String factoryFilename;
private String factoryFileLocation;
@Override
public String getDevfileFilename() {
return devfileFilename;
}
public DefaultFactoryUrl withDevfileFilename(String devfileFilename) {
this.devfileFilename = devfileFilename;
return this;
}
@Override
public String getFactoryFilename() {
return factoryFilename;
}
public DefaultFactoryUrl withFactoryFilename(String factoryFilename) {
this.factoryFilename = factoryFilename;
return this;
}
@Override
public String factoryFileLocation() {
return factoryFileLocation;
}
public DefaultFactoryUrl withFactoryFileLocation(String factoryFileLocation) {
this.factoryFileLocation = factoryFileLocation;
return this;
}
@Override
public String devfileFileLocation() {
return devfileFileLocation;
}
public DefaultFactoryUrl withDevfileFileLocation(String devfileFileLocation) {
this.devfileFileLocation = devfileFileLocation;
return this;
}
}
| epl-1.0 |
Itema-as/eclipse-marketplace-server | org.dawnsci.marketplace.core/src-gen/org/dawnsci/marketplace/Platform.java | 1303 | /**
*/
package org.dawnsci.marketplace;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.util.FeatureMap;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Platform</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link org.dawnsci.marketplace.Platform#getMixed <em>Mixed</em>}</li>
* </ul>
*
* @see org.dawnsci.marketplace.MarketplacePackage#getPlatform()
* @model extendedMetaData="kind='mixed' name='platform'"
* @generated
*/
public interface Platform extends EObject {
/**
* Returns the value of the '<em><b>Mixed</b></em>' attribute list.
* The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Mixed</em>' attribute list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Mixed</em>' attribute list.
* @see org.dawnsci.marketplace.MarketplacePackage#getPlatform_Mixed()
* @model dataType="org.eclipse.emf.ecore.EFeatureMapEntry" required="true" many="true"
* extendedMetaData="kind='elementWildcard' name=':mixed'"
* @generated
*/
FeatureMap getMixed();
} // Platform
| epl-1.0 |
Johnson-Chou/test | opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/RemoveServer.java | 941 | /*
* Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
package org.opendaylight.controller.cluster.raft.messages;
import com.google.common.base.Preconditions;
import java.io.Serializable;
/**
* Message sent to remove a replica (§4.1).
*/
public class RemoveServer implements Serializable {
private static final long serialVersionUID = 1L;
private final String serverId;
public RemoveServer(String serverId) {
this.serverId = Preconditions.checkNotNull(serverId);
}
public String getServerId() {
return serverId;
}
@Override
public String toString() {
return "RemoveServer{" + "serverId='" + serverId + '\'' + '}';
}
}
| epl-1.0 |
openhab/openhab2 | bundles/org.openhab.binding.smartmeter/src/main/java/org/openhab/binding/smartmeter/internal/conformity/negate/NegateBitParser.java | 2138 | /**
* Copyright (c) 2010-2020 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.smartmeter.internal.conformity.negate;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.binding.smartmeter.SmartMeterBindingConstants;
/**
* Parses the NegateBit property.
*
* @author Matthias Steigenberger - Initial contribution
*
*/
@NonNullByDefault
public class NegateBitParser {
/**
* Parsing of negate bit property. This is in the format: {@literal <OBIS>:<POSITION>:<BIT_SET>"}
* e.g. "1-0:1-8-0:5:1"
*
* @param negateProperty
* @return The parsed model
*/
public static NegateBitModel parseNegateProperty(String negateProperty) throws IllegalArgumentException {
Pattern obisPattern = Pattern.compile(SmartMeterBindingConstants.OBIS_PATTERN_CHANNELID);
try {
Matcher matcher = obisPattern.matcher(negateProperty);
if (matcher.find()) {
String obis = matcher.group();
String substring = negateProperty.substring(matcher.end() + 1, negateProperty.length());
String[] split = substring.split(":");
int negatePosition = Integer.parseInt(split[0]);
boolean negateBit = Integer.parseInt(split[1]) == 0 ? false : true;
boolean status = split.length > 2 ? split[2].equalsIgnoreCase("status") : false;
return new NegateBitModel((byte) negatePosition, negateBit, obis, status);
}
} catch (Exception e) {
throw new IllegalArgumentException("Negate property cannot be parsed: " + negateProperty, e);
}
throw new IllegalArgumentException("Negate property cannot be parsed: " + negateProperty);
}
}
| epl-1.0 |
codenvy/che | infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/server/secure/jwtproxy/JwtProxySecureServerExposerTest.java | 6452 | /*
* Copyright (c) 2012-2018 Red Hat, Inc.
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat, Inc. - initial API and implementation
*/
package org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.jwtproxy;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.ArgumentMatchers.isNull;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import com.google.common.collect.ImmutableMap;
import io.fabric8.kubernetes.api.model.IntOrString;
import io.fabric8.kubernetes.api.model.ServicePort;
import java.util.Collections;
import java.util.Map;
import org.eclipse.che.api.core.model.workspace.config.ServerConfig;
import org.eclipse.che.api.workspace.server.model.impl.ServerConfigImpl;
import org.eclipse.che.workspace.infrastructure.kubernetes.environment.KubernetesEnvironment;
import org.eclipse.che.workspace.infrastructure.kubernetes.server.external.IngressServerExposer;
import org.mockito.Mock;
import org.mockito.testng.MockitoTestNGListener;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Listeners;
import org.testng.annotations.Test;
/**
* Tests {@link JwtProxySecureServerExposer}
*
* @author Sergii Leshchenko
*/
@Listeners(MockitoTestNGListener.class)
public class JwtProxySecureServerExposerTest {
private static final String MACHINE_SERVICE_NAME = "service123";
private static final String MACHINE_NAME = "machine123";
public static final String JWT_PROXY_SERVICE_NAME = "jwtProxyServiceName";
@Mock private KubernetesEnvironment k8sEnv;
@Mock private JwtProxyProvisioner jwtProxyProvisioner;
@Mock private IngressServerExposer externalServerExposer;
private JwtProxySecureServerExposer<KubernetesEnvironment> secureServerExposer;
@BeforeMethod
public void setUp() {
secureServerExposer =
new JwtProxySecureServerExposer<>(jwtProxyProvisioner, externalServerExposer);
}
@Test
public void shouldExposeSecureServersWithNewJwtProxyServicePort() throws Exception {
// given
ServicePort machineServicePort = new ServicePort();
machineServicePort.setTargetPort(new IntOrString(8080));
machineServicePort.setProtocol("TCP");
Map<String, ServerConfig> servers =
ImmutableMap.of(
"server1",
new ServerConfigImpl("8080/tcp", "http", "/api", ImmutableMap.of("secure", "true")),
"server2",
new ServerConfigImpl("8080/tcp", "ws", "/connect", ImmutableMap.of("secure", "true")));
ServicePort jwtProxyServicePort = new ServicePort();
doReturn(jwtProxyServicePort)
.when(jwtProxyProvisioner)
.expose(any(), any(), anyString(), anyString(), any(), anyString(), anyBoolean(), any());
when(jwtProxyProvisioner.getServiceName()).thenReturn(JWT_PROXY_SERVICE_NAME);
when(externalServerExposer.getStrategyConformingServers(eq(servers))).thenReturn(servers);
// when
secureServerExposer.expose(
k8sEnv, null, MACHINE_NAME, MACHINE_SERVICE_NAME, null, machineServicePort, servers);
// then
verify(jwtProxyProvisioner)
.expose(
eq(k8sEnv),
any(),
anyString(),
eq(MACHINE_SERVICE_NAME),
eq(machineServicePort),
eq("TCP"),
eq(false),
any());
verify(externalServerExposer)
.expose(
eq(k8sEnv),
eq(MACHINE_NAME),
eq(JWT_PROXY_SERVICE_NAME),
isNull(),
eq(jwtProxyServicePort),
eq(servers));
}
@Test
public void shouldUseMultiHostStrategyForSubdomainRequiringServers() throws Exception {
// given
ServicePort machineServicePort = new ServicePort();
machineServicePort.setTargetPort(new IntOrString(8080));
machineServicePort.setProtocol("TCP");
Map<String, ServerConfig> servers =
ImmutableMap.of(
"server1",
new ServerConfigImpl("8080/tcp", "http", "/api", ImmutableMap.of("secure", "true")),
"server2",
new ServerConfigImpl("8080/tcp", "ws", "/connect", ImmutableMap.of("secure", "true")));
Map<String, ServerConfig> conformingServers =
Collections.singletonMap("server1", servers.get("server1"));
Map<String, ServerConfig> subdomainServers =
Collections.singletonMap("server2", servers.get("server2"));
ServicePort jwtProxyServicePort = new ServicePort();
doReturn(jwtProxyServicePort)
.when(jwtProxyProvisioner)
.expose(any(), any(), anyString(), anyString(), any(), anyString(), anyBoolean(), any());
when(jwtProxyProvisioner.getServiceName()).thenReturn(JWT_PROXY_SERVICE_NAME);
when(externalServerExposer.getStrategyConformingServers(eq(servers)))
.thenReturn(conformingServers);
when(externalServerExposer.getServersRequiringSubdomain(eq(servers)))
.thenReturn(subdomainServers);
// when
secureServerExposer.expose(
k8sEnv, null, MACHINE_NAME, MACHINE_SERVICE_NAME, null, machineServicePort, servers);
// then
verify(jwtProxyProvisioner)
.expose(
eq(k8sEnv),
any(),
anyString(),
eq(MACHINE_SERVICE_NAME),
eq(machineServicePort),
eq("TCP"),
eq(false),
any());
verify(jwtProxyProvisioner)
.expose(
eq(k8sEnv),
any(),
anyString(),
eq(MACHINE_SERVICE_NAME),
eq(machineServicePort),
eq("TCP"),
eq(true),
any());
verify(externalServerExposer)
.expose(
eq(k8sEnv),
eq(MACHINE_NAME),
eq(JWT_PROXY_SERVICE_NAME),
isNull(),
eq(jwtProxyServicePort),
eq(conformingServers));
verify(externalServerExposer)
.expose(
eq(k8sEnv),
eq(MACHINE_NAME),
eq(JWT_PROXY_SERVICE_NAME),
isNull(),
eq(jwtProxyServicePort),
eq(subdomainServers));
}
}
| epl-1.0 |
clulab/banner | src/main/java/edu/umass/cs/mallet/base/pipe/Directory2FileIterator.java | 2241 | /* Copyright (C) 2002 Univ. of Massachusetts Amherst, Computer Science Dept.
This file is part of "MALLET" (MAchine Learning for LanguagE Toolkit).
http://www.cs.umass.edu/~mccallum/mallet
This software is provided under the terms of the Common Public License,
version 1.0, as published by http://www.opensource.org. For further
information, see the file `LICENSE' included with this distribution. */
package edu.umass.cs.mallet.base.pipe;
import java.io.*;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
import java.net.URI;
import java.util.Iterator;
import java.util.ArrayList;
import edu.umass.cs.mallet.base.pipe.iterator.*;
import edu.umass.cs.mallet.base.util.RegexFileFilter;
import edu.umass.cs.mallet.base.types.Instance;
/**
* Convert a File object representing a directory into a FileIterator which
* iterates over files in the directory matching a pattern and which extracts
* a label from each file path to become the target field of the instance.
@author Andrew McCallum <a href="mailto:[email protected]">[email protected]</a>
*/
public class Directory2FileIterator extends Pipe
{
FileFilter fileFilter = null;
Pattern labelPattern = null;
public Directory2FileIterator (FileFilter fileFilter, Pattern labelRegex)
{
this.fileFilter = fileFilter;
this.labelPattern = labelRegex;
}
public Directory2FileIterator (Pattern absolutePathRegex,
Pattern filenameRegex,
Pattern labelRegex)
{
this (new RegexFileFilter (absolutePathRegex, filenameRegex), labelRegex);
}
public Directory2FileIterator (String filenameRegex)
{
this (new RegexFileFilter (filenameRegex), null);
}
public Directory2FileIterator ()
{
// Leave fileFilter == null
}
public Instance pipe (Instance carrier)
{
File directory = (File) carrier.getData();
carrier.setData(new FileIterator (directory, fileFilter, labelPattern));
return carrier;
}
public Iterator pipe (File directory)
{
return new FileIterator (directory, fileFilter, labelPattern);
}
public Iterator pipe (URI directory)
{
return pipe (new File (directory));
}
public Iterator pipe (String directory)
{
return pipe (new File (directory));
}
}
| epl-1.0 |
vuk/Clojure-Movies | resources/apache-jena/javadoc-core/com/hp/hpl/jena/reasoner/rulesys/builtins/class-use/IsDType.html | 4583 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_25) on Thu Sep 12 10:51:18 BST 2013 -->
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>Uses of Class com.hp.hpl.jena.reasoner.rulesys.builtins.IsDType (Apache Jena)</title>
<meta name="date" content="2013-09-12">
<link rel="stylesheet" type="text/css" href="../../../../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class com.hp.hpl.jena.reasoner.rulesys.builtins.IsDType (Apache Jena)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../../../com/hp/hpl/jena/reasoner/rulesys/builtins/IsDType.html" title="class in com.hp.hpl.jena.reasoner.rulesys.builtins">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../../index.html?com/hp/hpl/jena/reasoner/rulesys/builtins/class-use/IsDType.html" target="_top">Frames</a></li>
<li><a href="IsDType.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h2 title="Uses of Class com.hp.hpl.jena.reasoner.rulesys.builtins.IsDType" class="title">Uses of Class<br>com.hp.hpl.jena.reasoner.rulesys.builtins.IsDType</h2>
</div>
<div class="classUseContainer">No usage of com.hp.hpl.jena.reasoner.rulesys.builtins.IsDType</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../../../com/hp/hpl/jena/reasoner/rulesys/builtins/IsDType.html" title="class in com.hp.hpl.jena.reasoner.rulesys.builtins">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../../index.html?com/hp/hpl/jena/reasoner/rulesys/builtins/class-use/IsDType.html" target="_top">Frames</a></li>
<li><a href="IsDType.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Licenced under the Apache License, Version 2.0</small></p>
</body>
</html>
| epl-1.0 |
css-iter/cs-studio | applications/display/display-plugins/org.csstudio.display.pace/src/org/csstudio/display/pace/model/ModelListener.java | 889 | /*******************************************************************************
* Copyright (c) 2010 Oak Ridge National Laboratory.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
******************************************************************************/
package org.csstudio.display.pace.model;
/** Listener to Model changes
* @author Kay Kasemir
*
* reviewed by Delphy 01/28/09
*/
public interface ModelListener
{
/** Notification of cell update.
* @param cell Cell that changed its value in any way:
* Received new data from PV,
* user updated the value, reset to original value, ...
*/
void cellUpdate(Cell cell);
}
| epl-1.0 |
clulab/banner | src/main/java/edu/umass/cs/mallet/base/types/PropertyHolder.java | 846 | package edu.umass.cs.mallet.base.types;
import edu.umass.cs.mallet.base.util.PropertyList;
/**
* Author: saunders Created Nov 15, 2005 Copyright (C) Univ. of Massachusetts Amherst, Computer Science Dept.
*/
public interface PropertyHolder {
public void setProperty(String key, Object value);
public Object getProperty(String key);
public void setNumericProperty(String key, double value);
public double getNumericProperty(String key);
public PropertyList getProperties();
public void setProperties(PropertyList newProperties);
public boolean hasProperty(String key);
public void setFeatureValue (String key, double value);
public double getFeatureValue (String key);
public PropertyList getFeatures ();
public void setFeatures (PropertyList pl);
public FeatureVector toFeatureVector (Alphabet dict, boolean binary);
}
| epl-1.0 |
ControlSystemStudio/cs-studio | applications/opibuilder/opibuilder-plugins/org.csstudio.opibuilder.adl2boy/src/org/csstudio/opibuilder/adl2boy/translator/StripChart2Model.java | 1045 | /*************************************************************************\
* Copyright (c) 2010 UChicago Argonne, LLC
* This file is distributed subject to a Software License Agreement found
* in the file LICENSE that is included with this distribution.
/*************************************************************************/
package org.csstudio.opibuilder.adl2boy.translator;
import org.csstudio.opibuilder.model.AbstractContainerModel;
import org.csstudio.utility.adlparser.fileParser.ADLWidget;
import org.eclipse.swt.graphics.RGB;
public class StripChart2Model extends AbstractADL2Model {
public StripChart2Model(ADLWidget adlWidget, RGB[] colorMap, AbstractContainerModel parentModel) {
super(adlWidget, colorMap, parentModel);
}
@Override
public void processWidget(ADLWidget adlWidget) {
// TODO Auto-generated method stub
}
@Override
public void makeModel(ADLWidget adlWidget,
AbstractContainerModel parentModel) {
// TODO Auto-generated method stub
}
}
| epl-1.0 |
sguan-actuate/birt | data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/olap/data/impl/aggregation/MergedAggregationResultSet.java | 7888 |
/*******************************************************************************
* Copyright (c) 2004, 2008 Actuate Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Actuate Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.birt.data.engine.olap.data.impl.aggregation;
import java.io.IOException;
import java.util.Arrays;
import org.eclipse.birt.data.engine.olap.data.api.DimLevel;
import org.eclipse.birt.data.engine.olap.data.api.IAggregationResultRow;
import org.eclipse.birt.data.engine.olap.data.api.IAggregationResultSet;
import org.eclipse.birt.data.engine.olap.data.impl.AggregationDefinition;
import org.eclipse.birt.data.engine.olap.data.impl.AggregationFunctionDefinition;
import org.eclipse.birt.data.engine.olap.data.impl.DrilledInfo;
/**
* The 2 merged IAggregationResultSet must have equal DimLevel[]
*
*/
public class MergedAggregationResultSet implements IAggregationResultSet
{
private IAggregationResultSet rs1;
private IAggregationResultSet rs2;
public MergedAggregationResultSet( IAggregationResultSet rs1, IAggregationResultSet rs2)
{
assert Arrays.deepEquals( rs1.getAllLevels( ), rs2.getAllLevels( ) );
this.rs1 = rs1;
this.rs2 = rs2;
}
public void clear( ) throws IOException
{
rs1.clear( );
rs2.clear( );
}
public void close( ) throws IOException
{
rs1.close( );
rs2.close( );
}
public int getAggregationCount( )
{
return rs1.getAggregationCount( ) + rs2.getAggregationCount( );
}
public int getAggregationDataType( int aggregationIndex )
throws IOException
{
if ( aggregationIndex < rs1.getAggregationCount( ) )
{
return rs1.getAggregationDataType( aggregationIndex );
}
return rs2.getAggregationDataType( aggregationIndex - rs1.getAggregationCount( ) );
}
public AggregationDefinition getAggregationDefinition( )
{
AggregationDefinition ad1 = rs1.getAggregationDefinition( );
AggregationDefinition ad2 = rs2.getAggregationDefinition( );
AggregationFunctionDefinition[] afds1= ad1.getAggregationFunctions( );
AggregationFunctionDefinition[] afds2= ad2.getAggregationFunctions( );
AggregationFunctionDefinition[] afds = new AggregationFunctionDefinition[afds1.length + afds2.length];
System.arraycopy( afds1, 0, afds, 0, afds1.length );
System.arraycopy( afds2, 0, afds, afds1.length, afds2.length );
AggregationDefinition aggr = new AggregationDefinition( ad1.getLevels( ), ad1.getSortTypes( ), afds );
if( ad1.getDrilledInfo( ) != null )
{
DrilledInfo info = ad1.getDrilledInfo( ).copy( );
if( ad2.getDrilledInfo( ) != null )
{
info.getOriginalAggregation( ).addAll( ad2.getDrilledInfo( ).getOriginalAggregation( ) );
}
aggr.setDrilledInfo( info );
}
return aggr;
}
public int getAggregationIndex( String name ) throws IOException
{
int index = rs1.getAggregationIndex( name );
if ( index < 0 )
{
index = rs2.getAggregationIndex( name );
if ( index >= 0 )
{
index += rs1.getAggregationCount( );
}
}
return index;
}
public String getAggregationName( int index )
{
if ( index < rs1.getAggregationCount( ) )
{
return rs1.getAggregationName( index );
}
return rs2.getAggregationName( index - rs1.getAggregationCount( ) );
}
public Object getAggregationValue( int index )
throws IOException
{
if ( index < rs1.getAggregationCount( ) )
{
return rs1.getAggregationValue( index );
}
return rs2.getAggregationValue( index - rs1.getAggregationCount( ) );
}
public String[][] getAttributeNames( )
{
return rs1.getAttributeNames( );
}
public DimLevel[] getAllLevels( )
{
return rs1.getAllLevels( );
}
public IAggregationResultRow getCurrentRow( ) throws IOException
{
IAggregationResultRow arr1 = rs1.getCurrentRow( );
IAggregationResultRow arr2 = rs2.getCurrentRow( );
Object[] values1 = arr1.getAggregationValues( );
Object[] values2 = arr2.getAggregationValues( );
Object[] values = new Object[values1.length + values2.length];
System.arraycopy( values1, 0, values, 0, values1.length );
System.arraycopy( values2, 0, values, values1.length, values2.length );
AggregationResultRow arr = new AggregationResultRow( );
arr.setLevelMembers( arr1.getLevelMembers( ) );
arr.setAggregationValues( values );
return arr;
}
public String[][] getKeyNames( )
{
return rs1.getKeyNames( );
}
public DimLevel getLevel( int levelIndex )
{
return rs1.getLevel( levelIndex );
}
public Object getLevelAttribute( int levelIndex, int attributeIndex )
{
return rs1.getLevelAttribute( levelIndex, attributeIndex );
}
public int getLevelAttributeColCount( int levelIndex )
{
return rs1.getLevelAttributeColCount( levelIndex );
}
public int getLevelAttributeDataType( DimLevel level, String attributeName )
{
return rs1.getLevelAttributeDataType( level, attributeName );
}
public int getLevelAttributeDataType( int levelIndex, String attributeName )
{
return rs1.getLevelAttributeDataType( levelIndex, attributeName );
}
public int getLevelAttributeIndex( int levelIndex, String attributeName )
{
return rs1.getLevelAttributeIndex( levelIndex, attributeName );
}
public int getLevelAttributeIndex( DimLevel level, String attributeName )
{
return rs1.getLevelAttributeIndex( level, attributeName );
}
public String[] getLevelAttributes( int levelIndex )
{
return rs1.getLevelAttributes( levelIndex );
}
public int getLevelCount( )
{
return rs1.getLevelCount( );
}
public int getLevelIndex( DimLevel level )
{
return rs1.getLevelIndex( level );
}
public int getLevelKeyColCount( int levelIndex )
{
return rs1.getLevelKeyColCount( levelIndex );
}
public int getLevelKeyDataType( DimLevel level, String keyName )
{
return rs1.getLevelKeyDataType( level, keyName );
}
public int getLevelKeyDataType( int levelIndex, String keyName )
{
return rs1.getLevelKeyDataType( levelIndex, keyName );
}
public int getLevelKeyIndex( int levelIndex, String keyName )
{
return rs1.getLevelKeyIndex( levelIndex, keyName );
}
public int getLevelKeyIndex( DimLevel level, String keyName )
{
return rs1.getLevelKeyIndex( level, keyName );
}
public String getLevelKeyName( int levelIndex, int keyIndex )
{
return rs1.getLevelKeyName( levelIndex, keyIndex );
}
public Object[] getLevelKeyValue( int levelIndex )
{
return rs1.getLevelKeyValue( levelIndex );
}
public int getPosition( )
{
return rs1.getPosition( );
}
public int getSortType( int levelIndex )
{
return rs1.getSortType( levelIndex );
}
public int length( )
{
return rs1.length( );
}
public void seek( int index ) throws IOException
{
rs1.seek( index );
if( index < rs2.length( ) )
rs2.seek( index );
}
public int[] getAggregationDataType( )
{
int[] types1 = rs1.getAggregationDataType( );
int[] types2 = rs2.getAggregationDataType( );
int[] types = new int[types1.length + types2.length];
System.arraycopy( types1, 0, types, 0, types1.length );
System.arraycopy( types2, 0, types, types1.length, types2.length );
return types;
}
public int[][] getLevelAttributeDataType( )
{
return rs1.getLevelAttributeDataType( );
}
public String[][] getLevelAttributes( )
{
return rs1.getLevelAttributes( );
}
public int[][] getLevelKeyDataType( )
{
return rs1.getLevelKeyDataType( );
}
public String[][] getLevelKeys( )
{
return rs1.getLevelKeys( );
}
public int[] getSortType( )
{
return rs1.getSortType( );
}
public Object[] getLevelAttributesValue( int levelIndex )
{
return rs1.getLevelAttributesValue( levelIndex );
}
}
| epl-1.0 |
rku4er/equinoxe-wordpress | wp-content/plugins/olark-for-wp/olark-for-wp.php | 11747 | <?php
/*
Plugin Name: Olark for WP
Plugin URI: http://www.burningpony.com/blog/portfolio/olark-for-wp/
Description: A plugin that allows website authors to easily place a <a href="http://www.olark.com/">Olark</a> live help widget on their wpwebsite.
Version: 2.5.1
Author: Russell Osborne
Author URI: http://www.burningpony.com/
=== VERSION HISTORY ===
04.28.09 - v1.0 - The first version
08.28.09 - v2.0 - Updated the plugin to reflect the brand change from Hab.la to Olark
06.03.11 - v2.1 - Forked From Olark for Wordpress/ Upgraded to New Olark Async Code, Added Callout Widget
06.04.11 - v2.2 - Major Rewrite Moving to More Modern Plugin Codex/API
06.05.11 - v2.3 - Added Olark API for logged in Users
06.07.11 - v2.3.1-3 - Fixing Typos
06.07.11 - v2.4 - In plugin Sign Up Beta!!
06.08.11 - v2.4.1 - Bug Fix on Signup (Sessions Will Now persist between page loads)
09.01.11 - v2.4.2 - Removed iFrame
05.09.13 - v2.5 Updating Olark Includes, Removing Deprecated Code, Removing referral Links. This project is now dead.
05.09.13 - v2.5.1 Bad Build
=== LEGAL INFORMATION ===
Copyright (C) 2011 Russell Osborne <[email protected]> - www.burningpony.com
Original Work By James Dimick <[email protected]> - www.jamesdimick.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
$plugurldir = get_option('siteurl') . '/' . PLUGINDIR . '/olark-for-wp/';
$ofw_domain = 'OlarkForWP';
load_plugin_textdomain($ofw_domain, 'wp-content/plugins/olark-for-wp');
add_action('init', 'ofw_init');
add_action('wp_footer', 'ofw_insert');
add_action('admin_notices', 'ofw_admin_notice');
add_filter('plugin_action_links', 'ofw_plugin_actions', 10, 2);
function ofw_init()
{
if (function_exists('current_user_can') && current_user_can('manage_options'))
add_action('admin_menu', 'ofw_add_settings_page');
if (!function_exists('get_plugins'))
require_once(ABSPATH . 'wp-admin/includes/plugin.php');
$options = get_option('ofwDisable');
}
function ofw_settings()
{
register_setting('olark-for-wp-group', 'ofwID');
register_setting('olark-for-wp-group', 'ofwDisable');
add_settings_section('olark-for-wp', "Olark for WP", "", 'olark-for-wp-group');
}
function plugin_get_version()
{
if (!function_exists('get_plugins'))
require_once(ABSPATH . 'wp-admin/includes/plugin.php');
$plugin_folder = get_plugins('/' . plugin_basename(dirname(__FILE__)));
$plugin_file = basename((__FILE__));
return $plugin_folder[$plugin_file]['Version'];
}
function ofw_insert()
{
global $current_user;
if (get_option('ofwID')) {
echo ("<!-- begin olark code -->
<script data-cfasync=\"false\" type='text/javascript'>/*<![CDATA[*/window.olark||(function(c){var f=window,d=document,l=f.location.protocol==\"https:\"?\"https:\":\"http:\",z=c.name,r=\"load\";var nt=function(){
f[z]=function(){
(a.s=a.s||[]).push(arguments)};var a=f[z]._={
},q=c.methods.length;while(q--){(function(n){f[z][n]=function(){
f[z](\"call\",n,arguments)}})(c.methods[q])}a.l=c.loader;a.i=nt;a.p={
0:+new Date};a.P=function(u){
a.p[u]=new Date-a.p[0]};function s(){
a.P(r);f[z](r)}f.addEventListener?f.addEventListener(r,s,false):f.attachEvent(\"on\"+r,s);var ld=function(){function p(hd){
hd=\"head\";return[\"<\",hd,\"></\",hd,\"><\",i,' onl' + 'oad=\"var d=',g,\";d.getElementsByTagName('head')[0].\",j,\"(d.\",h,\"('script')).\",k,\"='\",l,\"//\",a.l,\"'\",'\"',\"></\",i,\">\"].join(\"\")}var i=\"body\",m=d[i];if(!m){
return setTimeout(ld,100)}a.P(1);var j=\"appendChild\",h=\"createElement\",k=\"src\",n=d[h](\"div\"),v=n[j](d[h](z)),b=d[h](\"iframe\"),g=\"document\",e=\"domain\",o;n.style.display=\"none\";m.insertBefore(n,m.firstChild).id=z;b.frameBorder=\"0\";b.id=z+\"-loader\";if(/MSIE[ ]+6/.test(navigator.userAgent)){
b.src=\"javascript:false\"}b.allowTransparency=\"true\";v[j](b);try{
b.contentWindow[g].open()}catch(w){
c[e]=d[e];o=\"javascript:var d=\"+g+\".open();d.domain='\"+d.domain+\"';\";b[k]=o+\"void(0);\"}try{
var t=b.contentWindow[g];t.write(p());t.close()}catch(x){
b[k]=o+'d.write(\"'+p().replace(/\"/g,String.fromCharCode(92)+'\"')+'\");d.close();'}a.P(2)};ld()};nt()})({
loader: \"static.olark.com/jsclient/loader0.js\",name:\"olark\",methods:[\"configure\",\"extend\",\"declare\",\"identify\"]});
/* custom configuration goes here (www.olark.com/documentation) */
olark.identify('" . get_option('ofwID') . "');
/*]]>*/</script><noscript>");
//Make user info Avaliable in the Dom for the JS API
if (0 != $current_user->ID) {
echo ("olark('api.chat.updateVisitorNickname', {snippet: '$current_user->display_name'})\n"); //This will be overwritten if you require a name and email
echo ("olark('api.chat.updateVisitorStatus', {snippet: [
'Wordpress User Info',
'Username: " . $current_user->user_login . "',
'User email: $current_user->user_email',
'User first name: " . $current_user->user_firstname . "',
'User last name: " . $current_user->user_lastname . "',
'User display name: " . $current_user->display_name . "',
'User ID: " . $current_user->ID . "'
]})
");
// On chat start send basic info to Operator
echo "olark('api.chat.onBeginConversation', function() {
olark('api.chat.sendNotificationToOperator', {body: \"Wordpress Information: $current_user->display_name Email:$current_user->user_email \"});
});";
}
echo ('<noscript><a href="https://www.olark.com/site/' . get_option('ofwID') . '/contact" title="Contact us" target="_blank">Questions? Feedback?</a> powered by <a href="http://www.olark.com?welcome" title="Olark live chat software">Olark live chat software</a></noscript>
<!-- end olark code -->');
echo ("\n</script>\n<!-- End Olark Code <http://www.olark.com/> -->\n\n");
}
}
function ofw_admin_notice()
{
if (!get_option('ofwID'))
echo ('<div class="error"><p><strong>' . sprintf(__('Olark for WP is disabled. Please go to the <a href="%s">plugin page</a> and enter a valid account ID to enable it.'), admin_url('options-general.php?page=olark-for-wp')) . '</strong></p></div>');
}
function ofw_plugin_actions($links, $file)
{
static $this_plugin;
if (!$this_plugin)
$this_plugin = plugin_basename(__FILE__);
if ($file == $this_plugin && function_exists('admin_url')) {
$settings_link = '<a href="' . admin_url('options-general.php?page=olark-for-wp') . '">' . __('Settings', $ofw_domain) . '</a>';
array_unshift($links, $settings_link);
}
return ($links);
}
function ofw_add_settings_page()
{
function ofw_settings_page()
{
global $ofw_domain, $plugurldir, $olark_options;
?>
<div class="wrap">
<?php
screen_icon();
?>
<h2><?php
_e('Olark for WP', $ofw_domain);
?> <small><?
echo plugin_get_version();
?></small></h2>
<div class="metabox-holder meta-box-sortables ui-sortable pointer">
<div class="postbox" style="float:left;width:30em;margin-right:20px">
<h3 class="hndle"><span><?php
_e('Olark Account ID', $ofw_domain);
?></span></h3>
<div class="inside" style="padding: 0 10px">
<p style="text-align:center"><a href="http://www.olark.com/" title="<?php
_e('Chat with your website’s visitors using your favorite IM client', $ofw_domain);
?>"><img src="<?php
echo ($plugurldir);
?>olark.png" height="132" width="244" alt="<?php
_e('Olark Logo', $ofw_domain);
?>" /></a></p>
<form method="post" action="options.php">
<?php
settings_fields('olark-for-wp-group');
?>
<p><label for="ofwID"><?php
printf(__('Enter your %1$sChat with your website’s visitors using your favorite IM client%2$sOlark%3$s account ID below to activate the plugin.', $ofw_domain), '<strong><a href="http://www.olark.com//" title="', '">', '</a></strong>');
?></label><br />
<input type="text" name="ofwID" value="<?php
echo get_option('ofwID');
?>" style="width:100%" /></p>
<p class="submit">
<input type="submit" class="button-primary" value="<?php
_e('Save Changes');
?>" />
</p>
</form>
<small class="nonessential"><?php
_e('Entering an incorrect ID will result in an error!', $ofw_domain);
?></small></p>
<p style="font-size:smaller;color:#999239;background-color:#ffffe0;padding:0.4em 0.6em !important;border:1px solid #e6db55;-moz-border-radius:3px;-khtml-border-radius:3px;-webkit-border-radius:3px;border-radius:3px"><?php
printf(__('Don’t have an account? No problem! %1$sRegister for a free Olark account today!%2$sRegister for a <strong>FREE</strong> Olark account right now!%3$s Start chatting with your site visitors today!', $ofw_domain), '<a href="http://www.olark.com/portal/wizard" title="', '">', '</a>');
?></p>
</div>
</div>
<div class="postbox" style="float:left;width:20%;margin-right:20px">
<h3 class="hndle"><span><?php
_e('Change Notes', $ofw_domain);
?></span></h3>
<div class="inside" style="padding: 10px">
<ul>
<li>04.28.09 - v1.0 - The first version</li>
<li>08.28.09 - v2.0 - Updated the plugin to reflect the brand change from Hab.la to Olark</li>
<li>06.03.11 - v2.1 - Forked From Olark for Wordpress/ Upgraded to New Olark Async Code, Added Callout Widget, Added Chat Tabs</li>
<li>06.04.11 - v2.2 - Major Rewrite Moving to More Modern Plugin Codex/API</li>
<li>06.05.11 - v2.3 - Added Olark API for logged in Users</li>
<li>06.07.11 - v2.3.1-3 - Fixing Typos</li>
<li>06.07.11 - v2.4 - In Plugin Olark Sign up!</li>
<li>06.08.11 - v2.4.1 - Bug Fix on Signup (Sessions Will Now persist between page loads) </li>
<li>09.01.11 - v2.4.2 - Removed iFrame </li>
<li>05.09.13 - v2.5 Updating Olark Includes, Removing Deprecated Code, Removing referral Links. This project is now dead.</li>
<li>05.09.13 - v2.5.1 Bad Build </li>
<li> <h4> <a href ='http://www.olark.com/customer/portal/articles/314795-wordpress-integration-guide' >This Project is DEAD! For all Future updates please remove this plugin and follow Olark's offical wordpress integration guide here </a> </h4> </li>
</ul>
</div>
</div>
</div>
</div>
<?php
}
add_action('admin_init', 'ofw_settings');
add_submenu_page('options-general.php', __('Olark for WP', $ofw_domain), __('Olark for WP', $ofw_domain), 'manage_options', 'olark-for-wp', 'ofw_settings_page');
}
?>
| gpl-2.0 |
MobileRobots/ArAndroidApp | jni/ArCentralForwarder.h | 4535 | /*
MobileRobots Advanced Robotics Interface for Applications (ARIA)
Copyright (C) 2004, 2005 ActivMedia Robotics LLC
Copyright (C) 2006, 2007, 2008, 2009 MobileRobots Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
If you wish to redistribute ARIA under different terms, contact
MobileRobots for information about a commercial version of ARIA at
[email protected] or
MobileRobots Inc, 10 Columbia Drive, Amherst, NH 03031; 800-639-9481
*/
#ifndef ARCENTRALFORWARDER_H
#define ARCENTRALFORWARDER_H
#include "Aria.h"
#include "ArServerBase.h"
#include "ArClientBase.h"
/**
Class
**/
class ArCentralForwarder
{
public:
AREXPORT ArCentralForwarder(
ArServerBase *mainServer, ArSocket *socket,
const char *robotName, int startingPort, std::set<int> *usedPorts,
ArFunctor2<ArCentralForwarder *,
ArServerClient *> *notifyServerClientRemovedCB);
AREXPORT ~ArCentralForwarder();
ArServerBase *getServer(void) { return myServer; }
ArClientBase *getClient(void) { return myClient; }
int getPort(void) { return myPort; }
const char *getRobotName(void) { return myRobotName.c_str(); }
AREXPORT void netCentralHeartbeat(ArNetPacket *packet);
AREXPORT bool callOnce(
double heartbeatTimeout, double udpHeartbeatTimeout,
double robotBackupTimeout, double clientBackupTimeout);
AREXPORT bool isConnected(void) { return myState == STATE_CONNECTED; }
protected:
void robotServerClientRemoved(ArServerClient *client);
void clientServerClientRemoved(ArServerClient *client);
void receiveData(ArNetPacket *packet);
void requestChanged(long interval, unsigned int command);
void requestOnce(ArServerClient *client, ArNetPacket *packet);
AREXPORT bool startingCallOnce(
double heartbeatTimeout, double udpHeartbeatTimeout,
double robotBackupTimeout, double clientBackupTimeout);
AREXPORT bool connectingCallOnce(
double heartbeatTimeout, double udpHeartbeatTimeout,
double robotBackupTimeout, double clientBackupTimeout);
AREXPORT bool gatheringCallOnce(
double heartbeatTimeout, double udpHeartbeatTimeout,
double robotBackupTimeout, double clientBackupTimeout);
AREXPORT bool connectedCallOnce(
double heartbeatTimeout, double udpHeartbeatTimeout,
double robotBackupTimeout, double clientBackupTimeout);
ArServerBase *myMainServer;
ArSocket *mySocket;
std::string myRobotName;
std::string myPrefix;
int myStartingPort;
std::set<int> *myUsedPorts;
ArFunctor2<ArCentralForwarder *,
ArServerClient *> *myForwarderServerClientRemovedCB;
enum State
{
STATE_STARTING,
STATE_CONNECTING,
STATE_GATHERING,
STATE_CONNECTED
};
ArServerBase *myServer;
ArClientBase *myClient;
State myState;
int myPort;
ArServerBase *server;
ArClientBase *client;
bool myRobotHasCentralServerHeartbeat;
ArTime myLastSentCentralServerHeartbeat;
enum ReturnType
{
RETURN_NONE,
RETURN_SINGLE,
RETURN_VIDEO,
RETURN_UNTIL_EMPTY,
RETURN_COMPLEX,
RETURN_VIDEO_OPTIM,
};
std::map<unsigned int, ReturnType> myReturnTypes;
std::map<unsigned int, std::list<ArServerClient *> *> myRequestOnces;
std::map<unsigned int, ArTime *> myLastRequest;
std::map<unsigned int, ArTime *> myLastBroadcast;
ArTime myLastTcpHeartbeat;
ArTime myLastUdpHeartbeat;
ArFunctor1C<ArCentralForwarder, ArNetPacket *> myReceiveDataFunctor;
ArFunctor2C<ArCentralForwarder,
long, unsigned int> myRequestChangedFunctor;
ArFunctor2C<ArCentralForwarder,
ArServerClient *, ArNetPacket *> myRequestOnceFunctor;
ArFunctor1C<ArCentralForwarder,
ArServerClient *> myRobotServerClientRemovedCB;
ArFunctor1C<ArCentralForwarder,
ArNetPacket *> myNetCentralHeartbeatCB;
ArFunctor1C<ArCentralForwarder,
ArServerClient *> myClientServerClientRemovedCB;
};
#endif // ARSERVERSWITCHFORWARDER
| gpl-2.0 |
SergL/aboutttango | wp-content/plugins/calpress-event-calendar/app/view/box_event_contact.php | 955 | <h4 class="calp-section-title"><?php _e( 'Organizer contact info', CALP_PLUGIN_NAME ); ?></h4>
<table class="calp-form">
<tbody>
<tr>
<td class="calp-first">
<label for="calp_contact_name">
<?php _e( 'Contact name:', CALP_PLUGIN_NAME ); ?>
</label>
</td>
<td>
<input type="text" name="calp_contact_name" id="calp_contact_name" value="<?php echo $contact_name; ?>" />
</td>
</tr>
<tr>
<td>
<label for="calp_contact_phone">
<?php _e( 'Phone:', CALP_PLUGIN_NAME ); ?>
</label>
</td>
<td>
<input type="text" name="calp_contact_phone" id="calp_contact_phone" value="<?php echo $contact_phone; ?>" />
</td>
</tr>
<tr>
<td>
<label for="calp_contact_email">
<?php _e( 'E-mail:', CALP_PLUGIN_NAME ); ?>
</label>
</td>
<td>
<input type="text" name="calp_contact_email" id="calp_contact_email" value="<?php echo $contact_email; ?>" />
</td>
</tr>
</tbody>
</table>
| gpl-2.0 |
kuzovkov/wp1 | wp-content/plugins/backwpup/inc/class-page-about.php | 24971 | <?php
/**
* Render plugin about Page.
*
*/
class BackWPup_Page_About {
/**
* Enqueue style.
*
* @return void
*/
public static function admin_print_styles() {
?>
<style type="text/css" media="screen">
#backwpup-page {
background: #fff;
margin-top: 22px;
padding: 0 20px;
}
#backwpup-page .inpsyde + h2 {
visibility: hidden;
}
.welcome {
/* max-width: 960px; */
}
.welcome .welcome_inner {
margin:0 auto;
max-width: 960px;
}
.welcome .welcome_inner h1{
font-size:42px;
}
.welcome .welcome_inner .welcometxt {
margin-bottom: 40px;
overflow: hidden;
border-bottom: 1px #ccc dotted;
text-align: center;
padding-bottom: 25px;
position: relative;
}
.welcome .welcome_inner .welcometxt p{
line-height:20px;
font-size:18px;
}
.welcome .welcome_inner .feature-box{
clear: both;
margin-bottom: 40px;
overflow: hidden;
}
.welcome .welcome_inner .feature-box .feature-image{
float: left;
width:18%;
height:auto;
}
.welcome .welcome_inner .feature-box .feature-image img{
width:100%;
height:auto;
max-width:350px;
}
.welcome .welcome_inner .feature-box .feature-text{
float: left;
width:72%;
padding: 0 0 20px 20px;
}
.welcome .welcome_inner .feature-box-right .feature-text {
padding: 0 20px 20px 0;
}
.welcome .welcome_inner .feature-box .feature-text h3{
color:rgb(0, 155, 204);
font-weight:normal;
font-size:24px;
margin:0 0 10px 0;
text-align:left;
}
.welcome .welcome_inner .feature-box .left {
float:left;
}
.welcome .welcome_inner .feature-box .right {
float:right;
}
.welcome .welcome_inner .featuretitle h3 {
font-size:28px;
font-weight:normal;
text-align:left;
margin-bottom:25px;
}
.welcome .button-primary-bwp {
float:left;
padding:15px;
font-size:18px;
text-decoration:none;
background-color:#38b0eb;
color:#fff;
border:none;
cursor:pointer;
margin: 35px 0;
}
.welcome .button-primary-bwp:hover {
background-color:#064565;
cursor:pointer;
}
@media only screen and (max-width: 1100px), only screen and (max-device-width: 1100px) {
.welcome .welcome_inner h1{
font-size:32px;
}
.welcome .welcome_inner .featuretitle h3 {
font-size:22px;
font-weight:normal;
text-align:left;
margin-bottom:25px;
}
.welcome .welcome_inner .welcometxt p{
line-height:20px;
font-size:14px;
}
.welcome .welcome_inner .feature-box .feature-text h3{
font-weight:normal;
font-size:20px;
margin:0 0 10px 0;
text-align:left;
}
.welcome .welcome_inner .feature-box .feature-text{
width:72%;
font-size:14px;
line-height:20px;
}
.welcome .button-primary-bwp {
float:left;
padding:10px;
font-size:16px;
text-decoration:none;
background-color:#38b0eb;
color:#fff;
border:none;
cursor:pointer;
margin: 35px 0;
}
}
@media only screen and (max-width: 780px), only screen and (max-device-width: 780px) {
.welcome .welcome_inner h1{
font-size:22px;
}
.welcome .welcome_inner .featuretitle h3 {
font-size:22px;
font-weight:normal;
text-align:left;
}
.welcome .welcome_inner .welcometxt p{
line-height:20px;
font-size:14px;
}
.welcome .welcome_inner .feature-box .feature-text h3{
font-weight:normal;
font-size:16px;
margin:0 0 10px 0;
}
.welcome .welcome_inner .feature-box .feature-text{
width:72%;
font-size:12px;
line-height:16px;
text-align:left;
}
.welcome .button-primary-bwp {
float:left;
padding:10px;
font-size:16px;
text-decoration:none;
background-color:#38b0eb;
color:#fff;
border:none;
cursor:pointer;
margin: 35px 0;
}
}
.backwpup_comp {
margin: 20px auto;
width: 100%;
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-size: 16px;
}
.backwpup_comp table {
border: none;
}
.backwpup_comp table tbody tr.even td {
border: none;
background: none;
padding: 15px;
margin: 0;
}
.backwpup_comp table tbody tr.odd td {
border: none;
background: none;
padding: 15px;
margin: 0;
}
.backwpup_comp h3 {
font-family: "Arial", sans-serif;
font-size: 42px;
text-align: center;
font-weight: normal;
color: #333;
line-height: 44px;
margin: 20px 0;
}
.backwpup_comp table tbody tr.ub {
font-family: 'MisoRegular', "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-size: 26px;
}
.backwpup_comp table tbody tr.ubdown {
font-family: 'MisoRegular', "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-size: 26px;
background: none !important;
}
.backwpup_comp table tbody tr.even {
background-image: url(<?php echo BackWPup::get_plugin_data( 'URL' );?>/assets/images/even.png);
}
.backwpup_comp table tbody tr.odd {
background-image: url(<?php echo BackWPup::get_plugin_data( 'URL' );?>/assets/images/odd.png);
}
.backwpup_comp table tbody tr.ub td.pro {
height: 50px;
text-align: center;
background: url(<?php echo BackWPup::get_plugin_data( 'URL' );?>/assets/images/hgtopgreen.png) no-repeat bottom center;
color: #fff;
border-left: 1px solid #112a32;
}
.backwpup_comp table tbody tr.ub td.free {
height: 50px;
text-align: center;
background: url(<?php echo BackWPup::get_plugin_data( 'URL' );?>/assets/images/hgtopgreen.png) no-repeat bottom center;
color: #fff;
}
.backwpup_comp table tbody tr.ubdown td.pro {
height: 50px;
text-align: center;
background: url(<?php echo BackWPup::get_plugin_data( 'URL' );?>/assets/images/hgbtgreen.png) no-repeat top center;
color: #fff;
border-left: 1px solid #1c3e49;
}
.backwpup_comp table tbody tr.ubdown td.pro a {
color: #fff;
text-decoration: none;
cursor: auto;
font-weight: 300;
line-height: 1.4em;
font-size: 18px;
}
.backwpup_comp table tbody tr.ubdown td.free {
height: 50px;
text-align: center;
background: url(<?php echo BackWPup::get_plugin_data( 'URL' );?>/assets/images/hgbtred.png) no-repeat top center;
color: #fff;
}
.backwpup_comp table tbody tr.ubdown td.free a {
color: #fff;
}
.backwpup_comp table tbody tr.even td.tick {
width: 100px;
background: url(<?php echo BackWPup::get_plugin_data( 'URL' );?>/assets/images/tickeven.png) no-repeat center;
border-bottom: 1px solid #799e14;
border-top: 1px solid #a2d123;
border-left: 1px solid #799e14;
}
.backwpup_comp table tbody tr.odd td.tick {
width: 100px;
background: url(<?php echo BackWPup::get_plugin_data( 'URL' );?>/assets/images/tickodd.png) no-repeat center;
border-left: 1px solid #799e14;
}
.backwpup_comp table tbody tr.even td.error {
width: 100px;
background: url(<?php echo BackWPup::get_plugin_data( 'URL' );?>/assets/images/erroreven.png) no-repeat center;
border-bottom: 1px solid #b13020;
border-top: 1px solid #e84936;
}
.backwpup_comp table tbody tr.odd td.error {
width: 100px;
background: url(<?php echo BackWPup::get_plugin_data( 'URL' );?>/assets/images/errorodd.png) no-repeat center;
}
.backwpup_comp table tbody tr.even:hover {
background-image: url(<?php echo BackWPup::get_plugin_data( 'URL' );?>/assets/images/hover.png);
}
.backwpup_comp table tbody tr.odd:hover {
background-image: url(<?php echo BackWPup::get_plugin_data( 'URL' );?>/assets/images/hover.png);
}
.backwpup_comp table tbody tr.even:hover td.tick {
background: url(<?php echo BackWPup::get_plugin_data( 'URL' );?>/assets/images/tickhover.png) center;
}
.backwpup_comp table tbody tr.odd:hover td.tick {
background: url(<?php echo BackWPup::get_plugin_data( 'URL' );?>/assets/images/tickhover.png) center;
}
.backwpup_comp table tbody tr.even:hover td.error {
background: url(<?php echo BackWPup::get_plugin_data( 'URL' );?>/assets/images/errorhover.png) center;
}
.backwpup_comp table tbody tr.odd:hover td.error {
background: url(<?php echo BackWPup::get_plugin_data( 'URL' );?>/assets/images/errorhover.png) center;
}
.backwpup_comp table tbody tr.ubdown:hover td.pro:hover {
background: url(<?php echo BackWPup::get_plugin_data( 'URL' );?>/assets/images/hgbtgreenhover.png) no-repeat top center;
}
.backwpup_comp table tbody tr.ubdown:hover td.free:hover {
background: url(<?php echo BackWPup::get_plugin_data( 'URL' );?>/assets/images/hgbtredhover.png) no-repeat top center;
}
</style>
<?php
}
/**
* Enqueue script.
*
* @return void
*/
public static function admin_print_scripts() {
wp_enqueue_script( 'backwpupgeneral' );
}
/**
* Print the markup.
*
* @return void
*/
public static function page() {
?>
<div class="wrap" id="backwpup-page">
<?php BackWPup_Admin::display_messages(); ?>
<div class="welcome">
<div class="welcome_inner">
<?php if ( class_exists( 'BackWPup_Pro', FALSE ) ) { ?>
<div class="welcometxt">
<div class="backwpup-welcome">
<img class="backwpup-banner-img" src="<?php echo BackWPup::get_plugin_data( 'URL' );?>/assets/images/backwpupbanner-pro.png" />
<h1><?php esc_html_e( 'Welcome to BackWPup Pro', 'backwpup' ); ?></h1>
<p><?php esc_html_e( 'BackWPup’s job wizards make planning and scheduling your backup jobs a breeze.', 'backwpup' ); echo ' ';
_e( 'Use your backup archives to save your entire WordPress installation including <code>/wp-content/</code>. Push them to an external storage service if you don’t want to save the backups on the same server. With a single backup archive you are able to restore an installation. Use a tool like phpMyAdmin or a plugin like <a href="http://wordpress.org/plugins/adminer/" target="_blank">Adminer</a> to restore your database backup files.', 'backwpup' ); ?></p>
<p><?php echo str_replace( '\"','"', sprintf( __( 'Ready to <a href="%1$s">set up a backup job</a>? You can <a href="%2$s">use the wizards</a> or plan your backup in expert mode.', 'backwpup' ), network_admin_url( 'admin.php').'?page=backwpupeditjob' , network_admin_url( 'admin.php').'?page=backwpupwizard' ) ); ?></p>
</div>
</div>
<?php } else {?>
<div class="welcometxt">
<div class="backwpup-welcome">
<img class="backwpup-banner-img" src="<?php echo esc_attr( BackWPup::get_plugin_data( 'URL' ));?>/assets/images/backwpupbanner-free.png" />
<h1><?php esc_html_e( 'Welcome to BackWPup', 'backwpup' ); ?></h1>
<p><?php
_e( 'Use your backup archives to save your entire WordPress installation including <code>/wp-content/</code>. Push them to an external storage service if you don’t want to save the backups on the same server. With a single backup archive you are able to restore an installation. Use a tool like phpMyAdmin or a plugin like <a href="http://wordpress.org/plugins/adminer/" target="_blank">Adminer</a> to restore your database backup files.', 'backwpup' ); ?></p>
<p><?php esc_html_e( 'Ready to set up a backup job? Use one of the wizards to plan what you want to save.', 'backwpup' ); ?></p>
</div>
</div>
<?php } ?>
<?php
if ( class_exists( 'BackWPup_Pro', FALSE ) ) :
$autoupdate = BackWPup_Pro_MarketPress_Autoupdate::get_instance();
if ( $autoupdate->license_check() == 'false' ) :
$plugins = get_plugins();
$localplugin = FALSE;
foreach ( $plugins as $plugin ) {
if ( BackWPup::get_plugin_data( 'Name' ) == $plugin[ 'Name' ] )
$localplugin = TRUE;
}
?>
<div class="welcometxt">
<div class="backwpup-welcome">
<h3><?php esc_html_e( 'Please activate your license', 'backwpup' ); ?></h3>
<p><a href="<?php echo $localplugin ? esc_attr(admin_url( 'plugins.php' )) : esc_attr(network_admin_url( 'plugins.php' )); ?>"><?php esc_html_e( 'Please go to your plugin page and active the license to have the autoupdates enabled.', 'backwpup' ); ?></a></p>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
<div class="features">
<div class="feature-box <?php self::feature_class(); ?>">
<div class="feature-image">
<img title="<?php esc_html_e( 'Save your database', 'backwpup' ); ?>" src="<?php echo esc_attr(BackWPup::get_plugin_data( 'URL' )); ?>/assets/images/imagesave.png" />
</div>
<div class="feature-text">
<h3><?php esc_html_e( 'Save your database regularly', 'backwpup' ); ?></h3>
<p><?php echo str_replace( '\"','"', sprintf( __( 'With BackWPup you can schedule the database backup to run automatically. With a single backup file you can restore your database. You should <a href="%s">set up a backup job</a>, so you will never forget it. There is also an option to repair and optimize the database after each backup.', 'backwpup' ), network_admin_url( 'admin.php').'?page=backwpupeditjob' ) ); ?></p>
</div>
</div>
<div class="feature-box <?php self::feature_class(); ?>">
<div class="feature-text">
<h3><?php esc_html_e('WordPress XML Export', 'backwpup' ); ?></h3>
<p><?php esc_html_e('You can choose the built-in WordPress export format in addition or exclusive to save your data. This works in automated backups too of course. The advantage is: you can import these files into a blog with the regular WordPress importer.', 'backwpup'); ?></p>
</div>
<div class="feature-image">
<img title="<?php esc_html_e( 'WordPress XML Export', 'backwpup' ); ?>" src="<?php echo BackWPup::get_plugin_data( 'URL' ); ?>/assets/images/imagexml.png" />
</div>
</div>
<div class="feature-box <?php self::feature_class(); ?>">
<div class="feature-image">
<img title="<?php esc_html_e( 'Save all data from the webserver', 'backwpup' ); ?>" src="<?php echo BackWPup::get_plugin_data( 'URL' ); ?>/assets/images/imagedata.png" />
</div>
<div class="feature-text">
<h3><?php esc_html_e('Save all files', 'backwpup'); ?></h3>
<p><?php echo str_replace( '\"','"', sprintf( __('You can backup all your attachments, also all system files, plugins and themes in a single file. You can <a href="%s">create a job</a> to update a backup copy of your file system only when files are changed.', 'backwpup'), network_admin_url( 'admin.php' ) . '?page=backwpupeditjob' ) ); ?></p>
</div>
</div>
<div class="feature-box <?php self::feature_class(); ?>">
<div class="feature-text">
<h3><?php esc_html_e( 'Security!', 'backwpup' ); ?></h3>
<p><?php esc_html_e('By default everything is encrypted: connections to external services, local files and access to directories.', 'backwpup'); ?></p>
</div>
<div class="feature-image">
<img title="<?php esc_html_e( 'Security!', 'backwpup' ); ?>" src="<?php echo esc_attr(BackWPup::get_plugin_data( 'URL' )); ?>/assets/images/imagesec.png" />
</div>
</div>
<div class="feature-box <?php self::feature_class(); ?>">
<div class="feature-image">
<img title="<?php esc_html_e( 'Cloud Support', 'backwpup' ); ?>" src="<?php echo BackWPup::get_plugin_data( 'URL' ); ?>/assets/images/imagecloud.png" />
</div>
<div class="feature-text">
<h3><?php esc_html_e( 'Cloud Support', 'backwpup' ); ?></h3>
<p><?php esc_html_e( 'BackWPup supports multiple cloud services in parallel. This ensures backups are redundant.', 'backwpup' ); ?></p>
</div>
</div>
</div>
</div>
<div class="backwpup_comp">
<h3><?php esc_html_e( 'Features / differences between Free and Pro', 'backwpup' ); ?></h3>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="even ub">
<td><?php esc_html_e( 'Features', 'backwpup' ); ?></td>
<td class="free"><?php esc_html_e( 'FREE', 'backwpup' ); ?></td>
<td class="pro"><?php esc_html_e( 'PRO', 'backwpup' ); ?></td>
</tr>
<tr class="odd">
<td><?php esc_html_e( 'Complete database backup', 'backwpup' ); ?></td>
<td class="tick"></td>
<td class="tick"></td>
</tr>
<tr class="even">
<td><?php esc_html_e( 'Complete file backup', 'backwpup' ); ?></td>
<td class="tick"></td>
<td class="tick"></td>
</tr>
<tr class="odd">
<td><?php esc_html_e( 'Database check', 'backwpup' ); ?></td>
<td class="tick"></td>
<td class="tick"></td>
</tr>
<tr class="even">
<td><?php esc_html_e( 'Data compression', 'backwpup' ); ?></td>
<td class="tick"></td>
<td class="tick"></td>
</tr>
<tr class="odd">
<td><?php esc_html_e( 'WordPress XML export', 'backwpup' ); ?></td>
<td class="tick"></td>
<td class="tick"></td>
</tr>
<tr class="even">
<td><?php esc_html_e( 'List of installed plugins', 'backwpup' ); ?></td>
<td class="tick"></td>
<td class="tick"></td>
</tr>
<tr class="odd">
<td><?php esc_html_e( 'Backup archives management', 'backwpup' ); ?></td>
<td class="tick"></td>
<td class="tick"></td>
</tr>
<tr class="even">
<td><?php esc_html_e( 'Log file management', 'backwpup' ); ?></td>
<td class="tick"></td>
<td class="tick"></td>
</tr>
<tr class="odd">
<td><?php esc_html_e( 'Start jobs per WP-Cron, URL, system, backend or WP-CLI', 'backwpup' ); ?></td>
<td class="tick"></td>
<td class="tick"></td>
</tr>
<tr class="even">
<td><?php esc_html_e( 'Log report via email', 'backwpup' ); ?></td>
<td class="tick"></td>
<td class="tick"></td>
</tr>
<tr class="odd">
<td><?php esc_html_e( 'Backup to Microsoft Azure', 'backwpup' ); ?></td>
<td class="tick"></td>
<td class="tick"></td>
</tr>
<tr class="even">
<td><?php esc_html_e( 'Backup as email', 'backwpup' ); ?></td>
<td class="tick"></td>
<td class="tick"></td>
</tr>
<tr class="odd">
<td><?php esc_html_e( 'Backup to S3 services <small>(Amazon, Google Storage, Hosteurope and more)</small>', 'backwpup' ); ?></td>
<td class="tick"></td>
<td class="tick"></td>
</tr>
<tr class="even">
<td><?php esc_html_e( 'Backup to Dropbox', 'backwpup' ); ?></td>
<td class="tick"></td>
<td class="tick"></td>
</tr>
<tr class="odd">
<td><?php esc_html_e( 'Backup to Rackspace Cloud Files', 'backwpup' ); ?></td>
<td class="tick"></td>
<td class="tick"></td>
</tr>
<tr class="even">
<td><?php esc_html_e( 'Backup to FTP server', 'backwpup' ); ?></td>
<td class="tick"></td>
<td class="tick"></td>
</tr>
<tr class="odd">
<td><?php esc_html_e( 'Backup to your web space', 'backwpup' ); ?></td>
<td class="tick"></td>
<td class="tick"></td>
</tr>
<tr class="even">
<td><?php esc_html_e( 'Backup to SugarSync', 'backwpup' ); ?></td>
<td class="tick"></td>
<td class="tick"></td>
</tr>
<tr class="odd">
<td><?php esc_html_e( 'Backup to Google Drive', 'backwpup' ); ?></td>
<td class="error"></td>
<td class="tick"></td>
</tr>
<tr class="even">
<td><?php esc_html_e( 'Backup to Amazon Glacier', 'backwpup' ); ?></td>
<td class="error"></td>
<td class="tick"></td>
</tr>
<tr class="odd">
<td><?php esc_html_e( 'Custom API keys for DropBox and SugarSync', 'backwpup' ); ?></td>
<td class="error"></td>
<td class="tick"></td>
</tr>
<tr class="even">
<td><?php esc_html_e( 'XML database backup as PHPMyAdmin schema', 'backwpup' ); ?></td>
<td class="error"></td>
<td class="tick"></td>
</tr>
<tr class="odd">
<td><?php esc_html_e( 'Database backup as mysqldump per command line', 'backwpup' ); ?></td>
<td class="error"></td>
<td class="tick"></td>
</tr>
<tr class="even">
<td><?php esc_html_e( 'Database backup for additional MySQL databases', 'backwpup' ); ?></td>
<td class="error"></td>
<td class="tick"></td>
</tr>
<tr class="odd">
<td><?php esc_html_e( 'Import and export job settings as XML', 'backwpup' ); ?></td>
<td class="error"></td>
<td class="tick"></td>
</tr>
<tr class="even">
<td><?php esc_html_e( 'Wizard for system tests', 'backwpup' ); ?></td>
<td class="error"></td>
<td class="tick"></td>
</tr>
<tr class="odd">
<td><?php esc_html_e( 'Wizard for scheduled backup jobs', 'backwpup' ); ?></td>
<td class="error"></td>
<td class="tick"></td>
</tr>
<tr class="even">
<td><?php esc_html_e( 'Wizard to import settings and backup jobs', 'backwpup' ); ?></td>
<td class="error"></td>
<td class="tick"></td>
</tr>
<tr class="odd">
<td><?php esc_html_e( 'Differential backup of changed directories to Dropbox', 'backwpup' ); ?></td>
<td class="error"></td>
<td class="tick"></td>
</tr>
<tr class="even">
<td><?php esc_html_e( 'Differential backup of changed directories to Rackspace Cloud Files', 'backwpup' ); ?></td>
<td class="error"></td>
<td class="tick"></td>
</tr>
<tr class="odd">
<td><?php esc_html_e( 'Differential backup of changed directories to S3', 'backwpup' ); ?></td>
<td class="error"></td>
<td class="tick"></td>
</tr>
<tr class="even">
<td><?php esc_html_e( 'Differential backup of changed directories to MS Azure', 'backwpup' ); ?></td>
<td class="error"></td>
<td class="tick"></td>
</tr>
<tr class="odd">
<td><?php _e( '<strong>Premium support</strong>', 'backwpup' ); ?></td>
<td class="error"></td>
<td class="tick"></td>
</tr>
<tr class="even">
<td><?php _e( '<strong>Automatic update from MarketPress</strong>', 'backwpup' ); ?></td>
<td class="error" style="border-bottom:none;"></td>
<td class="tick" style="border-bottom:none;"></td>
</tr>
<tr class="odd ubdown">
<td></td>
<td></td>
<td class="pro buylink"><a href="<?php esc_html_e( 'http://backwpup.com', 'backwpup' ); ?>"><?php _e( 'GET PRO', 'backwpup' ); ?></a></td>
</tr>
</table>
</div>
</div>
</div>
<?php
}
/**
* Alternate between 'left' and 'right' CSS class.
*
* @since 2013.02.19
* @return void
*/
protected static function feature_class() {
static $class = 'feature-box-left';
print $class;
$class = 'feature-box-left' === $class ? 'feature-box-right' : 'feature-box-left';
}
}
| gpl-2.0 |
JustAkan/jolla-kernel_GK-GPRO_Gen3 | arch/arm/mach-msm/platsmp.c | 6640 | /*
* Copyright (C) 2002 ARM Ltd.
* All Rights Reserved
* Copyright (c) 2010-2012, Code Aurora Forum. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/cpumask.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/regulator/krait-regulator.h>
#include <asm/hardware/gic.h>
#include <asm/cacheflush.h>
#include <asm/cputype.h>
#include <asm/mach-types.h>
#include <asm/smp_plat.h>
#include <mach/socinfo.h>
#include <mach/hardware.h>
#include <mach/msm_iomap.h>
#include "pm.h"
#include "scm-boot.h"
#include "spm.h"
#define VDD_SC1_ARRAY_CLAMP_GFS_CTL 0x15A0
#define SCSS_CPU1CORE_RESET 0xD80
#define SCSS_DBG_STATUS_CORE_PWRDUP 0xE64
extern void msm_secondary_startup(void);
/*
* control for which core is the next to come out of the secondary
* boot "holding pen".
*/
volatile int pen_release = -1;
/*
* Write pen_release in a way that is guaranteed to be visible to all
* observers, irrespective of whether they're taking part in coherency
* or not. This is necessary for the hotplug code to work reliably.
*/
static void write_pen_release(int val)
{
pen_release = val;
smp_wmb();
__cpuc_flush_dcache_area((void *)&pen_release, sizeof(pen_release));
outer_clean_range(__pa(&pen_release), __pa(&pen_release + 1));
}
static DEFINE_SPINLOCK(boot_lock);
void platform_secondary_init(unsigned int cpu)
{
WARN_ON(msm_platform_secondary_init(cpu));
/*
* if any interrupts are already enabled for the primary
* core (e.g. timer irq), then they will not have been enabled
* for us: do so
*/
gic_secondary_init(0);
/*
* let the primary processor know we're out of the
* pen, then head off into the C entry point
*/
write_pen_release(-1);
/*
* Synchronise with the boot thread.
*/
spin_lock(&boot_lock);
spin_unlock(&boot_lock);
}
static int scorpion_release_secondary(void)
{
void *base_ptr = ioremap_nocache(0x00902000, SZ_4K*2);
if (!base_ptr)
return -EINVAL;
writel_relaxed(0, base_ptr + VDD_SC1_ARRAY_CLAMP_GFS_CTL);
dmb();
writel_relaxed(0, base_ptr + SCSS_CPU1CORE_RESET);
writel_relaxed(3, base_ptr + SCSS_DBG_STATUS_CORE_PWRDUP);
mb();
iounmap(base_ptr);
return 0;
}
static int krait_release_secondary_sim(unsigned long base, int cpu)
{
void *base_ptr = ioremap_nocache(base + (cpu * 0x10000), SZ_4K);
if (!base_ptr)
return -ENODEV;
if (machine_is_msm8974_sim() || machine_is_mpq8092_sim()) {
writel_relaxed(0x800, base_ptr+0x04);
writel_relaxed(0x3FFF, base_ptr+0x14);
}
mb();
iounmap(base_ptr);
return 0;
}
static int krait_release_secondary(unsigned long base, int cpu)
{
void *base_ptr = ioremap_nocache(base + (cpu * 0x10000), SZ_4K);
if (!base_ptr)
return -ENODEV;
msm_spm_turn_on_cpu_rail(cpu);
writel_relaxed(0x109, base_ptr+0x04);
writel_relaxed(0x101, base_ptr+0x04);
mb();
ndelay(300);
writel_relaxed(0x121, base_ptr+0x04);
mb();
udelay(2);
writel_relaxed(0x120, base_ptr+0x04);
mb();
udelay(2);
writel_relaxed(0x100, base_ptr+0x04);
mb();
udelay(100);
writel_relaxed(0x180, base_ptr+0x04);
mb();
iounmap(base_ptr);
return 0;
}
static int krait_release_secondary_p3(unsigned long base, int cpu)
{
void *base_ptr = ioremap_nocache(base + (cpu * 0x10000), SZ_4K);
if (!base_ptr)
return -ENODEV;
secondary_cpu_hs_init(base_ptr);
writel_relaxed(0x021, base_ptr+0x04);
mb();
udelay(2);
writel_relaxed(0x020, base_ptr+0x04);
mb();
udelay(2);
writel_relaxed(0x000, base_ptr+0x04);
mb();
writel_relaxed(0x080, base_ptr+0x04);
mb();
iounmap(base_ptr);
return 0;
}
static int release_secondary(unsigned int cpu)
{
BUG_ON(cpu >= get_core_count());
if (cpu_is_msm8x60())
return scorpion_release_secondary();
if (machine_is_msm8974_sim() || machine_is_mpq8092_sim())
return krait_release_secondary_sim(0xf9088000, cpu);
if (soc_class_is_msm8960() || soc_class_is_msm8930() ||
soc_class_is_apq8064())
return krait_release_secondary(0x02088000, cpu);
if (cpu_is_msm8974())
return krait_release_secondary_p3(0xf9088000, cpu);
WARN(1, "unknown CPU case in release_secondary\n");
return -EINVAL;
}
DEFINE_PER_CPU(int, cold_boot_done);
static int cold_boot_flags[] = {
0,
SCM_FLAG_COLDBOOT_CPU1,
SCM_FLAG_COLDBOOT_CPU2,
SCM_FLAG_COLDBOOT_CPU3,
};
int boot_secondary(unsigned int cpu, struct task_struct *idle)
{
int ret;
unsigned int flag = 0;
unsigned long timeout;
pr_debug("Starting secondary CPU %d\n", cpu);
/* Set preset_lpj to avoid subsequent lpj recalculations */
preset_lpj = loops_per_jiffy;
if (cpu > 0 && cpu < ARRAY_SIZE(cold_boot_flags))
flag = cold_boot_flags[cpu];
else
__WARN();
if (per_cpu(cold_boot_done, cpu) == false) {
ret = scm_set_boot_addr(virt_to_phys(msm_secondary_startup),
flag);
if (ret == 0)
release_secondary(cpu);
else
printk(KERN_DEBUG "Failed to set secondary core boot "
"address\n");
per_cpu(cold_boot_done, cpu) = true;
}
/*
* set synchronisation state between this boot processor
* and the secondary one
*/
spin_lock(&boot_lock);
/*
* The secondary processor is waiting to be released from
* the holding pen - release it, then wait for it to flag
* that it has been released by resetting pen_release.
*
* Note that "pen_release" is the hardware CPU ID, whereas
* "cpu" is Linux's internal ID.
*/
write_pen_release(cpu_logical_map(cpu));
/*
* Send the secondary CPU a soft interrupt, thereby causing
* the boot monitor to read the system wide flags register,
* and branch to the address found there.
*/
gic_raise_softirq(cpumask_of(cpu), 1);
timeout = jiffies + (1 * HZ);
while (time_before(jiffies, timeout)) {
smp_rmb();
if (pen_release == -1)
break;
udelay(10);
}
/*
* now the secondary core is starting up let it run its
* calibrations, then wait for it to finish
*/
spin_unlock(&boot_lock);
return pen_release != -1 ? -ENOSYS : 0;
}
/*
* Initialise the CPU possible map early - this describes the CPUs
* which may be present or become present in the system.
*/
void __init smp_init_cpus(void)
{
unsigned int i, ncores = get_core_count();
if (ncores > nr_cpu_ids) {
pr_warn("SMP: %u cores greater than maximum (%u), clipping\n",
ncores, nr_cpu_ids);
ncores = nr_cpu_ids;
}
for (i = 0; i < ncores; i++)
set_cpu_possible(i, true);
set_smp_cross_call(gic_raise_softirq);
}
void __init platform_smp_prepare_cpus(unsigned int max_cpus)
{
}
| gpl-2.0 |
Carbenium/TrinityCore | cmake/options.cmake | 2788 | # Copyright (C) 2008-2019 TrinityCore <https://www.trinitycore.org/>
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
option(SERVERS "Build worldserver and bnetserver" 1)
set(SCRIPTS_AVAILABLE_OPTIONS none static dynamic minimal-static minimal-dynamic)
# Log a fatal error when the value of the SCRIPTS variable isn't a valid option.
if (SCRIPTS)
list (FIND SCRIPTS_AVAILABLE_OPTIONS "${SCRIPTS}" SCRIPTS_INDEX)
if (${SCRIPTS_INDEX} EQUAL -1)
message(FATAL_ERROR "The value (${SCRIPTS}) of your SCRIPTS variable is invalid! "
"Allowed values are: ${SCRIPTS_AVAILABLE_OPTIONS} if you still "
"have problems search on forum for TCE00019.")
endif()
endif()
set(SCRIPTS "static" CACHE STRING "Build core with scripts")
set_property(CACHE SCRIPTS PROPERTY STRINGS ${SCRIPTS_AVAILABLE_OPTIONS})
# Build a list of all script modules when -DSCRIPT="custom" is selected
GetScriptModuleList(SCRIPT_MODULE_LIST)
foreach(SCRIPT_MODULE ${SCRIPT_MODULE_LIST})
ScriptModuleNameToVariable(${SCRIPT_MODULE} SCRIPT_MODULE_VARIABLE)
set(${SCRIPT_MODULE_VARIABLE} "default" CACHE STRING "Build type of the ${SCRIPT_MODULE} module.")
set_property(CACHE ${SCRIPT_MODULE_VARIABLE} PROPERTY STRINGS default disabled static dynamic)
endforeach()
option(TOOLS "Build map/vmap/mmap extraction/assembler tools" 1)
option(USE_SCRIPTPCH "Use precompiled headers when compiling scripts" 1)
option(USE_COREPCH "Use precompiled headers when compiling servers" 1)
option(WITH_DYNAMIC_LINKING "Enable dynamic library linking." 0)
IsDynamicLinkingRequired(WITH_DYNAMIC_LINKING_FORCED)
if (WITH_DYNAMIC_LINKING AND WITH_DYNAMIC_LINKING_FORCED)
set(WITH_DYNAMIC_LINKING_FORCED OFF)
endif()
if (WITH_DYNAMIC_LINKING OR WITH_DYNAMIC_LINKING_FORCED)
set(BUILD_SHARED_LIBS ON)
else()
set(BUILD_SHARED_LIBS OFF)
endif()
option(WITH_WARNINGS "Show all warnings during compile" 0)
option(WITH_COREDEBUG "Include additional debug-code in core" 0)
set(WITH_SOURCE_TREE "hierarchical" CACHE STRING "Build the source tree for IDE's.")
set_property(CACHE WITH_SOURCE_TREE PROPERTY STRINGS no flat hierarchical hierarchical-folders)
option(WITHOUT_GIT "Disable the GIT testing routines" 0)
| gpl-2.0 |
sjp38/linux.doc_trans_membarrier | drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 15493 | /*
* Copyright (c) 2010 Red Hat Inc.
* Author : Dave Airlie <[email protected]>
*
* Licensed under GPLv2
*
* ATPX support for both Intel/ATI
*/
#include <linux/vga_switcheroo.h>
#include <linux/slab.h>
#include <linux/acpi.h>
#include <linux/pci.h>
#include <linux/delay.h>
#include "amd_acpi.h"
struct amdgpu_atpx_functions {
bool px_params;
bool power_cntl;
bool disp_mux_cntl;
bool i2c_mux_cntl;
bool switch_start;
bool switch_end;
bool disp_connectors_mapping;
bool disp_detetion_ports;
};
struct amdgpu_atpx {
acpi_handle handle;
struct amdgpu_atpx_functions functions;
bool is_hybrid;
};
static struct amdgpu_atpx_priv {
bool atpx_detected;
/* handle for device - and atpx */
acpi_handle dhandle;
acpi_handle other_handle;
struct amdgpu_atpx atpx;
} amdgpu_atpx_priv;
struct atpx_verify_interface {
u16 size; /* structure size in bytes (includes size field) */
u16 version; /* version */
u32 function_bits; /* supported functions bit vector */
} __packed;
struct atpx_px_params {
u16 size; /* structure size in bytes (includes size field) */
u32 valid_flags; /* which flags are valid */
u32 flags; /* flags */
} __packed;
struct atpx_power_control {
u16 size;
u8 dgpu_state;
} __packed;
struct atpx_mux {
u16 size;
u16 mux;
} __packed;
bool amdgpu_has_atpx(void) {
return amdgpu_atpx_priv.atpx_detected;
}
bool amdgpu_has_atpx_dgpu_power_cntl(void) {
return amdgpu_atpx_priv.atpx.functions.power_cntl;
}
bool amdgpu_is_atpx_hybrid(void) {
return amdgpu_atpx_priv.atpx.is_hybrid;
}
/**
* amdgpu_atpx_call - call an ATPX method
*
* @handle: acpi handle
* @function: the ATPX function to execute
* @params: ATPX function params
*
* Executes the requested ATPX function (all asics).
* Returns a pointer to the acpi output buffer.
*/
static union acpi_object *amdgpu_atpx_call(acpi_handle handle, int function,
struct acpi_buffer *params)
{
acpi_status status;
union acpi_object atpx_arg_elements[2];
struct acpi_object_list atpx_arg;
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
atpx_arg.count = 2;
atpx_arg.pointer = &atpx_arg_elements[0];
atpx_arg_elements[0].type = ACPI_TYPE_INTEGER;
atpx_arg_elements[0].integer.value = function;
if (params) {
atpx_arg_elements[1].type = ACPI_TYPE_BUFFER;
atpx_arg_elements[1].buffer.length = params->length;
atpx_arg_elements[1].buffer.pointer = params->pointer;
} else {
/* We need a second fake parameter */
atpx_arg_elements[1].type = ACPI_TYPE_INTEGER;
atpx_arg_elements[1].integer.value = 0;
}
status = acpi_evaluate_object(handle, NULL, &atpx_arg, &buffer);
/* Fail only if calling the method fails and ATPX is supported */
if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
printk("failed to evaluate ATPX got %s\n",
acpi_format_exception(status));
kfree(buffer.pointer);
return NULL;
}
return buffer.pointer;
}
/**
* amdgpu_atpx_parse_functions - parse supported functions
*
* @f: supported functions struct
* @mask: supported functions mask from ATPX
*
* Use the supported functions mask from ATPX function
* ATPX_FUNCTION_VERIFY_INTERFACE to determine what functions
* are supported (all asics).
*/
static void amdgpu_atpx_parse_functions(struct amdgpu_atpx_functions *f, u32 mask)
{
f->px_params = mask & ATPX_GET_PX_PARAMETERS_SUPPORTED;
f->power_cntl = mask & ATPX_POWER_CONTROL_SUPPORTED;
f->disp_mux_cntl = mask & ATPX_DISPLAY_MUX_CONTROL_SUPPORTED;
f->i2c_mux_cntl = mask & ATPX_I2C_MUX_CONTROL_SUPPORTED;
f->switch_start = mask & ATPX_GRAPHICS_DEVICE_SWITCH_START_NOTIFICATION_SUPPORTED;
f->switch_end = mask & ATPX_GRAPHICS_DEVICE_SWITCH_END_NOTIFICATION_SUPPORTED;
f->disp_connectors_mapping = mask & ATPX_GET_DISPLAY_CONNECTORS_MAPPING_SUPPORTED;
f->disp_detetion_ports = mask & ATPX_GET_DISPLAY_DETECTION_PORTS_SUPPORTED;
}
/**
* amdgpu_atpx_validate_functions - validate ATPX functions
*
* @atpx: amdgpu atpx struct
*
* Validate that required functions are enabled (all asics).
* returns 0 on success, error on failure.
*/
static int amdgpu_atpx_validate(struct amdgpu_atpx *atpx)
{
u32 valid_bits = 0;
if (atpx->functions.px_params) {
union acpi_object *info;
struct atpx_px_params output;
size_t size;
info = amdgpu_atpx_call(atpx->handle, ATPX_FUNCTION_GET_PX_PARAMETERS, NULL);
if (!info)
return -EIO;
memset(&output, 0, sizeof(output));
size = *(u16 *) info->buffer.pointer;
if (size < 10) {
printk("ATPX buffer is too small: %zu\n", size);
kfree(info);
return -EINVAL;
}
size = min(sizeof(output), size);
memcpy(&output, info->buffer.pointer, size);
valid_bits = output.flags & output.valid_flags;
kfree(info);
}
/* if separate mux flag is set, mux controls are required */
if (valid_bits & ATPX_SEPARATE_MUX_FOR_I2C) {
atpx->functions.i2c_mux_cntl = true;
atpx->functions.disp_mux_cntl = true;
}
/* if any outputs are muxed, mux controls are required */
if (valid_bits & (ATPX_CRT1_RGB_SIGNAL_MUXED |
ATPX_TV_SIGNAL_MUXED |
ATPX_DFP_SIGNAL_MUXED))
atpx->functions.disp_mux_cntl = true;
/* some bioses set these bits rather than flagging power_cntl as supported */
if (valid_bits & (ATPX_DYNAMIC_PX_SUPPORTED |
ATPX_DYNAMIC_DGPU_POWER_OFF_SUPPORTED))
atpx->functions.power_cntl = true;
atpx->is_hybrid = false;
if (valid_bits & ATPX_MS_HYBRID_GFX_SUPPORTED) {
printk("ATPX Hybrid Graphics\n");
#if 1
/* This is a temporary hack until the D3 cold support
* makes it upstream. The ATPX power_control method seems
* to still work on even if the system should be using
* the new standardized hybrid D3 cold ACPI interface.
*/
atpx->functions.power_cntl = true;
#else
atpx->functions.power_cntl = false;
#endif
atpx->is_hybrid = true;
}
return 0;
}
/**
* amdgpu_atpx_verify_interface - verify ATPX
*
* @atpx: amdgpu atpx struct
*
* Execute the ATPX_FUNCTION_VERIFY_INTERFACE ATPX function
* to initialize ATPX and determine what features are supported
* (all asics).
* returns 0 on success, error on failure.
*/
static int amdgpu_atpx_verify_interface(struct amdgpu_atpx *atpx)
{
union acpi_object *info;
struct atpx_verify_interface output;
size_t size;
int err = 0;
info = amdgpu_atpx_call(atpx->handle, ATPX_FUNCTION_VERIFY_INTERFACE, NULL);
if (!info)
return -EIO;
memset(&output, 0, sizeof(output));
size = *(u16 *) info->buffer.pointer;
if (size < 8) {
printk("ATPX buffer is too small: %zu\n", size);
err = -EINVAL;
goto out;
}
size = min(sizeof(output), size);
memcpy(&output, info->buffer.pointer, size);
/* TODO: check version? */
printk("ATPX version %u, functions 0x%08x\n",
output.version, output.function_bits);
amdgpu_atpx_parse_functions(&atpx->functions, output.function_bits);
out:
kfree(info);
return err;
}
/**
* amdgpu_atpx_set_discrete_state - power up/down discrete GPU
*
* @atpx: atpx info struct
* @state: discrete GPU state (0 = power down, 1 = power up)
*
* Execute the ATPX_FUNCTION_POWER_CONTROL ATPX function to
* power down/up the discrete GPU (all asics).
* Returns 0 on success, error on failure.
*/
static int amdgpu_atpx_set_discrete_state(struct amdgpu_atpx *atpx, u8 state)
{
struct acpi_buffer params;
union acpi_object *info;
struct atpx_power_control input;
if (atpx->functions.power_cntl) {
input.size = 3;
input.dgpu_state = state;
params.length = input.size;
params.pointer = &input;
info = amdgpu_atpx_call(atpx->handle,
ATPX_FUNCTION_POWER_CONTROL,
¶ms);
if (!info)
return -EIO;
kfree(info);
/* 200ms delay is required after off */
if (state == 0)
msleep(200);
}
return 0;
}
/**
* amdgpu_atpx_switch_disp_mux - switch display mux
*
* @atpx: atpx info struct
* @mux_id: mux state (0 = integrated GPU, 1 = discrete GPU)
*
* Execute the ATPX_FUNCTION_DISPLAY_MUX_CONTROL ATPX function to
* switch the display mux between the discrete GPU and integrated GPU
* (all asics).
* Returns 0 on success, error on failure.
*/
static int amdgpu_atpx_switch_disp_mux(struct amdgpu_atpx *atpx, u16 mux_id)
{
struct acpi_buffer params;
union acpi_object *info;
struct atpx_mux input;
if (atpx->functions.disp_mux_cntl) {
input.size = 4;
input.mux = mux_id;
params.length = input.size;
params.pointer = &input;
info = amdgpu_atpx_call(atpx->handle,
ATPX_FUNCTION_DISPLAY_MUX_CONTROL,
¶ms);
if (!info)
return -EIO;
kfree(info);
}
return 0;
}
/**
* amdgpu_atpx_switch_i2c_mux - switch i2c/hpd mux
*
* @atpx: atpx info struct
* @mux_id: mux state (0 = integrated GPU, 1 = discrete GPU)
*
* Execute the ATPX_FUNCTION_I2C_MUX_CONTROL ATPX function to
* switch the i2c/hpd mux between the discrete GPU and integrated GPU
* (all asics).
* Returns 0 on success, error on failure.
*/
static int amdgpu_atpx_switch_i2c_mux(struct amdgpu_atpx *atpx, u16 mux_id)
{
struct acpi_buffer params;
union acpi_object *info;
struct atpx_mux input;
if (atpx->functions.i2c_mux_cntl) {
input.size = 4;
input.mux = mux_id;
params.length = input.size;
params.pointer = &input;
info = amdgpu_atpx_call(atpx->handle,
ATPX_FUNCTION_I2C_MUX_CONTROL,
¶ms);
if (!info)
return -EIO;
kfree(info);
}
return 0;
}
/**
* amdgpu_atpx_switch_start - notify the sbios of a GPU switch
*
* @atpx: atpx info struct
* @mux_id: mux state (0 = integrated GPU, 1 = discrete GPU)
*
* Execute the ATPX_FUNCTION_GRAPHICS_DEVICE_SWITCH_START_NOTIFICATION ATPX
* function to notify the sbios that a switch between the discrete GPU and
* integrated GPU has begun (all asics).
* Returns 0 on success, error on failure.
*/
static int amdgpu_atpx_switch_start(struct amdgpu_atpx *atpx, u16 mux_id)
{
struct acpi_buffer params;
union acpi_object *info;
struct atpx_mux input;
if (atpx->functions.switch_start) {
input.size = 4;
input.mux = mux_id;
params.length = input.size;
params.pointer = &input;
info = amdgpu_atpx_call(atpx->handle,
ATPX_FUNCTION_GRAPHICS_DEVICE_SWITCH_START_NOTIFICATION,
¶ms);
if (!info)
return -EIO;
kfree(info);
}
return 0;
}
/**
* amdgpu_atpx_switch_end - notify the sbios of a GPU switch
*
* @atpx: atpx info struct
* @mux_id: mux state (0 = integrated GPU, 1 = discrete GPU)
*
* Execute the ATPX_FUNCTION_GRAPHICS_DEVICE_SWITCH_END_NOTIFICATION ATPX
* function to notify the sbios that a switch between the discrete GPU and
* integrated GPU has ended (all asics).
* Returns 0 on success, error on failure.
*/
static int amdgpu_atpx_switch_end(struct amdgpu_atpx *atpx, u16 mux_id)
{
struct acpi_buffer params;
union acpi_object *info;
struct atpx_mux input;
if (atpx->functions.switch_end) {
input.size = 4;
input.mux = mux_id;
params.length = input.size;
params.pointer = &input;
info = amdgpu_atpx_call(atpx->handle,
ATPX_FUNCTION_GRAPHICS_DEVICE_SWITCH_END_NOTIFICATION,
¶ms);
if (!info)
return -EIO;
kfree(info);
}
return 0;
}
/**
* amdgpu_atpx_switchto - switch to the requested GPU
*
* @id: GPU to switch to
*
* Execute the necessary ATPX functions to switch between the discrete GPU and
* integrated GPU (all asics).
* Returns 0 on success, error on failure.
*/
static int amdgpu_atpx_switchto(enum vga_switcheroo_client_id id)
{
u16 gpu_id;
if (id == VGA_SWITCHEROO_IGD)
gpu_id = ATPX_INTEGRATED_GPU;
else
gpu_id = ATPX_DISCRETE_GPU;
amdgpu_atpx_switch_start(&amdgpu_atpx_priv.atpx, gpu_id);
amdgpu_atpx_switch_disp_mux(&amdgpu_atpx_priv.atpx, gpu_id);
amdgpu_atpx_switch_i2c_mux(&amdgpu_atpx_priv.atpx, gpu_id);
amdgpu_atpx_switch_end(&amdgpu_atpx_priv.atpx, gpu_id);
return 0;
}
/**
* amdgpu_atpx_power_state - power down/up the requested GPU
*
* @id: GPU to power down/up
* @state: requested power state (0 = off, 1 = on)
*
* Execute the necessary ATPX function to power down/up the discrete GPU
* (all asics).
* Returns 0 on success, error on failure.
*/
static int amdgpu_atpx_power_state(enum vga_switcheroo_client_id id,
enum vga_switcheroo_state state)
{
/* on w500 ACPI can't change intel gpu state */
if (id == VGA_SWITCHEROO_IGD)
return 0;
amdgpu_atpx_set_discrete_state(&amdgpu_atpx_priv.atpx, state);
return 0;
}
/**
* amdgpu_atpx_pci_probe_handle - look up the ATPX handle
*
* @pdev: pci device
*
* Look up the ATPX handles (all asics).
* Returns true if the handles are found, false if not.
*/
static bool amdgpu_atpx_pci_probe_handle(struct pci_dev *pdev)
{
acpi_handle dhandle, atpx_handle;
acpi_status status;
dhandle = ACPI_HANDLE(&pdev->dev);
if (!dhandle)
return false;
status = acpi_get_handle(dhandle, "ATPX", &atpx_handle);
if (ACPI_FAILURE(status)) {
amdgpu_atpx_priv.other_handle = dhandle;
return false;
}
amdgpu_atpx_priv.dhandle = dhandle;
amdgpu_atpx_priv.atpx.handle = atpx_handle;
return true;
}
/**
* amdgpu_atpx_init - verify the ATPX interface
*
* Verify the ATPX interface (all asics).
* Returns 0 on success, error on failure.
*/
static int amdgpu_atpx_init(void)
{
int r;
/* set up the ATPX handle */
r = amdgpu_atpx_verify_interface(&amdgpu_atpx_priv.atpx);
if (r)
return r;
/* validate the atpx setup */
r = amdgpu_atpx_validate(&amdgpu_atpx_priv.atpx);
if (r)
return r;
return 0;
}
/**
* amdgpu_atpx_get_client_id - get the client id
*
* @pdev: pci device
*
* look up whether we are the integrated or discrete GPU (all asics).
* Returns the client id.
*/
static int amdgpu_atpx_get_client_id(struct pci_dev *pdev)
{
if (amdgpu_atpx_priv.dhandle == ACPI_HANDLE(&pdev->dev))
return VGA_SWITCHEROO_IGD;
else
return VGA_SWITCHEROO_DIS;
}
static const struct vga_switcheroo_handler amdgpu_atpx_handler = {
.switchto = amdgpu_atpx_switchto,
.power_state = amdgpu_atpx_power_state,
.init = amdgpu_atpx_init,
.get_client_id = amdgpu_atpx_get_client_id,
};
/**
* amdgpu_atpx_detect - detect whether we have PX
*
* Check if we have a PX system (all asics).
* Returns true if we have a PX system, false if not.
*/
static bool amdgpu_atpx_detect(void)
{
char acpi_method_name[255] = { 0 };
struct acpi_buffer buffer = {sizeof(acpi_method_name), acpi_method_name};
struct pci_dev *pdev = NULL;
bool has_atpx = false;
int vga_count = 0;
while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev)) != NULL) {
vga_count++;
has_atpx |= (amdgpu_atpx_pci_probe_handle(pdev) == true);
}
while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_OTHER << 8, pdev)) != NULL) {
vga_count++;
has_atpx |= (amdgpu_atpx_pci_probe_handle(pdev) == true);
}
if (has_atpx && vga_count == 2) {
acpi_get_name(amdgpu_atpx_priv.atpx.handle, ACPI_FULL_PATHNAME, &buffer);
printk(KERN_INFO "vga_switcheroo: detected switching method %s handle\n",
acpi_method_name);
amdgpu_atpx_priv.atpx_detected = true;
return true;
}
return false;
}
/**
* amdgpu_register_atpx_handler - register with vga_switcheroo
*
* Register the PX callbacks with vga_switcheroo (all asics).
*/
void amdgpu_register_atpx_handler(void)
{
bool r;
enum vga_switcheroo_handler_flags_t handler_flags = 0;
/* detect if we have any ATPX + 2 VGA in the system */
r = amdgpu_atpx_detect();
if (!r)
return;
vga_switcheroo_register_handler(&amdgpu_atpx_handler, handler_flags);
}
/**
* amdgpu_unregister_atpx_handler - unregister with vga_switcheroo
*
* Unregister the PX callbacks with vga_switcheroo (all asics).
*/
void amdgpu_unregister_atpx_handler(void)
{
vga_switcheroo_unregister_handler();
}
| gpl-2.0 |
FlightGear/fgmap | scripts/all2sql.sh | 1236 | #!/bin/sh
#FG_ROOT=
if [ -n "$1" ]; then
FG_ROOT="$1"
fi
if [ -z "${FG_ROOT}" ]; then
echo "Please set FG_ROOT or pass a FG_ROOT path"
exit -1
fi
if [ ! -d "${FG_ROOT}" ]; then
echo "${FG_ROOT} is not a directory."
exit -1
fi
APT=${FG_ROOT}/Airports/apt.dat.gz
NAV=${FG_ROOT}/Navaids/nav.dat.gz
FIX=${FG_ROOT}/Navaids/fix.dat.gz
AWY=${FG_ROOT}/Navaids/awy.dat.gz
TACAN=${FG_ROOT}/Navaids/TACAN_freq.dat.gz
if [ ! -f ${APT} ]; then
echo "${APT} doesn't exist."
exit -1
fi
if [ ! -f ${NAV} ]; then
echo "${NAV} doesn't exist."
exit -1
fi
if [ ! -f ${FIX} ]; then
echo "${FIX} doesn't exist."
exit -1
fi
if [ ! -f ${AWY} ]; then
echo "${AWY} doesn't exist."
exit -1
fi
if [ ! -f ${TACAN} ]; then
echo "${TACAN} doesn't exist."
exit -1
fi
echo Processing ${APT}
zcat ${APT} | iconv -f latin1 -t utf8 | ./apt2sql > apt.sql
echo Processing ${NAV}
zcat ${NAV} | iconv -f latin1 -t utf8 | ./nav2sql > nav.sql
echo Processing ${FIX}
zcat ${FIX} | iconv -f latin1 -t utf8 | ./fix2sql > fix.sql
echo Processing ${AWY}
zcat ${AWY} | iconv -f latin1 -t utf8 | ./awy2sql > awy.sql
echo Processing ${TACAN}
zcat ${TACAN} | iconv -f latin1 -t utf8 | ./tacan2sql > tacan.sql
| gpl-2.0 |
dLobatog/katello | test/models/authorization/authorization_base.rb | 1000 | require 'katello_test_helper'
module Katello
class AuthorizationTestBase < ActiveSupport::TestCase
include Katello::AuthorizationSupportMethods
def setup
@no_perms_user = User.find(users(:restricted))
@admin = User.find(users(:admin))
@acme_corporation = get_organization
@fedora_hosted = Provider.find(katello_providers(:fedora_hosted))
@fedora_17_x86_64 = Repository.find(katello_repositories(:fedora_17_x86_64).id)
@fedora_17_x86_64_dev = Repository.find(katello_repositories(:fedora_17_x86_64_dev).id)
@fedora = Product.find(katello_products(:fedora).id)
@library = KTEnvironment.find(katello_environments(:library).id)
@dev = KTEnvironment.find(katello_environments(:dev).id)
@unassigned_gpg_key = GpgKey.find(katello_gpg_keys(:unassigned_gpg_key).id)
@system = System.find(katello_systems(:simple_server))
end
end
end
| gpl-2.0 |
alfonsotames/linux | drivers/gpu/drm/i915/intel_dp.c | 176659 | /*
* Copyright © 2008 Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
* Authors:
* Keith Packard <[email protected]>
*
*/
#include <linux/i2c.h>
#include <linux/slab.h>
#include <linux/export.h>
#include <linux/types.h>
#include <linux/notifier.h>
#include <linux/reboot.h>
#include <asm/byteorder.h>
#include <drm/drmP.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_crtc.h>
#include <drm/drm_crtc_helper.h>
#include <drm/drm_edid.h>
#include "intel_drv.h"
#include <drm/i915_drm.h>
#include "i915_drv.h"
#define DP_LINK_CHECK_TIMEOUT (10 * 1000)
/* Compliance test status bits */
#define INTEL_DP_RESOLUTION_SHIFT_MASK 0
#define INTEL_DP_RESOLUTION_PREFERRED (1 << INTEL_DP_RESOLUTION_SHIFT_MASK)
#define INTEL_DP_RESOLUTION_STANDARD (2 << INTEL_DP_RESOLUTION_SHIFT_MASK)
#define INTEL_DP_RESOLUTION_FAILSAFE (3 << INTEL_DP_RESOLUTION_SHIFT_MASK)
struct dp_link_dpll {
int clock;
struct dpll dpll;
};
static const struct dp_link_dpll gen4_dpll[] = {
{ 162000,
{ .p1 = 2, .p2 = 10, .n = 2, .m1 = 23, .m2 = 8 } },
{ 270000,
{ .p1 = 1, .p2 = 10, .n = 1, .m1 = 14, .m2 = 2 } }
};
static const struct dp_link_dpll pch_dpll[] = {
{ 162000,
{ .p1 = 2, .p2 = 10, .n = 1, .m1 = 12, .m2 = 9 } },
{ 270000,
{ .p1 = 1, .p2 = 10, .n = 2, .m1 = 14, .m2 = 8 } }
};
static const struct dp_link_dpll vlv_dpll[] = {
{ 162000,
{ .p1 = 3, .p2 = 2, .n = 5, .m1 = 3, .m2 = 81 } },
{ 270000,
{ .p1 = 2, .p2 = 2, .n = 1, .m1 = 2, .m2 = 27 } }
};
/*
* CHV supports eDP 1.4 that have more link rates.
* Below only provides the fixed rate but exclude variable rate.
*/
static const struct dp_link_dpll chv_dpll[] = {
/*
* CHV requires to program fractional division for m2.
* m2 is stored in fixed point format using formula below
* (m2_int << 22) | m2_fraction
*/
{ 162000, /* m2_int = 32, m2_fraction = 1677722 */
{ .p1 = 4, .p2 = 2, .n = 1, .m1 = 2, .m2 = 0x819999a } },
{ 270000, /* m2_int = 27, m2_fraction = 0 */
{ .p1 = 4, .p2 = 1, .n = 1, .m1 = 2, .m2 = 0x6c00000 } },
{ 540000, /* m2_int = 27, m2_fraction = 0 */
{ .p1 = 2, .p2 = 1, .n = 1, .m1 = 2, .m2 = 0x6c00000 } }
};
static const int bxt_rates[] = { 162000, 216000, 243000, 270000,
324000, 432000, 540000 };
static const int skl_rates[] = { 162000, 216000, 270000,
324000, 432000, 540000 };
static const int cnl_rates[] = { 162000, 216000, 270000,
324000, 432000, 540000,
648000, 810000 };
static const int default_rates[] = { 162000, 270000, 540000 };
/**
* is_edp - is the given port attached to an eDP panel (either CPU or PCH)
* @intel_dp: DP struct
*
* If a CPU or PCH DP output is attached to an eDP panel, this function
* will return true, and false otherwise.
*/
static bool is_edp(struct intel_dp *intel_dp)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
return intel_dig_port->base.type == INTEL_OUTPUT_EDP;
}
static struct drm_device *intel_dp_to_dev(struct intel_dp *intel_dp)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
return intel_dig_port->base.base.dev;
}
static struct intel_dp *intel_attached_dp(struct drm_connector *connector)
{
return enc_to_intel_dp(&intel_attached_encoder(connector)->base);
}
static void intel_dp_link_down(struct intel_dp *intel_dp);
static bool edp_panel_vdd_on(struct intel_dp *intel_dp);
static void edp_panel_vdd_off(struct intel_dp *intel_dp, bool sync);
static void vlv_init_panel_power_sequencer(struct intel_dp *intel_dp);
static void vlv_steal_power_sequencer(struct drm_device *dev,
enum pipe pipe);
static void intel_dp_unset_edid(struct intel_dp *intel_dp);
static int intel_dp_num_rates(u8 link_bw_code)
{
switch (link_bw_code) {
default:
WARN(1, "invalid max DP link bw val %x, using 1.62Gbps\n",
link_bw_code);
case DP_LINK_BW_1_62:
return 1;
case DP_LINK_BW_2_7:
return 2;
case DP_LINK_BW_5_4:
return 3;
}
}
/* update sink rates from dpcd */
static void intel_dp_set_sink_rates(struct intel_dp *intel_dp)
{
int i, num_rates;
num_rates = intel_dp_num_rates(intel_dp->dpcd[DP_MAX_LINK_RATE]);
for (i = 0; i < num_rates; i++)
intel_dp->sink_rates[i] = default_rates[i];
intel_dp->num_sink_rates = num_rates;
}
/* Theoretical max between source and sink */
static int intel_dp_max_common_rate(struct intel_dp *intel_dp)
{
return intel_dp->common_rates[intel_dp->num_common_rates - 1];
}
/* Theoretical max between source and sink */
static int intel_dp_max_common_lane_count(struct intel_dp *intel_dp)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
int source_max = intel_dig_port->max_lanes;
int sink_max = drm_dp_max_lane_count(intel_dp->dpcd);
return min(source_max, sink_max);
}
int intel_dp_max_lane_count(struct intel_dp *intel_dp)
{
return intel_dp->max_link_lane_count;
}
int
intel_dp_link_required(int pixel_clock, int bpp)
{
/* pixel_clock is in kHz, divide bpp by 8 for bit to Byte conversion */
return DIV_ROUND_UP(pixel_clock * bpp, 8);
}
int
intel_dp_max_data_rate(int max_link_clock, int max_lanes)
{
/* max_link_clock is the link symbol clock (LS_Clk) in kHz and not the
* link rate that is generally expressed in Gbps. Since, 8 bits of data
* is transmitted every LS_Clk per lane, there is no need to account for
* the channel encoding that is done in the PHY layer here.
*/
return max_link_clock * max_lanes;
}
static int
intel_dp_downstream_max_dotclock(struct intel_dp *intel_dp)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct intel_encoder *encoder = &intel_dig_port->base;
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
int max_dotclk = dev_priv->max_dotclk_freq;
int ds_max_dotclk;
int type = intel_dp->downstream_ports[0] & DP_DS_PORT_TYPE_MASK;
if (type != DP_DS_PORT_TYPE_VGA)
return max_dotclk;
ds_max_dotclk = drm_dp_downstream_max_clock(intel_dp->dpcd,
intel_dp->downstream_ports);
if (ds_max_dotclk != 0)
max_dotclk = min(max_dotclk, ds_max_dotclk);
return max_dotclk;
}
static void
intel_dp_set_source_rates(struct intel_dp *intel_dp)
{
struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
struct drm_i915_private *dev_priv = to_i915(dig_port->base.base.dev);
enum port port = dig_port->port;
const int *source_rates;
int size;
u32 voltage;
/* This should only be done once */
WARN_ON(intel_dp->source_rates || intel_dp->num_source_rates);
if (IS_GEN9_LP(dev_priv)) {
source_rates = bxt_rates;
size = ARRAY_SIZE(bxt_rates);
} else if (IS_CANNONLAKE(dev_priv)) {
source_rates = cnl_rates;
size = ARRAY_SIZE(cnl_rates);
voltage = I915_READ(CNL_PORT_COMP_DW3) & VOLTAGE_INFO_MASK;
if (port == PORT_A || port == PORT_D ||
voltage == VOLTAGE_INFO_0_85V)
size -= 2;
} else if (IS_GEN9_BC(dev_priv)) {
source_rates = skl_rates;
size = ARRAY_SIZE(skl_rates);
} else {
source_rates = default_rates;
size = ARRAY_SIZE(default_rates);
}
/* This depends on the fact that 5.4 is last value in the array */
if (!intel_dp_source_supports_hbr2(intel_dp))
size--;
intel_dp->source_rates = source_rates;
intel_dp->num_source_rates = size;
}
static int intersect_rates(const int *source_rates, int source_len,
const int *sink_rates, int sink_len,
int *common_rates)
{
int i = 0, j = 0, k = 0;
while (i < source_len && j < sink_len) {
if (source_rates[i] == sink_rates[j]) {
if (WARN_ON(k >= DP_MAX_SUPPORTED_RATES))
return k;
common_rates[k] = source_rates[i];
++k;
++i;
++j;
} else if (source_rates[i] < sink_rates[j]) {
++i;
} else {
++j;
}
}
return k;
}
/* return index of rate in rates array, or -1 if not found */
static int intel_dp_rate_index(const int *rates, int len, int rate)
{
int i;
for (i = 0; i < len; i++)
if (rate == rates[i])
return i;
return -1;
}
static void intel_dp_set_common_rates(struct intel_dp *intel_dp)
{
WARN_ON(!intel_dp->num_source_rates || !intel_dp->num_sink_rates);
intel_dp->num_common_rates = intersect_rates(intel_dp->source_rates,
intel_dp->num_source_rates,
intel_dp->sink_rates,
intel_dp->num_sink_rates,
intel_dp->common_rates);
/* Paranoia, there should always be something in common. */
if (WARN_ON(intel_dp->num_common_rates == 0)) {
intel_dp->common_rates[0] = default_rates[0];
intel_dp->num_common_rates = 1;
}
}
/* get length of common rates potentially limited by max_rate */
static int intel_dp_common_len_rate_limit(struct intel_dp *intel_dp,
int max_rate)
{
const int *common_rates = intel_dp->common_rates;
int i, common_len = intel_dp->num_common_rates;
/* Limit results by potentially reduced max rate */
for (i = 0; i < common_len; i++) {
if (common_rates[common_len - i - 1] <= max_rate)
return common_len - i;
}
return 0;
}
static bool intel_dp_link_params_valid(struct intel_dp *intel_dp, int link_rate,
uint8_t lane_count)
{
/*
* FIXME: we need to synchronize the current link parameters with
* hardware readout. Currently fast link training doesn't work on
* boot-up.
*/
if (link_rate == 0 ||
link_rate > intel_dp->max_link_rate)
return false;
if (lane_count == 0 ||
lane_count > intel_dp_max_lane_count(intel_dp))
return false;
return true;
}
int intel_dp_get_link_train_fallback_values(struct intel_dp *intel_dp,
int link_rate, uint8_t lane_count)
{
int index;
index = intel_dp_rate_index(intel_dp->common_rates,
intel_dp->num_common_rates,
link_rate);
if (index > 0) {
intel_dp->max_link_rate = intel_dp->common_rates[index - 1];
intel_dp->max_link_lane_count = lane_count;
} else if (lane_count > 1) {
intel_dp->max_link_rate = intel_dp_max_common_rate(intel_dp);
intel_dp->max_link_lane_count = lane_count >> 1;
} else {
DRM_ERROR("Link Training Unsuccessful\n");
return -1;
}
return 0;
}
static enum drm_mode_status
intel_dp_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode)
{
struct intel_dp *intel_dp = intel_attached_dp(connector);
struct intel_connector *intel_connector = to_intel_connector(connector);
struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode;
int target_clock = mode->clock;
int max_rate, mode_rate, max_lanes, max_link_clock;
int max_dotclk;
max_dotclk = intel_dp_downstream_max_dotclock(intel_dp);
if (is_edp(intel_dp) && fixed_mode) {
if (mode->hdisplay > fixed_mode->hdisplay)
return MODE_PANEL;
if (mode->vdisplay > fixed_mode->vdisplay)
return MODE_PANEL;
target_clock = fixed_mode->clock;
}
max_link_clock = intel_dp_max_link_rate(intel_dp);
max_lanes = intel_dp_max_lane_count(intel_dp);
max_rate = intel_dp_max_data_rate(max_link_clock, max_lanes);
mode_rate = intel_dp_link_required(target_clock, 18);
if (mode_rate > max_rate || target_clock > max_dotclk)
return MODE_CLOCK_HIGH;
if (mode->clock < 10000)
return MODE_CLOCK_LOW;
if (mode->flags & DRM_MODE_FLAG_DBLCLK)
return MODE_H_ILLEGAL;
return MODE_OK;
}
uint32_t intel_dp_pack_aux(const uint8_t *src, int src_bytes)
{
int i;
uint32_t v = 0;
if (src_bytes > 4)
src_bytes = 4;
for (i = 0; i < src_bytes; i++)
v |= ((uint32_t) src[i]) << ((3-i) * 8);
return v;
}
static void intel_dp_unpack_aux(uint32_t src, uint8_t *dst, int dst_bytes)
{
int i;
if (dst_bytes > 4)
dst_bytes = 4;
for (i = 0; i < dst_bytes; i++)
dst[i] = src >> ((3-i) * 8);
}
static void
intel_dp_init_panel_power_sequencer(struct drm_device *dev,
struct intel_dp *intel_dp);
static void
intel_dp_init_panel_power_sequencer_registers(struct drm_device *dev,
struct intel_dp *intel_dp,
bool force_disable_vdd);
static void
intel_dp_pps_init(struct drm_device *dev, struct intel_dp *intel_dp);
static void pps_lock(struct intel_dp *intel_dp)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct intel_encoder *encoder = &intel_dig_port->base;
struct drm_device *dev = encoder->base.dev;
struct drm_i915_private *dev_priv = to_i915(dev);
/*
* See vlv_power_sequencer_reset() why we need
* a power domain reference here.
*/
intel_display_power_get(dev_priv, intel_dp->aux_power_domain);
mutex_lock(&dev_priv->pps_mutex);
}
static void pps_unlock(struct intel_dp *intel_dp)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct intel_encoder *encoder = &intel_dig_port->base;
struct drm_device *dev = encoder->base.dev;
struct drm_i915_private *dev_priv = to_i915(dev);
mutex_unlock(&dev_priv->pps_mutex);
intel_display_power_put(dev_priv, intel_dp->aux_power_domain);
}
static void
vlv_power_sequencer_kick(struct intel_dp *intel_dp)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct drm_i915_private *dev_priv = to_i915(intel_dig_port->base.base.dev);
enum pipe pipe = intel_dp->pps_pipe;
bool pll_enabled, release_cl_override = false;
enum dpio_phy phy = DPIO_PHY(pipe);
enum dpio_channel ch = vlv_pipe_to_channel(pipe);
uint32_t DP;
if (WARN(I915_READ(intel_dp->output_reg) & DP_PORT_EN,
"skipping pipe %c power seqeuncer kick due to port %c being active\n",
pipe_name(pipe), port_name(intel_dig_port->port)))
return;
DRM_DEBUG_KMS("kicking pipe %c power sequencer for port %c\n",
pipe_name(pipe), port_name(intel_dig_port->port));
/* Preserve the BIOS-computed detected bit. This is
* supposed to be read-only.
*/
DP = I915_READ(intel_dp->output_reg) & DP_DETECTED;
DP |= DP_VOLTAGE_0_4 | DP_PRE_EMPHASIS_0;
DP |= DP_PORT_WIDTH(1);
DP |= DP_LINK_TRAIN_PAT_1;
if (IS_CHERRYVIEW(dev_priv))
DP |= DP_PIPE_SELECT_CHV(pipe);
else if (pipe == PIPE_B)
DP |= DP_PIPEB_SELECT;
pll_enabled = I915_READ(DPLL(pipe)) & DPLL_VCO_ENABLE;
/*
* The DPLL for the pipe must be enabled for this to work.
* So enable temporarily it if it's not already enabled.
*/
if (!pll_enabled) {
release_cl_override = IS_CHERRYVIEW(dev_priv) &&
!chv_phy_powergate_ch(dev_priv, phy, ch, true);
if (vlv_force_pll_on(dev_priv, pipe, IS_CHERRYVIEW(dev_priv) ?
&chv_dpll[0].dpll : &vlv_dpll[0].dpll)) {
DRM_ERROR("Failed to force on pll for pipe %c!\n",
pipe_name(pipe));
return;
}
}
/*
* Similar magic as in intel_dp_enable_port().
* We _must_ do this port enable + disable trick
* to make this power seqeuencer lock onto the port.
* Otherwise even VDD force bit won't work.
*/
I915_WRITE(intel_dp->output_reg, DP);
POSTING_READ(intel_dp->output_reg);
I915_WRITE(intel_dp->output_reg, DP | DP_PORT_EN);
POSTING_READ(intel_dp->output_reg);
I915_WRITE(intel_dp->output_reg, DP & ~DP_PORT_EN);
POSTING_READ(intel_dp->output_reg);
if (!pll_enabled) {
vlv_force_pll_off(dev_priv, pipe);
if (release_cl_override)
chv_phy_powergate_ch(dev_priv, phy, ch, false);
}
}
static enum pipe vlv_find_free_pps(struct drm_i915_private *dev_priv)
{
struct intel_encoder *encoder;
unsigned int pipes = (1 << PIPE_A) | (1 << PIPE_B);
/*
* We don't have power sequencer currently.
* Pick one that's not used by other ports.
*/
for_each_intel_encoder(&dev_priv->drm, encoder) {
struct intel_dp *intel_dp;
if (encoder->type != INTEL_OUTPUT_DP &&
encoder->type != INTEL_OUTPUT_EDP)
continue;
intel_dp = enc_to_intel_dp(&encoder->base);
if (encoder->type == INTEL_OUTPUT_EDP) {
WARN_ON(intel_dp->active_pipe != INVALID_PIPE &&
intel_dp->active_pipe != intel_dp->pps_pipe);
if (intel_dp->pps_pipe != INVALID_PIPE)
pipes &= ~(1 << intel_dp->pps_pipe);
} else {
WARN_ON(intel_dp->pps_pipe != INVALID_PIPE);
if (intel_dp->active_pipe != INVALID_PIPE)
pipes &= ~(1 << intel_dp->active_pipe);
}
}
if (pipes == 0)
return INVALID_PIPE;
return ffs(pipes) - 1;
}
static enum pipe
vlv_power_sequencer_pipe(struct intel_dp *intel_dp)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct drm_device *dev = intel_dig_port->base.base.dev;
struct drm_i915_private *dev_priv = to_i915(dev);
enum pipe pipe;
lockdep_assert_held(&dev_priv->pps_mutex);
/* We should never land here with regular DP ports */
WARN_ON(!is_edp(intel_dp));
WARN_ON(intel_dp->active_pipe != INVALID_PIPE &&
intel_dp->active_pipe != intel_dp->pps_pipe);
if (intel_dp->pps_pipe != INVALID_PIPE)
return intel_dp->pps_pipe;
pipe = vlv_find_free_pps(dev_priv);
/*
* Didn't find one. This should not happen since there
* are two power sequencers and up to two eDP ports.
*/
if (WARN_ON(pipe == INVALID_PIPE))
pipe = PIPE_A;
vlv_steal_power_sequencer(dev, pipe);
intel_dp->pps_pipe = pipe;
DRM_DEBUG_KMS("picked pipe %c power sequencer for port %c\n",
pipe_name(intel_dp->pps_pipe),
port_name(intel_dig_port->port));
/* init power sequencer on this pipe and port */
intel_dp_init_panel_power_sequencer(dev, intel_dp);
intel_dp_init_panel_power_sequencer_registers(dev, intel_dp, true);
/*
* Even vdd force doesn't work until we've made
* the power sequencer lock in on the port.
*/
vlv_power_sequencer_kick(intel_dp);
return intel_dp->pps_pipe;
}
static int
bxt_power_sequencer_idx(struct intel_dp *intel_dp)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct drm_device *dev = intel_dig_port->base.base.dev;
struct drm_i915_private *dev_priv = to_i915(dev);
lockdep_assert_held(&dev_priv->pps_mutex);
/* We should never land here with regular DP ports */
WARN_ON(!is_edp(intel_dp));
/*
* TODO: BXT has 2 PPS instances. The correct port->PPS instance
* mapping needs to be retrieved from VBT, for now just hard-code to
* use instance #0 always.
*/
if (!intel_dp->pps_reset)
return 0;
intel_dp->pps_reset = false;
/*
* Only the HW needs to be reprogrammed, the SW state is fixed and
* has been setup during connector init.
*/
intel_dp_init_panel_power_sequencer_registers(dev, intel_dp, false);
return 0;
}
typedef bool (*vlv_pipe_check)(struct drm_i915_private *dev_priv,
enum pipe pipe);
static bool vlv_pipe_has_pp_on(struct drm_i915_private *dev_priv,
enum pipe pipe)
{
return I915_READ(PP_STATUS(pipe)) & PP_ON;
}
static bool vlv_pipe_has_vdd_on(struct drm_i915_private *dev_priv,
enum pipe pipe)
{
return I915_READ(PP_CONTROL(pipe)) & EDP_FORCE_VDD;
}
static bool vlv_pipe_any(struct drm_i915_private *dev_priv,
enum pipe pipe)
{
return true;
}
static enum pipe
vlv_initial_pps_pipe(struct drm_i915_private *dev_priv,
enum port port,
vlv_pipe_check pipe_check)
{
enum pipe pipe;
for (pipe = PIPE_A; pipe <= PIPE_B; pipe++) {
u32 port_sel = I915_READ(PP_ON_DELAYS(pipe)) &
PANEL_PORT_SELECT_MASK;
if (port_sel != PANEL_PORT_SELECT_VLV(port))
continue;
if (!pipe_check(dev_priv, pipe))
continue;
return pipe;
}
return INVALID_PIPE;
}
static void
vlv_initial_power_sequencer_setup(struct intel_dp *intel_dp)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct drm_device *dev = intel_dig_port->base.base.dev;
struct drm_i915_private *dev_priv = to_i915(dev);
enum port port = intel_dig_port->port;
lockdep_assert_held(&dev_priv->pps_mutex);
/* try to find a pipe with this port selected */
/* first pick one where the panel is on */
intel_dp->pps_pipe = vlv_initial_pps_pipe(dev_priv, port,
vlv_pipe_has_pp_on);
/* didn't find one? pick one where vdd is on */
if (intel_dp->pps_pipe == INVALID_PIPE)
intel_dp->pps_pipe = vlv_initial_pps_pipe(dev_priv, port,
vlv_pipe_has_vdd_on);
/* didn't find one? pick one with just the correct port */
if (intel_dp->pps_pipe == INVALID_PIPE)
intel_dp->pps_pipe = vlv_initial_pps_pipe(dev_priv, port,
vlv_pipe_any);
/* didn't find one? just let vlv_power_sequencer_pipe() pick one when needed */
if (intel_dp->pps_pipe == INVALID_PIPE) {
DRM_DEBUG_KMS("no initial power sequencer for port %c\n",
port_name(port));
return;
}
DRM_DEBUG_KMS("initial power sequencer for port %c: pipe %c\n",
port_name(port), pipe_name(intel_dp->pps_pipe));
intel_dp_init_panel_power_sequencer(dev, intel_dp);
intel_dp_init_panel_power_sequencer_registers(dev, intel_dp, false);
}
void intel_power_sequencer_reset(struct drm_i915_private *dev_priv)
{
struct drm_device *dev = &dev_priv->drm;
struct intel_encoder *encoder;
if (WARN_ON(!IS_VALLEYVIEW(dev_priv) && !IS_CHERRYVIEW(dev_priv) &&
!IS_GEN9_LP(dev_priv)))
return;
/*
* We can't grab pps_mutex here due to deadlock with power_domain
* mutex when power_domain functions are called while holding pps_mutex.
* That also means that in order to use pps_pipe the code needs to
* hold both a power domain reference and pps_mutex, and the power domain
* reference get/put must be done while _not_ holding pps_mutex.
* pps_{lock,unlock}() do these steps in the correct order, so one
* should use them always.
*/
for_each_intel_encoder(dev, encoder) {
struct intel_dp *intel_dp;
if (encoder->type != INTEL_OUTPUT_DP &&
encoder->type != INTEL_OUTPUT_EDP)
continue;
intel_dp = enc_to_intel_dp(&encoder->base);
WARN_ON(intel_dp->active_pipe != INVALID_PIPE);
if (encoder->type != INTEL_OUTPUT_EDP)
continue;
if (IS_GEN9_LP(dev_priv))
intel_dp->pps_reset = true;
else
intel_dp->pps_pipe = INVALID_PIPE;
}
}
struct pps_registers {
i915_reg_t pp_ctrl;
i915_reg_t pp_stat;
i915_reg_t pp_on;
i915_reg_t pp_off;
i915_reg_t pp_div;
};
static void intel_pps_get_registers(struct drm_i915_private *dev_priv,
struct intel_dp *intel_dp,
struct pps_registers *regs)
{
int pps_idx = 0;
memset(regs, 0, sizeof(*regs));
if (IS_GEN9_LP(dev_priv))
pps_idx = bxt_power_sequencer_idx(intel_dp);
else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
pps_idx = vlv_power_sequencer_pipe(intel_dp);
regs->pp_ctrl = PP_CONTROL(pps_idx);
regs->pp_stat = PP_STATUS(pps_idx);
regs->pp_on = PP_ON_DELAYS(pps_idx);
regs->pp_off = PP_OFF_DELAYS(pps_idx);
if (!IS_GEN9_LP(dev_priv) && !HAS_PCH_CNP(dev_priv))
regs->pp_div = PP_DIVISOR(pps_idx);
}
static i915_reg_t
_pp_ctrl_reg(struct intel_dp *intel_dp)
{
struct pps_registers regs;
intel_pps_get_registers(to_i915(intel_dp_to_dev(intel_dp)), intel_dp,
®s);
return regs.pp_ctrl;
}
static i915_reg_t
_pp_stat_reg(struct intel_dp *intel_dp)
{
struct pps_registers regs;
intel_pps_get_registers(to_i915(intel_dp_to_dev(intel_dp)), intel_dp,
®s);
return regs.pp_stat;
}
/* Reboot notifier handler to shutdown panel power to guarantee T12 timing
This function only applicable when panel PM state is not to be tracked */
static int edp_notify_handler(struct notifier_block *this, unsigned long code,
void *unused)
{
struct intel_dp *intel_dp = container_of(this, typeof(* intel_dp),
edp_notifier);
struct drm_device *dev = intel_dp_to_dev(intel_dp);
struct drm_i915_private *dev_priv = to_i915(dev);
if (!is_edp(intel_dp) || code != SYS_RESTART)
return 0;
pps_lock(intel_dp);
if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
enum pipe pipe = vlv_power_sequencer_pipe(intel_dp);
i915_reg_t pp_ctrl_reg, pp_div_reg;
u32 pp_div;
pp_ctrl_reg = PP_CONTROL(pipe);
pp_div_reg = PP_DIVISOR(pipe);
pp_div = I915_READ(pp_div_reg);
pp_div &= PP_REFERENCE_DIVIDER_MASK;
/* 0x1F write to PP_DIV_REG sets max cycle delay */
I915_WRITE(pp_div_reg, pp_div | 0x1F);
I915_WRITE(pp_ctrl_reg, PANEL_UNLOCK_REGS | PANEL_POWER_OFF);
msleep(intel_dp->panel_power_cycle_delay);
}
pps_unlock(intel_dp);
return 0;
}
static bool edp_have_panel_power(struct intel_dp *intel_dp)
{
struct drm_device *dev = intel_dp_to_dev(intel_dp);
struct drm_i915_private *dev_priv = to_i915(dev);
lockdep_assert_held(&dev_priv->pps_mutex);
if ((IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) &&
intel_dp->pps_pipe == INVALID_PIPE)
return false;
return (I915_READ(_pp_stat_reg(intel_dp)) & PP_ON) != 0;
}
static bool edp_have_panel_vdd(struct intel_dp *intel_dp)
{
struct drm_device *dev = intel_dp_to_dev(intel_dp);
struct drm_i915_private *dev_priv = to_i915(dev);
lockdep_assert_held(&dev_priv->pps_mutex);
if ((IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) &&
intel_dp->pps_pipe == INVALID_PIPE)
return false;
return I915_READ(_pp_ctrl_reg(intel_dp)) & EDP_FORCE_VDD;
}
static void
intel_dp_check_edp(struct intel_dp *intel_dp)
{
struct drm_device *dev = intel_dp_to_dev(intel_dp);
struct drm_i915_private *dev_priv = to_i915(dev);
if (!is_edp(intel_dp))
return;
if (!edp_have_panel_power(intel_dp) && !edp_have_panel_vdd(intel_dp)) {
WARN(1, "eDP powered off while attempting aux channel communication.\n");
DRM_DEBUG_KMS("Status 0x%08x Control 0x%08x\n",
I915_READ(_pp_stat_reg(intel_dp)),
I915_READ(_pp_ctrl_reg(intel_dp)));
}
}
static uint32_t
intel_dp_aux_wait_done(struct intel_dp *intel_dp, bool has_aux_irq)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct drm_device *dev = intel_dig_port->base.base.dev;
struct drm_i915_private *dev_priv = to_i915(dev);
i915_reg_t ch_ctl = intel_dp->aux_ch_ctl_reg;
uint32_t status;
bool done;
#define C (((status = I915_READ_NOTRACE(ch_ctl)) & DP_AUX_CH_CTL_SEND_BUSY) == 0)
if (has_aux_irq)
done = wait_event_timeout(dev_priv->gmbus_wait_queue, C,
msecs_to_jiffies_timeout(10));
else
done = wait_for(C, 10) == 0;
if (!done)
DRM_ERROR("dp aux hw did not signal timeout (has irq: %i)!\n",
has_aux_irq);
#undef C
return status;
}
static uint32_t g4x_get_aux_clock_divider(struct intel_dp *intel_dp, int index)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct drm_i915_private *dev_priv = to_i915(intel_dig_port->base.base.dev);
if (index)
return 0;
/*
* The clock divider is based off the hrawclk, and would like to run at
* 2MHz. So, take the hrawclk value and divide by 2000 and use that
*/
return DIV_ROUND_CLOSEST(dev_priv->rawclk_freq, 2000);
}
static uint32_t ilk_get_aux_clock_divider(struct intel_dp *intel_dp, int index)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct drm_i915_private *dev_priv = to_i915(intel_dig_port->base.base.dev);
if (index)
return 0;
/*
* The clock divider is based off the cdclk or PCH rawclk, and would
* like to run at 2MHz. So, take the cdclk or PCH rawclk value and
* divide by 2000 and use that
*/
if (intel_dig_port->port == PORT_A)
return DIV_ROUND_CLOSEST(dev_priv->cdclk.hw.cdclk, 2000);
else
return DIV_ROUND_CLOSEST(dev_priv->rawclk_freq, 2000);
}
static uint32_t hsw_get_aux_clock_divider(struct intel_dp *intel_dp, int index)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct drm_i915_private *dev_priv = to_i915(intel_dig_port->base.base.dev);
if (intel_dig_port->port != PORT_A && HAS_PCH_LPT_H(dev_priv)) {
/* Workaround for non-ULT HSW */
switch (index) {
case 0: return 63;
case 1: return 72;
default: return 0;
}
}
return ilk_get_aux_clock_divider(intel_dp, index);
}
static uint32_t skl_get_aux_clock_divider(struct intel_dp *intel_dp, int index)
{
/*
* SKL doesn't need us to program the AUX clock divider (Hardware will
* derive the clock from CDCLK automatically). We still implement the
* get_aux_clock_divider vfunc to plug-in into the existing code.
*/
return index ? 0 : 1;
}
static uint32_t g4x_get_aux_send_ctl(struct intel_dp *intel_dp,
bool has_aux_irq,
int send_bytes,
uint32_t aux_clock_divider)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct drm_i915_private *dev_priv =
to_i915(intel_dig_port->base.base.dev);
uint32_t precharge, timeout;
if (IS_GEN6(dev_priv))
precharge = 3;
else
precharge = 5;
if (IS_BROADWELL(dev_priv) && intel_dig_port->port == PORT_A)
timeout = DP_AUX_CH_CTL_TIME_OUT_600us;
else
timeout = DP_AUX_CH_CTL_TIME_OUT_400us;
return DP_AUX_CH_CTL_SEND_BUSY |
DP_AUX_CH_CTL_DONE |
(has_aux_irq ? DP_AUX_CH_CTL_INTERRUPT : 0) |
DP_AUX_CH_CTL_TIME_OUT_ERROR |
timeout |
DP_AUX_CH_CTL_RECEIVE_ERROR |
(send_bytes << DP_AUX_CH_CTL_MESSAGE_SIZE_SHIFT) |
(precharge << DP_AUX_CH_CTL_PRECHARGE_2US_SHIFT) |
(aux_clock_divider << DP_AUX_CH_CTL_BIT_CLOCK_2X_SHIFT);
}
static uint32_t skl_get_aux_send_ctl(struct intel_dp *intel_dp,
bool has_aux_irq,
int send_bytes,
uint32_t unused)
{
return DP_AUX_CH_CTL_SEND_BUSY |
DP_AUX_CH_CTL_DONE |
(has_aux_irq ? DP_AUX_CH_CTL_INTERRUPT : 0) |
DP_AUX_CH_CTL_TIME_OUT_ERROR |
DP_AUX_CH_CTL_TIME_OUT_1600us |
DP_AUX_CH_CTL_RECEIVE_ERROR |
(send_bytes << DP_AUX_CH_CTL_MESSAGE_SIZE_SHIFT) |
DP_AUX_CH_CTL_FW_SYNC_PULSE_SKL(32) |
DP_AUX_CH_CTL_SYNC_PULSE_SKL(32);
}
static int
intel_dp_aux_ch(struct intel_dp *intel_dp,
const uint8_t *send, int send_bytes,
uint8_t *recv, int recv_size)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct drm_i915_private *dev_priv =
to_i915(intel_dig_port->base.base.dev);
i915_reg_t ch_ctl = intel_dp->aux_ch_ctl_reg;
uint32_t aux_clock_divider;
int i, ret, recv_bytes;
uint32_t status;
int try, clock = 0;
bool has_aux_irq = HAS_AUX_IRQ(dev_priv);
bool vdd;
pps_lock(intel_dp);
/*
* We will be called with VDD already enabled for dpcd/edid/oui reads.
* In such cases we want to leave VDD enabled and it's up to upper layers
* to turn it off. But for eg. i2c-dev access we need to turn it on/off
* ourselves.
*/
vdd = edp_panel_vdd_on(intel_dp);
/* dp aux is extremely sensitive to irq latency, hence request the
* lowest possible wakeup latency and so prevent the cpu from going into
* deep sleep states.
*/
pm_qos_update_request(&dev_priv->pm_qos, 0);
intel_dp_check_edp(intel_dp);
/* Try to wait for any previous AUX channel activity */
for (try = 0; try < 3; try++) {
status = I915_READ_NOTRACE(ch_ctl);
if ((status & DP_AUX_CH_CTL_SEND_BUSY) == 0)
break;
msleep(1);
}
if (try == 3) {
static u32 last_status = -1;
const u32 status = I915_READ(ch_ctl);
if (status != last_status) {
WARN(1, "dp_aux_ch not started status 0x%08x\n",
status);
last_status = status;
}
ret = -EBUSY;
goto out;
}
/* Only 5 data registers! */
if (WARN_ON(send_bytes > 20 || recv_size > 20)) {
ret = -E2BIG;
goto out;
}
while ((aux_clock_divider = intel_dp->get_aux_clock_divider(intel_dp, clock++))) {
u32 send_ctl = intel_dp->get_aux_send_ctl(intel_dp,
has_aux_irq,
send_bytes,
aux_clock_divider);
/* Must try at least 3 times according to DP spec */
for (try = 0; try < 5; try++) {
/* Load the send data into the aux channel data registers */
for (i = 0; i < send_bytes; i += 4)
I915_WRITE(intel_dp->aux_ch_data_reg[i >> 2],
intel_dp_pack_aux(send + i,
send_bytes - i));
/* Send the command and wait for it to complete */
I915_WRITE(ch_ctl, send_ctl);
status = intel_dp_aux_wait_done(intel_dp, has_aux_irq);
/* Clear done status and any errors */
I915_WRITE(ch_ctl,
status |
DP_AUX_CH_CTL_DONE |
DP_AUX_CH_CTL_TIME_OUT_ERROR |
DP_AUX_CH_CTL_RECEIVE_ERROR);
if (status & DP_AUX_CH_CTL_TIME_OUT_ERROR)
continue;
/* DP CTS 1.2 Core Rev 1.1, 4.2.1.1 & 4.2.1.2
* 400us delay required for errors and timeouts
* Timeout errors from the HW already meet this
* requirement so skip to next iteration
*/
if (status & DP_AUX_CH_CTL_RECEIVE_ERROR) {
usleep_range(400, 500);
continue;
}
if (status & DP_AUX_CH_CTL_DONE)
goto done;
}
}
if ((status & DP_AUX_CH_CTL_DONE) == 0) {
DRM_ERROR("dp_aux_ch not done status 0x%08x\n", status);
ret = -EBUSY;
goto out;
}
done:
/* Check for timeout or receive error.
* Timeouts occur when the sink is not connected
*/
if (status & DP_AUX_CH_CTL_RECEIVE_ERROR) {
DRM_ERROR("dp_aux_ch receive error status 0x%08x\n", status);
ret = -EIO;
goto out;
}
/* Timeouts occur when the device isn't connected, so they're
* "normal" -- don't fill the kernel log with these */
if (status & DP_AUX_CH_CTL_TIME_OUT_ERROR) {
DRM_DEBUG_KMS("dp_aux_ch timeout status 0x%08x\n", status);
ret = -ETIMEDOUT;
goto out;
}
/* Unload any bytes sent back from the other side */
recv_bytes = ((status & DP_AUX_CH_CTL_MESSAGE_SIZE_MASK) >>
DP_AUX_CH_CTL_MESSAGE_SIZE_SHIFT);
/*
* By BSpec: "Message sizes of 0 or >20 are not allowed."
* We have no idea of what happened so we return -EBUSY so
* drm layer takes care for the necessary retries.
*/
if (recv_bytes == 0 || recv_bytes > 20) {
DRM_DEBUG_KMS("Forbidden recv_bytes = %d on aux transaction\n",
recv_bytes);
/*
* FIXME: This patch was created on top of a series that
* organize the retries at drm level. There EBUSY should
* also take care for 1ms wait before retrying.
* That aux retries re-org is still needed and after that is
* merged we remove this sleep from here.
*/
usleep_range(1000, 1500);
ret = -EBUSY;
goto out;
}
if (recv_bytes > recv_size)
recv_bytes = recv_size;
for (i = 0; i < recv_bytes; i += 4)
intel_dp_unpack_aux(I915_READ(intel_dp->aux_ch_data_reg[i >> 2]),
recv + i, recv_bytes - i);
ret = recv_bytes;
out:
pm_qos_update_request(&dev_priv->pm_qos, PM_QOS_DEFAULT_VALUE);
if (vdd)
edp_panel_vdd_off(intel_dp, false);
pps_unlock(intel_dp);
return ret;
}
#define BARE_ADDRESS_SIZE 3
#define HEADER_SIZE (BARE_ADDRESS_SIZE + 1)
static ssize_t
intel_dp_aux_transfer(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)
{
struct intel_dp *intel_dp = container_of(aux, struct intel_dp, aux);
uint8_t txbuf[20], rxbuf[20];
size_t txsize, rxsize;
int ret;
txbuf[0] = (msg->request << 4) |
((msg->address >> 16) & 0xf);
txbuf[1] = (msg->address >> 8) & 0xff;
txbuf[2] = msg->address & 0xff;
txbuf[3] = msg->size - 1;
switch (msg->request & ~DP_AUX_I2C_MOT) {
case DP_AUX_NATIVE_WRITE:
case DP_AUX_I2C_WRITE:
case DP_AUX_I2C_WRITE_STATUS_UPDATE:
txsize = msg->size ? HEADER_SIZE + msg->size : BARE_ADDRESS_SIZE;
rxsize = 2; /* 0 or 1 data bytes */
if (WARN_ON(txsize > 20))
return -E2BIG;
WARN_ON(!msg->buffer != !msg->size);
if (msg->buffer)
memcpy(txbuf + HEADER_SIZE, msg->buffer, msg->size);
ret = intel_dp_aux_ch(intel_dp, txbuf, txsize, rxbuf, rxsize);
if (ret > 0) {
msg->reply = rxbuf[0] >> 4;
if (ret > 1) {
/* Number of bytes written in a short write. */
ret = clamp_t(int, rxbuf[1], 0, msg->size);
} else {
/* Return payload size. */
ret = msg->size;
}
}
break;
case DP_AUX_NATIVE_READ:
case DP_AUX_I2C_READ:
txsize = msg->size ? HEADER_SIZE : BARE_ADDRESS_SIZE;
rxsize = msg->size + 1;
if (WARN_ON(rxsize > 20))
return -E2BIG;
ret = intel_dp_aux_ch(intel_dp, txbuf, txsize, rxbuf, rxsize);
if (ret > 0) {
msg->reply = rxbuf[0] >> 4;
/*
* Assume happy day, and copy the data. The caller is
* expected to check msg->reply before touching it.
*
* Return payload size.
*/
ret--;
memcpy(msg->buffer, rxbuf + 1, ret);
}
break;
default:
ret = -EINVAL;
break;
}
return ret;
}
static enum port intel_aux_port(struct drm_i915_private *dev_priv,
enum port port)
{
const struct ddi_vbt_port_info *info =
&dev_priv->vbt.ddi_port_info[port];
enum port aux_port;
if (!info->alternate_aux_channel) {
DRM_DEBUG_KMS("using AUX %c for port %c (platform default)\n",
port_name(port), port_name(port));
return port;
}
switch (info->alternate_aux_channel) {
case DP_AUX_A:
aux_port = PORT_A;
break;
case DP_AUX_B:
aux_port = PORT_B;
break;
case DP_AUX_C:
aux_port = PORT_C;
break;
case DP_AUX_D:
aux_port = PORT_D;
break;
default:
MISSING_CASE(info->alternate_aux_channel);
aux_port = PORT_A;
break;
}
DRM_DEBUG_KMS("using AUX %c for port %c (VBT)\n",
port_name(aux_port), port_name(port));
return aux_port;
}
static i915_reg_t g4x_aux_ctl_reg(struct drm_i915_private *dev_priv,
enum port port)
{
switch (port) {
case PORT_B:
case PORT_C:
case PORT_D:
return DP_AUX_CH_CTL(port);
default:
MISSING_CASE(port);
return DP_AUX_CH_CTL(PORT_B);
}
}
static i915_reg_t g4x_aux_data_reg(struct drm_i915_private *dev_priv,
enum port port, int index)
{
switch (port) {
case PORT_B:
case PORT_C:
case PORT_D:
return DP_AUX_CH_DATA(port, index);
default:
MISSING_CASE(port);
return DP_AUX_CH_DATA(PORT_B, index);
}
}
static i915_reg_t ilk_aux_ctl_reg(struct drm_i915_private *dev_priv,
enum port port)
{
switch (port) {
case PORT_A:
return DP_AUX_CH_CTL(port);
case PORT_B:
case PORT_C:
case PORT_D:
return PCH_DP_AUX_CH_CTL(port);
default:
MISSING_CASE(port);
return DP_AUX_CH_CTL(PORT_A);
}
}
static i915_reg_t ilk_aux_data_reg(struct drm_i915_private *dev_priv,
enum port port, int index)
{
switch (port) {
case PORT_A:
return DP_AUX_CH_DATA(port, index);
case PORT_B:
case PORT_C:
case PORT_D:
return PCH_DP_AUX_CH_DATA(port, index);
default:
MISSING_CASE(port);
return DP_AUX_CH_DATA(PORT_A, index);
}
}
static i915_reg_t skl_aux_ctl_reg(struct drm_i915_private *dev_priv,
enum port port)
{
switch (port) {
case PORT_A:
case PORT_B:
case PORT_C:
case PORT_D:
return DP_AUX_CH_CTL(port);
default:
MISSING_CASE(port);
return DP_AUX_CH_CTL(PORT_A);
}
}
static i915_reg_t skl_aux_data_reg(struct drm_i915_private *dev_priv,
enum port port, int index)
{
switch (port) {
case PORT_A:
case PORT_B:
case PORT_C:
case PORT_D:
return DP_AUX_CH_DATA(port, index);
default:
MISSING_CASE(port);
return DP_AUX_CH_DATA(PORT_A, index);
}
}
static i915_reg_t intel_aux_ctl_reg(struct drm_i915_private *dev_priv,
enum port port)
{
if (INTEL_INFO(dev_priv)->gen >= 9)
return skl_aux_ctl_reg(dev_priv, port);
else if (HAS_PCH_SPLIT(dev_priv))
return ilk_aux_ctl_reg(dev_priv, port);
else
return g4x_aux_ctl_reg(dev_priv, port);
}
static i915_reg_t intel_aux_data_reg(struct drm_i915_private *dev_priv,
enum port port, int index)
{
if (INTEL_INFO(dev_priv)->gen >= 9)
return skl_aux_data_reg(dev_priv, port, index);
else if (HAS_PCH_SPLIT(dev_priv))
return ilk_aux_data_reg(dev_priv, port, index);
else
return g4x_aux_data_reg(dev_priv, port, index);
}
static void intel_aux_reg_init(struct intel_dp *intel_dp)
{
struct drm_i915_private *dev_priv = to_i915(intel_dp_to_dev(intel_dp));
enum port port = intel_aux_port(dev_priv,
dp_to_dig_port(intel_dp)->port);
int i;
intel_dp->aux_ch_ctl_reg = intel_aux_ctl_reg(dev_priv, port);
for (i = 0; i < ARRAY_SIZE(intel_dp->aux_ch_data_reg); i++)
intel_dp->aux_ch_data_reg[i] = intel_aux_data_reg(dev_priv, port, i);
}
static void
intel_dp_aux_fini(struct intel_dp *intel_dp)
{
kfree(intel_dp->aux.name);
}
static void
intel_dp_aux_init(struct intel_dp *intel_dp)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
enum port port = intel_dig_port->port;
intel_aux_reg_init(intel_dp);
drm_dp_aux_init(&intel_dp->aux);
/* Failure to allocate our preferred name is not critical */
intel_dp->aux.name = kasprintf(GFP_KERNEL, "DPDDC-%c", port_name(port));
intel_dp->aux.transfer = intel_dp_aux_transfer;
}
bool intel_dp_source_supports_hbr2(struct intel_dp *intel_dp)
{
struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
struct drm_i915_private *dev_priv = to_i915(dig_port->base.base.dev);
if ((IS_HASWELL(dev_priv) && !IS_HSW_ULX(dev_priv)) ||
IS_BROADWELL(dev_priv) || (INTEL_GEN(dev_priv) >= 9))
return true;
else
return false;
}
static void
intel_dp_set_clock(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config)
{
struct drm_device *dev = encoder->base.dev;
struct drm_i915_private *dev_priv = to_i915(dev);
const struct dp_link_dpll *divisor = NULL;
int i, count = 0;
if (IS_G4X(dev_priv)) {
divisor = gen4_dpll;
count = ARRAY_SIZE(gen4_dpll);
} else if (HAS_PCH_SPLIT(dev_priv)) {
divisor = pch_dpll;
count = ARRAY_SIZE(pch_dpll);
} else if (IS_CHERRYVIEW(dev_priv)) {
divisor = chv_dpll;
count = ARRAY_SIZE(chv_dpll);
} else if (IS_VALLEYVIEW(dev_priv)) {
divisor = vlv_dpll;
count = ARRAY_SIZE(vlv_dpll);
}
if (divisor && count) {
for (i = 0; i < count; i++) {
if (pipe_config->port_clock == divisor[i].clock) {
pipe_config->dpll = divisor[i].dpll;
pipe_config->clock_set = true;
break;
}
}
}
}
static void snprintf_int_array(char *str, size_t len,
const int *array, int nelem)
{
int i;
str[0] = '\0';
for (i = 0; i < nelem; i++) {
int r = snprintf(str, len, "%s%d", i ? ", " : "", array[i]);
if (r >= len)
return;
str += r;
len -= r;
}
}
static void intel_dp_print_rates(struct intel_dp *intel_dp)
{
char str[128]; /* FIXME: too big for stack? */
if ((drm_debug & DRM_UT_KMS) == 0)
return;
snprintf_int_array(str, sizeof(str),
intel_dp->source_rates, intel_dp->num_source_rates);
DRM_DEBUG_KMS("source rates: %s\n", str);
snprintf_int_array(str, sizeof(str),
intel_dp->sink_rates, intel_dp->num_sink_rates);
DRM_DEBUG_KMS("sink rates: %s\n", str);
snprintf_int_array(str, sizeof(str),
intel_dp->common_rates, intel_dp->num_common_rates);
DRM_DEBUG_KMS("common rates: %s\n", str);
}
int
intel_dp_max_link_rate(struct intel_dp *intel_dp)
{
int len;
len = intel_dp_common_len_rate_limit(intel_dp, intel_dp->max_link_rate);
if (WARN_ON(len <= 0))
return 162000;
return intel_dp->common_rates[len - 1];
}
int intel_dp_rate_select(struct intel_dp *intel_dp, int rate)
{
int i = intel_dp_rate_index(intel_dp->sink_rates,
intel_dp->num_sink_rates, rate);
if (WARN_ON(i < 0))
i = 0;
return i;
}
void intel_dp_compute_rate(struct intel_dp *intel_dp, int port_clock,
uint8_t *link_bw, uint8_t *rate_select)
{
/* eDP 1.4 rate select method. */
if (intel_dp->use_rate_select) {
*link_bw = 0;
*rate_select =
intel_dp_rate_select(intel_dp, port_clock);
} else {
*link_bw = drm_dp_link_rate_to_bw_code(port_clock);
*rate_select = 0;
}
}
static int intel_dp_compute_bpp(struct intel_dp *intel_dp,
struct intel_crtc_state *pipe_config)
{
int bpp, bpc;
bpp = pipe_config->pipe_bpp;
bpc = drm_dp_downstream_max_bpc(intel_dp->dpcd, intel_dp->downstream_ports);
if (bpc > 0)
bpp = min(bpp, 3*bpc);
/* For DP Compliance we override the computed bpp for the pipe */
if (intel_dp->compliance.test_data.bpc != 0) {
pipe_config->pipe_bpp = 3*intel_dp->compliance.test_data.bpc;
pipe_config->dither_force_disable = pipe_config->pipe_bpp == 6*3;
DRM_DEBUG_KMS("Setting pipe_bpp to %d\n",
pipe_config->pipe_bpp);
}
return bpp;
}
static bool intel_edp_compare_alt_mode(struct drm_display_mode *m1,
struct drm_display_mode *m2)
{
bool bres = false;
if (m1 && m2)
bres = (m1->hdisplay == m2->hdisplay &&
m1->hsync_start == m2->hsync_start &&
m1->hsync_end == m2->hsync_end &&
m1->htotal == m2->htotal &&
m1->vdisplay == m2->vdisplay &&
m1->vsync_start == m2->vsync_start &&
m1->vsync_end == m2->vsync_end &&
m1->vtotal == m2->vtotal);
return bres;
}
bool
intel_dp_compute_config(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config,
struct drm_connector_state *conn_state)
{
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
struct drm_display_mode *adjusted_mode = &pipe_config->base.adjusted_mode;
struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
enum port port = dp_to_dig_port(intel_dp)->port;
struct intel_crtc *intel_crtc = to_intel_crtc(pipe_config->base.crtc);
struct intel_connector *intel_connector = intel_dp->attached_connector;
struct intel_digital_connector_state *intel_conn_state =
to_intel_digital_connector_state(conn_state);
int lane_count, clock;
int min_lane_count = 1;
int max_lane_count = intel_dp_max_lane_count(intel_dp);
/* Conveniently, the link BW constants become indices with a shift...*/
int min_clock = 0;
int max_clock;
int bpp, mode_rate;
int link_avail, link_clock;
int common_len;
uint8_t link_bw, rate_select;
bool reduce_m_n = drm_dp_has_quirk(&intel_dp->desc,
DP_DPCD_QUIRK_LIMITED_M_N);
common_len = intel_dp_common_len_rate_limit(intel_dp,
intel_dp->max_link_rate);
/* No common link rates between source and sink */
WARN_ON(common_len <= 0);
max_clock = common_len - 1;
if (HAS_PCH_SPLIT(dev_priv) && !HAS_DDI(dev_priv) && port != PORT_A)
pipe_config->has_pch_encoder = true;
pipe_config->has_drrs = false;
if (port == PORT_A)
pipe_config->has_audio = false;
else if (intel_conn_state->force_audio == HDMI_AUDIO_AUTO)
pipe_config->has_audio = intel_dp->has_audio;
else
pipe_config->has_audio = intel_conn_state->force_audio == HDMI_AUDIO_ON;
if (is_edp(intel_dp) && intel_connector->panel.fixed_mode) {
struct drm_display_mode *panel_mode =
intel_connector->panel.alt_fixed_mode;
struct drm_display_mode *req_mode = &pipe_config->base.mode;
if (!intel_edp_compare_alt_mode(req_mode, panel_mode))
panel_mode = intel_connector->panel.fixed_mode;
drm_mode_debug_printmodeline(panel_mode);
intel_fixed_panel_mode(panel_mode, adjusted_mode);
if (INTEL_GEN(dev_priv) >= 9) {
int ret;
ret = skl_update_scaler_crtc(pipe_config);
if (ret)
return ret;
}
if (HAS_GMCH_DISPLAY(dev_priv))
intel_gmch_panel_fitting(intel_crtc, pipe_config,
conn_state->scaling_mode);
else
intel_pch_panel_fitting(intel_crtc, pipe_config,
conn_state->scaling_mode);
}
if (adjusted_mode->flags & DRM_MODE_FLAG_DBLCLK)
return false;
/* Use values requested by Compliance Test Request */
if (intel_dp->compliance.test_type == DP_TEST_LINK_TRAINING) {
int index;
/* Validate the compliance test data since max values
* might have changed due to link train fallback.
*/
if (intel_dp_link_params_valid(intel_dp, intel_dp->compliance.test_link_rate,
intel_dp->compliance.test_lane_count)) {
index = intel_dp_rate_index(intel_dp->common_rates,
intel_dp->num_common_rates,
intel_dp->compliance.test_link_rate);
if (index >= 0)
min_clock = max_clock = index;
min_lane_count = max_lane_count = intel_dp->compliance.test_lane_count;
}
}
DRM_DEBUG_KMS("DP link computation with max lane count %i "
"max bw %d pixel clock %iKHz\n",
max_lane_count, intel_dp->common_rates[max_clock],
adjusted_mode->crtc_clock);
/* Walk through all bpp values. Luckily they're all nicely spaced with 2
* bpc in between. */
bpp = intel_dp_compute_bpp(intel_dp, pipe_config);
if (is_edp(intel_dp)) {
/* Get bpp from vbt only for panels that dont have bpp in edid */
if (intel_connector->base.display_info.bpc == 0 &&
(dev_priv->vbt.edp.bpp && dev_priv->vbt.edp.bpp < bpp)) {
DRM_DEBUG_KMS("clamping bpp for eDP panel to BIOS-provided %i\n",
dev_priv->vbt.edp.bpp);
bpp = dev_priv->vbt.edp.bpp;
}
/*
* Use the maximum clock and number of lanes the eDP panel
* advertizes being capable of. The panels are generally
* designed to support only a single clock and lane
* configuration, and typically these values correspond to the
* native resolution of the panel.
*/
min_lane_count = max_lane_count;
min_clock = max_clock;
}
for (; bpp >= 6*3; bpp -= 2*3) {
mode_rate = intel_dp_link_required(adjusted_mode->crtc_clock,
bpp);
for (clock = min_clock; clock <= max_clock; clock++) {
for (lane_count = min_lane_count;
lane_count <= max_lane_count;
lane_count <<= 1) {
link_clock = intel_dp->common_rates[clock];
link_avail = intel_dp_max_data_rate(link_clock,
lane_count);
if (mode_rate <= link_avail) {
goto found;
}
}
}
}
return false;
found:
if (intel_conn_state->broadcast_rgb == INTEL_BROADCAST_RGB_AUTO) {
/*
* See:
* CEA-861-E - 5.1 Default Encoding Parameters
* VESA DisplayPort Ver.1.2a - 5.1.1.1 Video Colorimetry
*/
pipe_config->limited_color_range =
bpp != 18 &&
drm_default_rgb_quant_range(adjusted_mode) ==
HDMI_QUANTIZATION_RANGE_LIMITED;
} else {
pipe_config->limited_color_range =
intel_conn_state->broadcast_rgb == INTEL_BROADCAST_RGB_LIMITED;
}
pipe_config->lane_count = lane_count;
pipe_config->pipe_bpp = bpp;
pipe_config->port_clock = intel_dp->common_rates[clock];
intel_dp_compute_rate(intel_dp, pipe_config->port_clock,
&link_bw, &rate_select);
DRM_DEBUG_KMS("DP link bw %02x rate select %02x lane count %d clock %d bpp %d\n",
link_bw, rate_select, pipe_config->lane_count,
pipe_config->port_clock, bpp);
DRM_DEBUG_KMS("DP link bw required %i available %i\n",
mode_rate, link_avail);
intel_link_compute_m_n(bpp, lane_count,
adjusted_mode->crtc_clock,
pipe_config->port_clock,
&pipe_config->dp_m_n,
reduce_m_n);
if (intel_connector->panel.downclock_mode != NULL &&
dev_priv->drrs.type == SEAMLESS_DRRS_SUPPORT) {
pipe_config->has_drrs = true;
intel_link_compute_m_n(bpp, lane_count,
intel_connector->panel.downclock_mode->clock,
pipe_config->port_clock,
&pipe_config->dp_m2_n2,
reduce_m_n);
}
/*
* DPLL0 VCO may need to be adjusted to get the correct
* clock for eDP. This will affect cdclk as well.
*/
if (is_edp(intel_dp) && IS_GEN9_BC(dev_priv)) {
int vco;
switch (pipe_config->port_clock / 2) {
case 108000:
case 216000:
vco = 8640000;
break;
default:
vco = 8100000;
break;
}
to_intel_atomic_state(pipe_config->base.state)->cdclk.logical.vco = vco;
}
if (!HAS_DDI(dev_priv))
intel_dp_set_clock(encoder, pipe_config);
return true;
}
void intel_dp_set_link_params(struct intel_dp *intel_dp,
int link_rate, uint8_t lane_count,
bool link_mst)
{
intel_dp->link_rate = link_rate;
intel_dp->lane_count = lane_count;
intel_dp->link_mst = link_mst;
}
static void intel_dp_prepare(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config)
{
struct drm_device *dev = encoder->base.dev;
struct drm_i915_private *dev_priv = to_i915(dev);
struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
enum port port = dp_to_dig_port(intel_dp)->port;
struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc);
const struct drm_display_mode *adjusted_mode = &pipe_config->base.adjusted_mode;
intel_dp_set_link_params(intel_dp, pipe_config->port_clock,
pipe_config->lane_count,
intel_crtc_has_type(pipe_config,
INTEL_OUTPUT_DP_MST));
/*
* There are four kinds of DP registers:
*
* IBX PCH
* SNB CPU
* IVB CPU
* CPT PCH
*
* IBX PCH and CPU are the same for almost everything,
* except that the CPU DP PLL is configured in this
* register
*
* CPT PCH is quite different, having many bits moved
* to the TRANS_DP_CTL register instead. That
* configuration happens (oddly) in ironlake_pch_enable
*/
/* Preserve the BIOS-computed detected bit. This is
* supposed to be read-only.
*/
intel_dp->DP = I915_READ(intel_dp->output_reg) & DP_DETECTED;
/* Handle DP bits in common between all three register formats */
intel_dp->DP |= DP_VOLTAGE_0_4 | DP_PRE_EMPHASIS_0;
intel_dp->DP |= DP_PORT_WIDTH(pipe_config->lane_count);
/* Split out the IBX/CPU vs CPT settings */
if (IS_GEN7(dev_priv) && port == PORT_A) {
if (adjusted_mode->flags & DRM_MODE_FLAG_PHSYNC)
intel_dp->DP |= DP_SYNC_HS_HIGH;
if (adjusted_mode->flags & DRM_MODE_FLAG_PVSYNC)
intel_dp->DP |= DP_SYNC_VS_HIGH;
intel_dp->DP |= DP_LINK_TRAIN_OFF_CPT;
if (drm_dp_enhanced_frame_cap(intel_dp->dpcd))
intel_dp->DP |= DP_ENHANCED_FRAMING;
intel_dp->DP |= crtc->pipe << 29;
} else if (HAS_PCH_CPT(dev_priv) && port != PORT_A) {
u32 trans_dp;
intel_dp->DP |= DP_LINK_TRAIN_OFF_CPT;
trans_dp = I915_READ(TRANS_DP_CTL(crtc->pipe));
if (drm_dp_enhanced_frame_cap(intel_dp->dpcd))
trans_dp |= TRANS_DP_ENH_FRAMING;
else
trans_dp &= ~TRANS_DP_ENH_FRAMING;
I915_WRITE(TRANS_DP_CTL(crtc->pipe), trans_dp);
} else {
if (IS_G4X(dev_priv) && pipe_config->limited_color_range)
intel_dp->DP |= DP_COLOR_RANGE_16_235;
if (adjusted_mode->flags & DRM_MODE_FLAG_PHSYNC)
intel_dp->DP |= DP_SYNC_HS_HIGH;
if (adjusted_mode->flags & DRM_MODE_FLAG_PVSYNC)
intel_dp->DP |= DP_SYNC_VS_HIGH;
intel_dp->DP |= DP_LINK_TRAIN_OFF;
if (drm_dp_enhanced_frame_cap(intel_dp->dpcd))
intel_dp->DP |= DP_ENHANCED_FRAMING;
if (IS_CHERRYVIEW(dev_priv))
intel_dp->DP |= DP_PIPE_SELECT_CHV(crtc->pipe);
else if (crtc->pipe == PIPE_B)
intel_dp->DP |= DP_PIPEB_SELECT;
}
}
#define IDLE_ON_MASK (PP_ON | PP_SEQUENCE_MASK | 0 | PP_SEQUENCE_STATE_MASK)
#define IDLE_ON_VALUE (PP_ON | PP_SEQUENCE_NONE | 0 | PP_SEQUENCE_STATE_ON_IDLE)
#define IDLE_OFF_MASK (PP_ON | PP_SEQUENCE_MASK | 0 | 0)
#define IDLE_OFF_VALUE (0 | PP_SEQUENCE_NONE | 0 | 0)
#define IDLE_CYCLE_MASK (PP_ON | PP_SEQUENCE_MASK | PP_CYCLE_DELAY_ACTIVE | PP_SEQUENCE_STATE_MASK)
#define IDLE_CYCLE_VALUE (0 | PP_SEQUENCE_NONE | 0 | PP_SEQUENCE_STATE_OFF_IDLE)
static void intel_pps_verify_state(struct drm_i915_private *dev_priv,
struct intel_dp *intel_dp);
static void wait_panel_status(struct intel_dp *intel_dp,
u32 mask,
u32 value)
{
struct drm_device *dev = intel_dp_to_dev(intel_dp);
struct drm_i915_private *dev_priv = to_i915(dev);
i915_reg_t pp_stat_reg, pp_ctrl_reg;
lockdep_assert_held(&dev_priv->pps_mutex);
intel_pps_verify_state(dev_priv, intel_dp);
pp_stat_reg = _pp_stat_reg(intel_dp);
pp_ctrl_reg = _pp_ctrl_reg(intel_dp);
DRM_DEBUG_KMS("mask %08x value %08x status %08x control %08x\n",
mask, value,
I915_READ(pp_stat_reg),
I915_READ(pp_ctrl_reg));
if (intel_wait_for_register(dev_priv,
pp_stat_reg, mask, value,
5000))
DRM_ERROR("Panel status timeout: status %08x control %08x\n",
I915_READ(pp_stat_reg),
I915_READ(pp_ctrl_reg));
DRM_DEBUG_KMS("Wait complete\n");
}
static void wait_panel_on(struct intel_dp *intel_dp)
{
DRM_DEBUG_KMS("Wait for panel power on\n");
wait_panel_status(intel_dp, IDLE_ON_MASK, IDLE_ON_VALUE);
}
static void wait_panel_off(struct intel_dp *intel_dp)
{
DRM_DEBUG_KMS("Wait for panel power off time\n");
wait_panel_status(intel_dp, IDLE_OFF_MASK, IDLE_OFF_VALUE);
}
static void wait_panel_power_cycle(struct intel_dp *intel_dp)
{
ktime_t panel_power_on_time;
s64 panel_power_off_duration;
DRM_DEBUG_KMS("Wait for panel power cycle\n");
/* take the difference of currrent time and panel power off time
* and then make panel wait for t11_t12 if needed. */
panel_power_on_time = ktime_get_boottime();
panel_power_off_duration = ktime_ms_delta(panel_power_on_time, intel_dp->panel_power_off_time);
/* When we disable the VDD override bit last we have to do the manual
* wait. */
if (panel_power_off_duration < (s64)intel_dp->panel_power_cycle_delay)
wait_remaining_ms_from_jiffies(jiffies,
intel_dp->panel_power_cycle_delay - panel_power_off_duration);
wait_panel_status(intel_dp, IDLE_CYCLE_MASK, IDLE_CYCLE_VALUE);
}
static void wait_backlight_on(struct intel_dp *intel_dp)
{
wait_remaining_ms_from_jiffies(intel_dp->last_power_on,
intel_dp->backlight_on_delay);
}
static void edp_wait_backlight_off(struct intel_dp *intel_dp)
{
wait_remaining_ms_from_jiffies(intel_dp->last_backlight_off,
intel_dp->backlight_off_delay);
}
/* Read the current pp_control value, unlocking the register if it
* is locked
*/
static u32 ironlake_get_pp_control(struct intel_dp *intel_dp)
{
struct drm_device *dev = intel_dp_to_dev(intel_dp);
struct drm_i915_private *dev_priv = to_i915(dev);
u32 control;
lockdep_assert_held(&dev_priv->pps_mutex);
control = I915_READ(_pp_ctrl_reg(intel_dp));
if (WARN_ON(!HAS_DDI(dev_priv) &&
(control & PANEL_UNLOCK_MASK) != PANEL_UNLOCK_REGS)) {
control &= ~PANEL_UNLOCK_MASK;
control |= PANEL_UNLOCK_REGS;
}
return control;
}
/*
* Must be paired with edp_panel_vdd_off().
* Must hold pps_mutex around the whole on/off sequence.
* Can be nested with intel_edp_panel_vdd_{on,off}() calls.
*/
static bool edp_panel_vdd_on(struct intel_dp *intel_dp)
{
struct drm_device *dev = intel_dp_to_dev(intel_dp);
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct drm_i915_private *dev_priv = to_i915(dev);
u32 pp;
i915_reg_t pp_stat_reg, pp_ctrl_reg;
bool need_to_disable = !intel_dp->want_panel_vdd;
lockdep_assert_held(&dev_priv->pps_mutex);
if (!is_edp(intel_dp))
return false;
cancel_delayed_work(&intel_dp->panel_vdd_work);
intel_dp->want_panel_vdd = true;
if (edp_have_panel_vdd(intel_dp))
return need_to_disable;
intel_display_power_get(dev_priv, intel_dp->aux_power_domain);
DRM_DEBUG_KMS("Turning eDP port %c VDD on\n",
port_name(intel_dig_port->port));
if (!edp_have_panel_power(intel_dp))
wait_panel_power_cycle(intel_dp);
pp = ironlake_get_pp_control(intel_dp);
pp |= EDP_FORCE_VDD;
pp_stat_reg = _pp_stat_reg(intel_dp);
pp_ctrl_reg = _pp_ctrl_reg(intel_dp);
I915_WRITE(pp_ctrl_reg, pp);
POSTING_READ(pp_ctrl_reg);
DRM_DEBUG_KMS("PP_STATUS: 0x%08x PP_CONTROL: 0x%08x\n",
I915_READ(pp_stat_reg), I915_READ(pp_ctrl_reg));
/*
* If the panel wasn't on, delay before accessing aux channel
*/
if (!edp_have_panel_power(intel_dp)) {
DRM_DEBUG_KMS("eDP port %c panel power wasn't enabled\n",
port_name(intel_dig_port->port));
msleep(intel_dp->panel_power_up_delay);
}
return need_to_disable;
}
/*
* Must be paired with intel_edp_panel_vdd_off() or
* intel_edp_panel_off().
* Nested calls to these functions are not allowed since
* we drop the lock. Caller must use some higher level
* locking to prevent nested calls from other threads.
*/
void intel_edp_panel_vdd_on(struct intel_dp *intel_dp)
{
bool vdd;
if (!is_edp(intel_dp))
return;
pps_lock(intel_dp);
vdd = edp_panel_vdd_on(intel_dp);
pps_unlock(intel_dp);
I915_STATE_WARN(!vdd, "eDP port %c VDD already requested on\n",
port_name(dp_to_dig_port(intel_dp)->port));
}
static void edp_panel_vdd_off_sync(struct intel_dp *intel_dp)
{
struct drm_device *dev = intel_dp_to_dev(intel_dp);
struct drm_i915_private *dev_priv = to_i915(dev);
struct intel_digital_port *intel_dig_port =
dp_to_dig_port(intel_dp);
u32 pp;
i915_reg_t pp_stat_reg, pp_ctrl_reg;
lockdep_assert_held(&dev_priv->pps_mutex);
WARN_ON(intel_dp->want_panel_vdd);
if (!edp_have_panel_vdd(intel_dp))
return;
DRM_DEBUG_KMS("Turning eDP port %c VDD off\n",
port_name(intel_dig_port->port));
pp = ironlake_get_pp_control(intel_dp);
pp &= ~EDP_FORCE_VDD;
pp_ctrl_reg = _pp_ctrl_reg(intel_dp);
pp_stat_reg = _pp_stat_reg(intel_dp);
I915_WRITE(pp_ctrl_reg, pp);
POSTING_READ(pp_ctrl_reg);
/* Make sure sequencer is idle before allowing subsequent activity */
DRM_DEBUG_KMS("PP_STATUS: 0x%08x PP_CONTROL: 0x%08x\n",
I915_READ(pp_stat_reg), I915_READ(pp_ctrl_reg));
if ((pp & PANEL_POWER_ON) == 0)
intel_dp->panel_power_off_time = ktime_get_boottime();
intel_display_power_put(dev_priv, intel_dp->aux_power_domain);
}
static void edp_panel_vdd_work(struct work_struct *__work)
{
struct intel_dp *intel_dp = container_of(to_delayed_work(__work),
struct intel_dp, panel_vdd_work);
pps_lock(intel_dp);
if (!intel_dp->want_panel_vdd)
edp_panel_vdd_off_sync(intel_dp);
pps_unlock(intel_dp);
}
static void edp_panel_vdd_schedule_off(struct intel_dp *intel_dp)
{
unsigned long delay;
/*
* Queue the timer to fire a long time from now (relative to the power
* down delay) to keep the panel power up across a sequence of
* operations.
*/
delay = msecs_to_jiffies(intel_dp->panel_power_cycle_delay * 5);
schedule_delayed_work(&intel_dp->panel_vdd_work, delay);
}
/*
* Must be paired with edp_panel_vdd_on().
* Must hold pps_mutex around the whole on/off sequence.
* Can be nested with intel_edp_panel_vdd_{on,off}() calls.
*/
static void edp_panel_vdd_off(struct intel_dp *intel_dp, bool sync)
{
struct drm_i915_private *dev_priv = to_i915(intel_dp_to_dev(intel_dp));
lockdep_assert_held(&dev_priv->pps_mutex);
if (!is_edp(intel_dp))
return;
I915_STATE_WARN(!intel_dp->want_panel_vdd, "eDP port %c VDD not forced on",
port_name(dp_to_dig_port(intel_dp)->port));
intel_dp->want_panel_vdd = false;
if (sync)
edp_panel_vdd_off_sync(intel_dp);
else
edp_panel_vdd_schedule_off(intel_dp);
}
static void edp_panel_on(struct intel_dp *intel_dp)
{
struct drm_device *dev = intel_dp_to_dev(intel_dp);
struct drm_i915_private *dev_priv = to_i915(dev);
u32 pp;
i915_reg_t pp_ctrl_reg;
lockdep_assert_held(&dev_priv->pps_mutex);
if (!is_edp(intel_dp))
return;
DRM_DEBUG_KMS("Turn eDP port %c panel power on\n",
port_name(dp_to_dig_port(intel_dp)->port));
if (WARN(edp_have_panel_power(intel_dp),
"eDP port %c panel power already on\n",
port_name(dp_to_dig_port(intel_dp)->port)))
return;
wait_panel_power_cycle(intel_dp);
pp_ctrl_reg = _pp_ctrl_reg(intel_dp);
pp = ironlake_get_pp_control(intel_dp);
if (IS_GEN5(dev_priv)) {
/* ILK workaround: disable reset around power sequence */
pp &= ~PANEL_POWER_RESET;
I915_WRITE(pp_ctrl_reg, pp);
POSTING_READ(pp_ctrl_reg);
}
pp |= PANEL_POWER_ON;
if (!IS_GEN5(dev_priv))
pp |= PANEL_POWER_RESET;
I915_WRITE(pp_ctrl_reg, pp);
POSTING_READ(pp_ctrl_reg);
wait_panel_on(intel_dp);
intel_dp->last_power_on = jiffies;
if (IS_GEN5(dev_priv)) {
pp |= PANEL_POWER_RESET; /* restore panel reset bit */
I915_WRITE(pp_ctrl_reg, pp);
POSTING_READ(pp_ctrl_reg);
}
}
void intel_edp_panel_on(struct intel_dp *intel_dp)
{
if (!is_edp(intel_dp))
return;
pps_lock(intel_dp);
edp_panel_on(intel_dp);
pps_unlock(intel_dp);
}
static void edp_panel_off(struct intel_dp *intel_dp)
{
struct drm_device *dev = intel_dp_to_dev(intel_dp);
struct drm_i915_private *dev_priv = to_i915(dev);
u32 pp;
i915_reg_t pp_ctrl_reg;
lockdep_assert_held(&dev_priv->pps_mutex);
if (!is_edp(intel_dp))
return;
DRM_DEBUG_KMS("Turn eDP port %c panel power off\n",
port_name(dp_to_dig_port(intel_dp)->port));
WARN(!intel_dp->want_panel_vdd, "Need eDP port %c VDD to turn off panel\n",
port_name(dp_to_dig_port(intel_dp)->port));
pp = ironlake_get_pp_control(intel_dp);
/* We need to switch off panel power _and_ force vdd, for otherwise some
* panels get very unhappy and cease to work. */
pp &= ~(PANEL_POWER_ON | PANEL_POWER_RESET | EDP_FORCE_VDD |
EDP_BLC_ENABLE);
pp_ctrl_reg = _pp_ctrl_reg(intel_dp);
intel_dp->want_panel_vdd = false;
I915_WRITE(pp_ctrl_reg, pp);
POSTING_READ(pp_ctrl_reg);
wait_panel_off(intel_dp);
intel_dp->panel_power_off_time = ktime_get_boottime();
/* We got a reference when we enabled the VDD. */
intel_display_power_put(dev_priv, intel_dp->aux_power_domain);
}
void intel_edp_panel_off(struct intel_dp *intel_dp)
{
if (!is_edp(intel_dp))
return;
pps_lock(intel_dp);
edp_panel_off(intel_dp);
pps_unlock(intel_dp);
}
/* Enable backlight in the panel power control. */
static void _intel_edp_backlight_on(struct intel_dp *intel_dp)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct drm_device *dev = intel_dig_port->base.base.dev;
struct drm_i915_private *dev_priv = to_i915(dev);
u32 pp;
i915_reg_t pp_ctrl_reg;
/*
* If we enable the backlight right away following a panel power
* on, we may see slight flicker as the panel syncs with the eDP
* link. So delay a bit to make sure the image is solid before
* allowing it to appear.
*/
wait_backlight_on(intel_dp);
pps_lock(intel_dp);
pp = ironlake_get_pp_control(intel_dp);
pp |= EDP_BLC_ENABLE;
pp_ctrl_reg = _pp_ctrl_reg(intel_dp);
I915_WRITE(pp_ctrl_reg, pp);
POSTING_READ(pp_ctrl_reg);
pps_unlock(intel_dp);
}
/* Enable backlight PWM and backlight PP control. */
void intel_edp_backlight_on(const struct intel_crtc_state *crtc_state,
const struct drm_connector_state *conn_state)
{
struct intel_dp *intel_dp = enc_to_intel_dp(conn_state->best_encoder);
if (!is_edp(intel_dp))
return;
DRM_DEBUG_KMS("\n");
intel_panel_enable_backlight(crtc_state, conn_state);
_intel_edp_backlight_on(intel_dp);
}
/* Disable backlight in the panel power control. */
static void _intel_edp_backlight_off(struct intel_dp *intel_dp)
{
struct drm_device *dev = intel_dp_to_dev(intel_dp);
struct drm_i915_private *dev_priv = to_i915(dev);
u32 pp;
i915_reg_t pp_ctrl_reg;
if (!is_edp(intel_dp))
return;
pps_lock(intel_dp);
pp = ironlake_get_pp_control(intel_dp);
pp &= ~EDP_BLC_ENABLE;
pp_ctrl_reg = _pp_ctrl_reg(intel_dp);
I915_WRITE(pp_ctrl_reg, pp);
POSTING_READ(pp_ctrl_reg);
pps_unlock(intel_dp);
intel_dp->last_backlight_off = jiffies;
edp_wait_backlight_off(intel_dp);
}
/* Disable backlight PP control and backlight PWM. */
void intel_edp_backlight_off(const struct drm_connector_state *old_conn_state)
{
struct intel_dp *intel_dp = enc_to_intel_dp(old_conn_state->best_encoder);
if (!is_edp(intel_dp))
return;
DRM_DEBUG_KMS("\n");
_intel_edp_backlight_off(intel_dp);
intel_panel_disable_backlight(old_conn_state);
}
/*
* Hook for controlling the panel power control backlight through the bl_power
* sysfs attribute. Take care to handle multiple calls.
*/
static void intel_edp_backlight_power(struct intel_connector *connector,
bool enable)
{
struct intel_dp *intel_dp = intel_attached_dp(&connector->base);
bool is_enabled;
pps_lock(intel_dp);
is_enabled = ironlake_get_pp_control(intel_dp) & EDP_BLC_ENABLE;
pps_unlock(intel_dp);
if (is_enabled == enable)
return;
DRM_DEBUG_KMS("panel power control backlight %s\n",
enable ? "enable" : "disable");
if (enable)
_intel_edp_backlight_on(intel_dp);
else
_intel_edp_backlight_off(intel_dp);
}
static void assert_dp_port(struct intel_dp *intel_dp, bool state)
{
struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
struct drm_i915_private *dev_priv = to_i915(dig_port->base.base.dev);
bool cur_state = I915_READ(intel_dp->output_reg) & DP_PORT_EN;
I915_STATE_WARN(cur_state != state,
"DP port %c state assertion failure (expected %s, current %s)\n",
port_name(dig_port->port),
onoff(state), onoff(cur_state));
}
#define assert_dp_port_disabled(d) assert_dp_port((d), false)
static void assert_edp_pll(struct drm_i915_private *dev_priv, bool state)
{
bool cur_state = I915_READ(DP_A) & DP_PLL_ENABLE;
I915_STATE_WARN(cur_state != state,
"eDP PLL state assertion failure (expected %s, current %s)\n",
onoff(state), onoff(cur_state));
}
#define assert_edp_pll_enabled(d) assert_edp_pll((d), true)
#define assert_edp_pll_disabled(d) assert_edp_pll((d), false)
static void ironlake_edp_pll_on(struct intel_dp *intel_dp,
struct intel_crtc_state *pipe_config)
{
struct intel_crtc *crtc = to_intel_crtc(pipe_config->base.crtc);
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
assert_pipe_disabled(dev_priv, crtc->pipe);
assert_dp_port_disabled(intel_dp);
assert_edp_pll_disabled(dev_priv);
DRM_DEBUG_KMS("enabling eDP PLL for clock %d\n",
pipe_config->port_clock);
intel_dp->DP &= ~DP_PLL_FREQ_MASK;
if (pipe_config->port_clock == 162000)
intel_dp->DP |= DP_PLL_FREQ_162MHZ;
else
intel_dp->DP |= DP_PLL_FREQ_270MHZ;
I915_WRITE(DP_A, intel_dp->DP);
POSTING_READ(DP_A);
udelay(500);
/*
* [DevILK] Work around required when enabling DP PLL
* while a pipe is enabled going to FDI:
* 1. Wait for the start of vertical blank on the enabled pipe going to FDI
* 2. Program DP PLL enable
*/
if (IS_GEN5(dev_priv))
intel_wait_for_vblank_if_active(dev_priv, !crtc->pipe);
intel_dp->DP |= DP_PLL_ENABLE;
I915_WRITE(DP_A, intel_dp->DP);
POSTING_READ(DP_A);
udelay(200);
}
static void ironlake_edp_pll_off(struct intel_dp *intel_dp)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct intel_crtc *crtc = to_intel_crtc(intel_dig_port->base.base.crtc);
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
assert_pipe_disabled(dev_priv, crtc->pipe);
assert_dp_port_disabled(intel_dp);
assert_edp_pll_enabled(dev_priv);
DRM_DEBUG_KMS("disabling eDP PLL\n");
intel_dp->DP &= ~DP_PLL_ENABLE;
I915_WRITE(DP_A, intel_dp->DP);
POSTING_READ(DP_A);
udelay(200);
}
/* If the sink supports it, try to set the power state appropriately */
void intel_dp_sink_dpms(struct intel_dp *intel_dp, int mode)
{
int ret, i;
/* Should have a valid DPCD by this point */
if (intel_dp->dpcd[DP_DPCD_REV] < 0x11)
return;
if (mode != DRM_MODE_DPMS_ON) {
ret = drm_dp_dpcd_writeb(&intel_dp->aux, DP_SET_POWER,
DP_SET_POWER_D3);
} else {
struct intel_lspcon *lspcon = dp_to_lspcon(intel_dp);
/*
* When turning on, we need to retry for 1ms to give the sink
* time to wake up.
*/
for (i = 0; i < 3; i++) {
ret = drm_dp_dpcd_writeb(&intel_dp->aux, DP_SET_POWER,
DP_SET_POWER_D0);
if (ret == 1)
break;
msleep(1);
}
if (ret == 1 && lspcon->active)
lspcon_wait_pcon_mode(lspcon);
}
if (ret != 1)
DRM_DEBUG_KMS("failed to %s sink power state\n",
mode == DRM_MODE_DPMS_ON ? "enable" : "disable");
}
static bool intel_dp_get_hw_state(struct intel_encoder *encoder,
enum pipe *pipe)
{
struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
enum port port = dp_to_dig_port(intel_dp)->port;
struct drm_device *dev = encoder->base.dev;
struct drm_i915_private *dev_priv = to_i915(dev);
u32 tmp;
bool ret;
if (!intel_display_power_get_if_enabled(dev_priv,
encoder->power_domain))
return false;
ret = false;
tmp = I915_READ(intel_dp->output_reg);
if (!(tmp & DP_PORT_EN))
goto out;
if (IS_GEN7(dev_priv) && port == PORT_A) {
*pipe = PORT_TO_PIPE_CPT(tmp);
} else if (HAS_PCH_CPT(dev_priv) && port != PORT_A) {
enum pipe p;
for_each_pipe(dev_priv, p) {
u32 trans_dp = I915_READ(TRANS_DP_CTL(p));
if (TRANS_DP_PIPE_TO_PORT(trans_dp) == port) {
*pipe = p;
ret = true;
goto out;
}
}
DRM_DEBUG_KMS("No pipe for dp port 0x%x found\n",
i915_mmio_reg_offset(intel_dp->output_reg));
} else if (IS_CHERRYVIEW(dev_priv)) {
*pipe = DP_PORT_TO_PIPE_CHV(tmp);
} else {
*pipe = PORT_TO_PIPE(tmp);
}
ret = true;
out:
intel_display_power_put(dev_priv, encoder->power_domain);
return ret;
}
static void intel_dp_get_config(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config)
{
struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
u32 tmp, flags = 0;
struct drm_device *dev = encoder->base.dev;
struct drm_i915_private *dev_priv = to_i915(dev);
enum port port = dp_to_dig_port(intel_dp)->port;
struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc);
tmp = I915_READ(intel_dp->output_reg);
pipe_config->has_audio = tmp & DP_AUDIO_OUTPUT_ENABLE && port != PORT_A;
if (HAS_PCH_CPT(dev_priv) && port != PORT_A) {
u32 trans_dp = I915_READ(TRANS_DP_CTL(crtc->pipe));
if (trans_dp & TRANS_DP_HSYNC_ACTIVE_HIGH)
flags |= DRM_MODE_FLAG_PHSYNC;
else
flags |= DRM_MODE_FLAG_NHSYNC;
if (trans_dp & TRANS_DP_VSYNC_ACTIVE_HIGH)
flags |= DRM_MODE_FLAG_PVSYNC;
else
flags |= DRM_MODE_FLAG_NVSYNC;
} else {
if (tmp & DP_SYNC_HS_HIGH)
flags |= DRM_MODE_FLAG_PHSYNC;
else
flags |= DRM_MODE_FLAG_NHSYNC;
if (tmp & DP_SYNC_VS_HIGH)
flags |= DRM_MODE_FLAG_PVSYNC;
else
flags |= DRM_MODE_FLAG_NVSYNC;
}
pipe_config->base.adjusted_mode.flags |= flags;
if (IS_G4X(dev_priv) && tmp & DP_COLOR_RANGE_16_235)
pipe_config->limited_color_range = true;
pipe_config->lane_count =
((tmp & DP_PORT_WIDTH_MASK) >> DP_PORT_WIDTH_SHIFT) + 1;
intel_dp_get_m_n(crtc, pipe_config);
if (port == PORT_A) {
if ((I915_READ(DP_A) & DP_PLL_FREQ_MASK) == DP_PLL_FREQ_162MHZ)
pipe_config->port_clock = 162000;
else
pipe_config->port_clock = 270000;
}
pipe_config->base.adjusted_mode.crtc_clock =
intel_dotclock_calculate(pipe_config->port_clock,
&pipe_config->dp_m_n);
if (is_edp(intel_dp) && dev_priv->vbt.edp.bpp &&
pipe_config->pipe_bpp > dev_priv->vbt.edp.bpp) {
/*
* This is a big fat ugly hack.
*
* Some machines in UEFI boot mode provide us a VBT that has 18
* bpp and 1.62 GHz link bandwidth for eDP, which for reasons
* unknown we fail to light up. Yet the same BIOS boots up with
* 24 bpp and 2.7 GHz link. Use the same bpp as the BIOS uses as
* max, not what it tells us to use.
*
* Note: This will still be broken if the eDP panel is not lit
* up by the BIOS, and thus we can't get the mode at module
* load.
*/
DRM_DEBUG_KMS("pipe has %d bpp for eDP panel, overriding BIOS-provided max %d bpp\n",
pipe_config->pipe_bpp, dev_priv->vbt.edp.bpp);
dev_priv->vbt.edp.bpp = pipe_config->pipe_bpp;
}
}
static void intel_disable_dp(struct intel_encoder *encoder,
struct intel_crtc_state *old_crtc_state,
struct drm_connector_state *old_conn_state)
{
struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
if (old_crtc_state->has_audio)
intel_audio_codec_disable(encoder);
if (HAS_PSR(dev_priv) && !HAS_DDI(dev_priv))
intel_psr_disable(intel_dp);
/* Make sure the panel is off before trying to change the mode. But also
* ensure that we have vdd while we switch off the panel. */
intel_edp_panel_vdd_on(intel_dp);
intel_edp_backlight_off(old_conn_state);
intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF);
intel_edp_panel_off(intel_dp);
/* disable the port before the pipe on g4x */
if (INTEL_GEN(dev_priv) < 5)
intel_dp_link_down(intel_dp);
}
static void ilk_post_disable_dp(struct intel_encoder *encoder,
struct intel_crtc_state *old_crtc_state,
struct drm_connector_state *old_conn_state)
{
struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
enum port port = dp_to_dig_port(intel_dp)->port;
intel_dp_link_down(intel_dp);
/* Only ilk+ has port A */
if (port == PORT_A)
ironlake_edp_pll_off(intel_dp);
}
static void vlv_post_disable_dp(struct intel_encoder *encoder,
struct intel_crtc_state *old_crtc_state,
struct drm_connector_state *old_conn_state)
{
struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
intel_dp_link_down(intel_dp);
}
static void chv_post_disable_dp(struct intel_encoder *encoder,
struct intel_crtc_state *old_crtc_state,
struct drm_connector_state *old_conn_state)
{
struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
struct drm_device *dev = encoder->base.dev;
struct drm_i915_private *dev_priv = to_i915(dev);
intel_dp_link_down(intel_dp);
mutex_lock(&dev_priv->sb_lock);
/* Assert data lane reset */
chv_data_lane_soft_reset(encoder, true);
mutex_unlock(&dev_priv->sb_lock);
}
static void
_intel_dp_set_link_train(struct intel_dp *intel_dp,
uint32_t *DP,
uint8_t dp_train_pat)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct drm_device *dev = intel_dig_port->base.base.dev;
struct drm_i915_private *dev_priv = to_i915(dev);
enum port port = intel_dig_port->port;
if (dp_train_pat & DP_TRAINING_PATTERN_MASK)
DRM_DEBUG_KMS("Using DP training pattern TPS%d\n",
dp_train_pat & DP_TRAINING_PATTERN_MASK);
if (HAS_DDI(dev_priv)) {
uint32_t temp = I915_READ(DP_TP_CTL(port));
if (dp_train_pat & DP_LINK_SCRAMBLING_DISABLE)
temp |= DP_TP_CTL_SCRAMBLE_DISABLE;
else
temp &= ~DP_TP_CTL_SCRAMBLE_DISABLE;
temp &= ~DP_TP_CTL_LINK_TRAIN_MASK;
switch (dp_train_pat & DP_TRAINING_PATTERN_MASK) {
case DP_TRAINING_PATTERN_DISABLE:
temp |= DP_TP_CTL_LINK_TRAIN_NORMAL;
break;
case DP_TRAINING_PATTERN_1:
temp |= DP_TP_CTL_LINK_TRAIN_PAT1;
break;
case DP_TRAINING_PATTERN_2:
temp |= DP_TP_CTL_LINK_TRAIN_PAT2;
break;
case DP_TRAINING_PATTERN_3:
temp |= DP_TP_CTL_LINK_TRAIN_PAT3;
break;
}
I915_WRITE(DP_TP_CTL(port), temp);
} else if ((IS_GEN7(dev_priv) && port == PORT_A) ||
(HAS_PCH_CPT(dev_priv) && port != PORT_A)) {
*DP &= ~DP_LINK_TRAIN_MASK_CPT;
switch (dp_train_pat & DP_TRAINING_PATTERN_MASK) {
case DP_TRAINING_PATTERN_DISABLE:
*DP |= DP_LINK_TRAIN_OFF_CPT;
break;
case DP_TRAINING_PATTERN_1:
*DP |= DP_LINK_TRAIN_PAT_1_CPT;
break;
case DP_TRAINING_PATTERN_2:
*DP |= DP_LINK_TRAIN_PAT_2_CPT;
break;
case DP_TRAINING_PATTERN_3:
DRM_DEBUG_KMS("TPS3 not supported, using TPS2 instead\n");
*DP |= DP_LINK_TRAIN_PAT_2_CPT;
break;
}
} else {
if (IS_CHERRYVIEW(dev_priv))
*DP &= ~DP_LINK_TRAIN_MASK_CHV;
else
*DP &= ~DP_LINK_TRAIN_MASK;
switch (dp_train_pat & DP_TRAINING_PATTERN_MASK) {
case DP_TRAINING_PATTERN_DISABLE:
*DP |= DP_LINK_TRAIN_OFF;
break;
case DP_TRAINING_PATTERN_1:
*DP |= DP_LINK_TRAIN_PAT_1;
break;
case DP_TRAINING_PATTERN_2:
*DP |= DP_LINK_TRAIN_PAT_2;
break;
case DP_TRAINING_PATTERN_3:
if (IS_CHERRYVIEW(dev_priv)) {
*DP |= DP_LINK_TRAIN_PAT_3_CHV;
} else {
DRM_DEBUG_KMS("TPS3 not supported, using TPS2 instead\n");
*DP |= DP_LINK_TRAIN_PAT_2;
}
break;
}
}
}
static void intel_dp_enable_port(struct intel_dp *intel_dp,
struct intel_crtc_state *old_crtc_state)
{
struct drm_device *dev = intel_dp_to_dev(intel_dp);
struct drm_i915_private *dev_priv = to_i915(dev);
/* enable with pattern 1 (as per spec) */
intel_dp_program_link_training_pattern(intel_dp, DP_TRAINING_PATTERN_1);
/*
* Magic for VLV/CHV. We _must_ first set up the register
* without actually enabling the port, and then do another
* write to enable the port. Otherwise link training will
* fail when the power sequencer is freshly used for this port.
*/
intel_dp->DP |= DP_PORT_EN;
if (old_crtc_state->has_audio)
intel_dp->DP |= DP_AUDIO_OUTPUT_ENABLE;
I915_WRITE(intel_dp->output_reg, intel_dp->DP);
POSTING_READ(intel_dp->output_reg);
}
static void intel_enable_dp(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config,
struct drm_connector_state *conn_state)
{
struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
struct drm_device *dev = encoder->base.dev;
struct drm_i915_private *dev_priv = to_i915(dev);
struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc);
uint32_t dp_reg = I915_READ(intel_dp->output_reg);
enum pipe pipe = crtc->pipe;
if (WARN_ON(dp_reg & DP_PORT_EN))
return;
pps_lock(intel_dp);
if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
vlv_init_panel_power_sequencer(intel_dp);
intel_dp_enable_port(intel_dp, pipe_config);
edp_panel_vdd_on(intel_dp);
edp_panel_on(intel_dp);
edp_panel_vdd_off(intel_dp, true);
pps_unlock(intel_dp);
if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
unsigned int lane_mask = 0x0;
if (IS_CHERRYVIEW(dev_priv))
lane_mask = intel_dp_unused_lane_mask(pipe_config->lane_count);
vlv_wait_port_ready(dev_priv, dp_to_dig_port(intel_dp),
lane_mask);
}
intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON);
intel_dp_start_link_train(intel_dp);
intel_dp_stop_link_train(intel_dp);
if (pipe_config->has_audio) {
DRM_DEBUG_DRIVER("Enabling DP audio on pipe %c\n",
pipe_name(pipe));
intel_audio_codec_enable(encoder, pipe_config, conn_state);
}
}
static void g4x_enable_dp(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config,
struct drm_connector_state *conn_state)
{
intel_enable_dp(encoder, pipe_config, conn_state);
intel_edp_backlight_on(pipe_config, conn_state);
}
static void vlv_enable_dp(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config,
struct drm_connector_state *conn_state)
{
struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
intel_edp_backlight_on(pipe_config, conn_state);
intel_psr_enable(intel_dp);
}
static void g4x_pre_enable_dp(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config,
struct drm_connector_state *conn_state)
{
struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
enum port port = dp_to_dig_port(intel_dp)->port;
intel_dp_prepare(encoder, pipe_config);
/* Only ilk+ has port A */
if (port == PORT_A)
ironlake_edp_pll_on(intel_dp, pipe_config);
}
static void vlv_detach_power_sequencer(struct intel_dp *intel_dp)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct drm_i915_private *dev_priv = to_i915(intel_dig_port->base.base.dev);
enum pipe pipe = intel_dp->pps_pipe;
i915_reg_t pp_on_reg = PP_ON_DELAYS(pipe);
WARN_ON(intel_dp->active_pipe != INVALID_PIPE);
if (WARN_ON(pipe != PIPE_A && pipe != PIPE_B))
return;
edp_panel_vdd_off_sync(intel_dp);
/*
* VLV seems to get confused when multiple power seqeuencers
* have the same port selected (even if only one has power/vdd
* enabled). The failure manifests as vlv_wait_port_ready() failing
* CHV on the other hand doesn't seem to mind having the same port
* selected in multiple power seqeuencers, but let's clear the
* port select always when logically disconnecting a power sequencer
* from a port.
*/
DRM_DEBUG_KMS("detaching pipe %c power sequencer from port %c\n",
pipe_name(pipe), port_name(intel_dig_port->port));
I915_WRITE(pp_on_reg, 0);
POSTING_READ(pp_on_reg);
intel_dp->pps_pipe = INVALID_PIPE;
}
static void vlv_steal_power_sequencer(struct drm_device *dev,
enum pipe pipe)
{
struct drm_i915_private *dev_priv = to_i915(dev);
struct intel_encoder *encoder;
lockdep_assert_held(&dev_priv->pps_mutex);
for_each_intel_encoder(dev, encoder) {
struct intel_dp *intel_dp;
enum port port;
if (encoder->type != INTEL_OUTPUT_DP &&
encoder->type != INTEL_OUTPUT_EDP)
continue;
intel_dp = enc_to_intel_dp(&encoder->base);
port = dp_to_dig_port(intel_dp)->port;
WARN(intel_dp->active_pipe == pipe,
"stealing pipe %c power sequencer from active (e)DP port %c\n",
pipe_name(pipe), port_name(port));
if (intel_dp->pps_pipe != pipe)
continue;
DRM_DEBUG_KMS("stealing pipe %c power sequencer from port %c\n",
pipe_name(pipe), port_name(port));
/* make sure vdd is off before we steal it */
vlv_detach_power_sequencer(intel_dp);
}
}
static void vlv_init_panel_power_sequencer(struct intel_dp *intel_dp)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct intel_encoder *encoder = &intel_dig_port->base;
struct drm_device *dev = encoder->base.dev;
struct drm_i915_private *dev_priv = to_i915(dev);
struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc);
lockdep_assert_held(&dev_priv->pps_mutex);
WARN_ON(intel_dp->active_pipe != INVALID_PIPE);
if (intel_dp->pps_pipe != INVALID_PIPE &&
intel_dp->pps_pipe != crtc->pipe) {
/*
* If another power sequencer was being used on this
* port previously make sure to turn off vdd there while
* we still have control of it.
*/
vlv_detach_power_sequencer(intel_dp);
}
/*
* We may be stealing the power
* sequencer from another port.
*/
vlv_steal_power_sequencer(dev, crtc->pipe);
intel_dp->active_pipe = crtc->pipe;
if (!is_edp(intel_dp))
return;
/* now it's all ours */
intel_dp->pps_pipe = crtc->pipe;
DRM_DEBUG_KMS("initializing pipe %c power sequencer for port %c\n",
pipe_name(intel_dp->pps_pipe), port_name(intel_dig_port->port));
/* init power sequencer on this pipe and port */
intel_dp_init_panel_power_sequencer(dev, intel_dp);
intel_dp_init_panel_power_sequencer_registers(dev, intel_dp, true);
}
static void vlv_pre_enable_dp(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config,
struct drm_connector_state *conn_state)
{
vlv_phy_pre_encoder_enable(encoder);
intel_enable_dp(encoder, pipe_config, conn_state);
}
static void vlv_dp_pre_pll_enable(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config,
struct drm_connector_state *conn_state)
{
intel_dp_prepare(encoder, pipe_config);
vlv_phy_pre_pll_enable(encoder);
}
static void chv_pre_enable_dp(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config,
struct drm_connector_state *conn_state)
{
chv_phy_pre_encoder_enable(encoder);
intel_enable_dp(encoder, pipe_config, conn_state);
/* Second common lane will stay alive on its own now */
chv_phy_release_cl2_override(encoder);
}
static void chv_dp_pre_pll_enable(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config,
struct drm_connector_state *conn_state)
{
intel_dp_prepare(encoder, pipe_config);
chv_phy_pre_pll_enable(encoder);
}
static void chv_dp_post_pll_disable(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config,
struct drm_connector_state *conn_state)
{
chv_phy_post_pll_disable(encoder);
}
/*
* Fetch AUX CH registers 0x202 - 0x207 which contain
* link status information
*/
bool
intel_dp_get_link_status(struct intel_dp *intel_dp, uint8_t link_status[DP_LINK_STATUS_SIZE])
{
return drm_dp_dpcd_read(&intel_dp->aux, DP_LANE0_1_STATUS, link_status,
DP_LINK_STATUS_SIZE) == DP_LINK_STATUS_SIZE;
}
static bool intel_dp_get_y_cord_status(struct intel_dp *intel_dp)
{
uint8_t psr_caps = 0;
if (drm_dp_dpcd_readb(&intel_dp->aux, DP_PSR_CAPS, &psr_caps) != 1)
return false;
return psr_caps & DP_PSR2_SU_Y_COORDINATE_REQUIRED;
}
static bool intel_dp_get_colorimetry_status(struct intel_dp *intel_dp)
{
uint8_t dprx = 0;
if (drm_dp_dpcd_readb(&intel_dp->aux, DP_DPRX_FEATURE_ENUMERATION_LIST,
&dprx) != 1)
return false;
return dprx & DP_VSC_SDP_EXT_FOR_COLORIMETRY_SUPPORTED;
}
static bool intel_dp_get_alpm_status(struct intel_dp *intel_dp)
{
uint8_t alpm_caps = 0;
if (drm_dp_dpcd_readb(&intel_dp->aux, DP_RECEIVER_ALPM_CAP,
&alpm_caps) != 1)
return false;
return alpm_caps & DP_ALPM_CAP;
}
/* These are source-specific values. */
uint8_t
intel_dp_voltage_max(struct intel_dp *intel_dp)
{
struct drm_i915_private *dev_priv = to_i915(intel_dp_to_dev(intel_dp));
enum port port = dp_to_dig_port(intel_dp)->port;
if (IS_GEN9_LP(dev_priv))
return DP_TRAIN_VOLTAGE_SWING_LEVEL_3;
else if (INTEL_GEN(dev_priv) >= 9) {
struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base;
return intel_ddi_dp_voltage_max(encoder);
} else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
return DP_TRAIN_VOLTAGE_SWING_LEVEL_3;
else if (IS_GEN7(dev_priv) && port == PORT_A)
return DP_TRAIN_VOLTAGE_SWING_LEVEL_2;
else if (HAS_PCH_CPT(dev_priv) && port != PORT_A)
return DP_TRAIN_VOLTAGE_SWING_LEVEL_3;
else
return DP_TRAIN_VOLTAGE_SWING_LEVEL_2;
}
uint8_t
intel_dp_pre_emphasis_max(struct intel_dp *intel_dp, uint8_t voltage_swing)
{
struct drm_i915_private *dev_priv = to_i915(intel_dp_to_dev(intel_dp));
enum port port = dp_to_dig_port(intel_dp)->port;
if (INTEL_GEN(dev_priv) >= 9) {
switch (voltage_swing & DP_TRAIN_VOLTAGE_SWING_MASK) {
case DP_TRAIN_VOLTAGE_SWING_LEVEL_0:
return DP_TRAIN_PRE_EMPH_LEVEL_3;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_1:
return DP_TRAIN_PRE_EMPH_LEVEL_2;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_2:
return DP_TRAIN_PRE_EMPH_LEVEL_1;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_3:
return DP_TRAIN_PRE_EMPH_LEVEL_0;
default:
return DP_TRAIN_PRE_EMPH_LEVEL_0;
}
} else if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) {
switch (voltage_swing & DP_TRAIN_VOLTAGE_SWING_MASK) {
case DP_TRAIN_VOLTAGE_SWING_LEVEL_0:
return DP_TRAIN_PRE_EMPH_LEVEL_3;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_1:
return DP_TRAIN_PRE_EMPH_LEVEL_2;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_2:
return DP_TRAIN_PRE_EMPH_LEVEL_1;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_3:
default:
return DP_TRAIN_PRE_EMPH_LEVEL_0;
}
} else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
switch (voltage_swing & DP_TRAIN_VOLTAGE_SWING_MASK) {
case DP_TRAIN_VOLTAGE_SWING_LEVEL_0:
return DP_TRAIN_PRE_EMPH_LEVEL_3;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_1:
return DP_TRAIN_PRE_EMPH_LEVEL_2;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_2:
return DP_TRAIN_PRE_EMPH_LEVEL_1;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_3:
default:
return DP_TRAIN_PRE_EMPH_LEVEL_0;
}
} else if (IS_GEN7(dev_priv) && port == PORT_A) {
switch (voltage_swing & DP_TRAIN_VOLTAGE_SWING_MASK) {
case DP_TRAIN_VOLTAGE_SWING_LEVEL_0:
return DP_TRAIN_PRE_EMPH_LEVEL_2;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_1:
case DP_TRAIN_VOLTAGE_SWING_LEVEL_2:
return DP_TRAIN_PRE_EMPH_LEVEL_1;
default:
return DP_TRAIN_PRE_EMPH_LEVEL_0;
}
} else {
switch (voltage_swing & DP_TRAIN_VOLTAGE_SWING_MASK) {
case DP_TRAIN_VOLTAGE_SWING_LEVEL_0:
return DP_TRAIN_PRE_EMPH_LEVEL_2;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_1:
return DP_TRAIN_PRE_EMPH_LEVEL_2;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_2:
return DP_TRAIN_PRE_EMPH_LEVEL_1;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_3:
default:
return DP_TRAIN_PRE_EMPH_LEVEL_0;
}
}
}
static uint32_t vlv_signal_levels(struct intel_dp *intel_dp)
{
struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base;
unsigned long demph_reg_value, preemph_reg_value,
uniqtranscale_reg_value;
uint8_t train_set = intel_dp->train_set[0];
switch (train_set & DP_TRAIN_PRE_EMPHASIS_MASK) {
case DP_TRAIN_PRE_EMPH_LEVEL_0:
preemph_reg_value = 0x0004000;
switch (train_set & DP_TRAIN_VOLTAGE_SWING_MASK) {
case DP_TRAIN_VOLTAGE_SWING_LEVEL_0:
demph_reg_value = 0x2B405555;
uniqtranscale_reg_value = 0x552AB83A;
break;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_1:
demph_reg_value = 0x2B404040;
uniqtranscale_reg_value = 0x5548B83A;
break;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_2:
demph_reg_value = 0x2B245555;
uniqtranscale_reg_value = 0x5560B83A;
break;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_3:
demph_reg_value = 0x2B405555;
uniqtranscale_reg_value = 0x5598DA3A;
break;
default:
return 0;
}
break;
case DP_TRAIN_PRE_EMPH_LEVEL_1:
preemph_reg_value = 0x0002000;
switch (train_set & DP_TRAIN_VOLTAGE_SWING_MASK) {
case DP_TRAIN_VOLTAGE_SWING_LEVEL_0:
demph_reg_value = 0x2B404040;
uniqtranscale_reg_value = 0x5552B83A;
break;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_1:
demph_reg_value = 0x2B404848;
uniqtranscale_reg_value = 0x5580B83A;
break;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_2:
demph_reg_value = 0x2B404040;
uniqtranscale_reg_value = 0x55ADDA3A;
break;
default:
return 0;
}
break;
case DP_TRAIN_PRE_EMPH_LEVEL_2:
preemph_reg_value = 0x0000000;
switch (train_set & DP_TRAIN_VOLTAGE_SWING_MASK) {
case DP_TRAIN_VOLTAGE_SWING_LEVEL_0:
demph_reg_value = 0x2B305555;
uniqtranscale_reg_value = 0x5570B83A;
break;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_1:
demph_reg_value = 0x2B2B4040;
uniqtranscale_reg_value = 0x55ADDA3A;
break;
default:
return 0;
}
break;
case DP_TRAIN_PRE_EMPH_LEVEL_3:
preemph_reg_value = 0x0006000;
switch (train_set & DP_TRAIN_VOLTAGE_SWING_MASK) {
case DP_TRAIN_VOLTAGE_SWING_LEVEL_0:
demph_reg_value = 0x1B405555;
uniqtranscale_reg_value = 0x55ADDA3A;
break;
default:
return 0;
}
break;
default:
return 0;
}
vlv_set_phy_signal_level(encoder, demph_reg_value, preemph_reg_value,
uniqtranscale_reg_value, 0);
return 0;
}
static uint32_t chv_signal_levels(struct intel_dp *intel_dp)
{
struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base;
u32 deemph_reg_value, margin_reg_value;
bool uniq_trans_scale = false;
uint8_t train_set = intel_dp->train_set[0];
switch (train_set & DP_TRAIN_PRE_EMPHASIS_MASK) {
case DP_TRAIN_PRE_EMPH_LEVEL_0:
switch (train_set & DP_TRAIN_VOLTAGE_SWING_MASK) {
case DP_TRAIN_VOLTAGE_SWING_LEVEL_0:
deemph_reg_value = 128;
margin_reg_value = 52;
break;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_1:
deemph_reg_value = 128;
margin_reg_value = 77;
break;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_2:
deemph_reg_value = 128;
margin_reg_value = 102;
break;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_3:
deemph_reg_value = 128;
margin_reg_value = 154;
uniq_trans_scale = true;
break;
default:
return 0;
}
break;
case DP_TRAIN_PRE_EMPH_LEVEL_1:
switch (train_set & DP_TRAIN_VOLTAGE_SWING_MASK) {
case DP_TRAIN_VOLTAGE_SWING_LEVEL_0:
deemph_reg_value = 85;
margin_reg_value = 78;
break;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_1:
deemph_reg_value = 85;
margin_reg_value = 116;
break;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_2:
deemph_reg_value = 85;
margin_reg_value = 154;
break;
default:
return 0;
}
break;
case DP_TRAIN_PRE_EMPH_LEVEL_2:
switch (train_set & DP_TRAIN_VOLTAGE_SWING_MASK) {
case DP_TRAIN_VOLTAGE_SWING_LEVEL_0:
deemph_reg_value = 64;
margin_reg_value = 104;
break;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_1:
deemph_reg_value = 64;
margin_reg_value = 154;
break;
default:
return 0;
}
break;
case DP_TRAIN_PRE_EMPH_LEVEL_3:
switch (train_set & DP_TRAIN_VOLTAGE_SWING_MASK) {
case DP_TRAIN_VOLTAGE_SWING_LEVEL_0:
deemph_reg_value = 43;
margin_reg_value = 154;
break;
default:
return 0;
}
break;
default:
return 0;
}
chv_set_phy_signal_level(encoder, deemph_reg_value,
margin_reg_value, uniq_trans_scale);
return 0;
}
static uint32_t
gen4_signal_levels(uint8_t train_set)
{
uint32_t signal_levels = 0;
switch (train_set & DP_TRAIN_VOLTAGE_SWING_MASK) {
case DP_TRAIN_VOLTAGE_SWING_LEVEL_0:
default:
signal_levels |= DP_VOLTAGE_0_4;
break;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_1:
signal_levels |= DP_VOLTAGE_0_6;
break;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_2:
signal_levels |= DP_VOLTAGE_0_8;
break;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_3:
signal_levels |= DP_VOLTAGE_1_2;
break;
}
switch (train_set & DP_TRAIN_PRE_EMPHASIS_MASK) {
case DP_TRAIN_PRE_EMPH_LEVEL_0:
default:
signal_levels |= DP_PRE_EMPHASIS_0;
break;
case DP_TRAIN_PRE_EMPH_LEVEL_1:
signal_levels |= DP_PRE_EMPHASIS_3_5;
break;
case DP_TRAIN_PRE_EMPH_LEVEL_2:
signal_levels |= DP_PRE_EMPHASIS_6;
break;
case DP_TRAIN_PRE_EMPH_LEVEL_3:
signal_levels |= DP_PRE_EMPHASIS_9_5;
break;
}
return signal_levels;
}
/* Gen6's DP voltage swing and pre-emphasis control */
static uint32_t
gen6_edp_signal_levels(uint8_t train_set)
{
int signal_levels = train_set & (DP_TRAIN_VOLTAGE_SWING_MASK |
DP_TRAIN_PRE_EMPHASIS_MASK);
switch (signal_levels) {
case DP_TRAIN_VOLTAGE_SWING_LEVEL_0 | DP_TRAIN_PRE_EMPH_LEVEL_0:
case DP_TRAIN_VOLTAGE_SWING_LEVEL_1 | DP_TRAIN_PRE_EMPH_LEVEL_0:
return EDP_LINK_TRAIN_400_600MV_0DB_SNB_B;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_0 | DP_TRAIN_PRE_EMPH_LEVEL_1:
return EDP_LINK_TRAIN_400MV_3_5DB_SNB_B;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_0 | DP_TRAIN_PRE_EMPH_LEVEL_2:
case DP_TRAIN_VOLTAGE_SWING_LEVEL_1 | DP_TRAIN_PRE_EMPH_LEVEL_2:
return EDP_LINK_TRAIN_400_600MV_6DB_SNB_B;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_1 | DP_TRAIN_PRE_EMPH_LEVEL_1:
case DP_TRAIN_VOLTAGE_SWING_LEVEL_2 | DP_TRAIN_PRE_EMPH_LEVEL_1:
return EDP_LINK_TRAIN_600_800MV_3_5DB_SNB_B;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_2 | DP_TRAIN_PRE_EMPH_LEVEL_0:
case DP_TRAIN_VOLTAGE_SWING_LEVEL_3 | DP_TRAIN_PRE_EMPH_LEVEL_0:
return EDP_LINK_TRAIN_800_1200MV_0DB_SNB_B;
default:
DRM_DEBUG_KMS("Unsupported voltage swing/pre-emphasis level:"
"0x%x\n", signal_levels);
return EDP_LINK_TRAIN_400_600MV_0DB_SNB_B;
}
}
/* Gen7's DP voltage swing and pre-emphasis control */
static uint32_t
gen7_edp_signal_levels(uint8_t train_set)
{
int signal_levels = train_set & (DP_TRAIN_VOLTAGE_SWING_MASK |
DP_TRAIN_PRE_EMPHASIS_MASK);
switch (signal_levels) {
case DP_TRAIN_VOLTAGE_SWING_LEVEL_0 | DP_TRAIN_PRE_EMPH_LEVEL_0:
return EDP_LINK_TRAIN_400MV_0DB_IVB;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_0 | DP_TRAIN_PRE_EMPH_LEVEL_1:
return EDP_LINK_TRAIN_400MV_3_5DB_IVB;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_0 | DP_TRAIN_PRE_EMPH_LEVEL_2:
return EDP_LINK_TRAIN_400MV_6DB_IVB;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_1 | DP_TRAIN_PRE_EMPH_LEVEL_0:
return EDP_LINK_TRAIN_600MV_0DB_IVB;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_1 | DP_TRAIN_PRE_EMPH_LEVEL_1:
return EDP_LINK_TRAIN_600MV_3_5DB_IVB;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_2 | DP_TRAIN_PRE_EMPH_LEVEL_0:
return EDP_LINK_TRAIN_800MV_0DB_IVB;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_2 | DP_TRAIN_PRE_EMPH_LEVEL_1:
return EDP_LINK_TRAIN_800MV_3_5DB_IVB;
default:
DRM_DEBUG_KMS("Unsupported voltage swing/pre-emphasis level:"
"0x%x\n", signal_levels);
return EDP_LINK_TRAIN_500MV_0DB_IVB;
}
}
void
intel_dp_set_signal_levels(struct intel_dp *intel_dp)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
enum port port = intel_dig_port->port;
struct drm_device *dev = intel_dig_port->base.base.dev;
struct drm_i915_private *dev_priv = to_i915(dev);
uint32_t signal_levels, mask = 0;
uint8_t train_set = intel_dp->train_set[0];
if (HAS_DDI(dev_priv)) {
signal_levels = ddi_signal_levels(intel_dp);
if (IS_GEN9_LP(dev_priv) || IS_CANNONLAKE(dev_priv))
signal_levels = 0;
else
mask = DDI_BUF_EMP_MASK;
} else if (IS_CHERRYVIEW(dev_priv)) {
signal_levels = chv_signal_levels(intel_dp);
} else if (IS_VALLEYVIEW(dev_priv)) {
signal_levels = vlv_signal_levels(intel_dp);
} else if (IS_GEN7(dev_priv) && port == PORT_A) {
signal_levels = gen7_edp_signal_levels(train_set);
mask = EDP_LINK_TRAIN_VOL_EMP_MASK_IVB;
} else if (IS_GEN6(dev_priv) && port == PORT_A) {
signal_levels = gen6_edp_signal_levels(train_set);
mask = EDP_LINK_TRAIN_VOL_EMP_MASK_SNB;
} else {
signal_levels = gen4_signal_levels(train_set);
mask = DP_VOLTAGE_MASK | DP_PRE_EMPHASIS_MASK;
}
if (mask)
DRM_DEBUG_KMS("Using signal levels %08x\n", signal_levels);
DRM_DEBUG_KMS("Using vswing level %d\n",
train_set & DP_TRAIN_VOLTAGE_SWING_MASK);
DRM_DEBUG_KMS("Using pre-emphasis level %d\n",
(train_set & DP_TRAIN_PRE_EMPHASIS_MASK) >>
DP_TRAIN_PRE_EMPHASIS_SHIFT);
intel_dp->DP = (intel_dp->DP & ~mask) | signal_levels;
I915_WRITE(intel_dp->output_reg, intel_dp->DP);
POSTING_READ(intel_dp->output_reg);
}
void
intel_dp_program_link_training_pattern(struct intel_dp *intel_dp,
uint8_t dp_train_pat)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct drm_i915_private *dev_priv =
to_i915(intel_dig_port->base.base.dev);
_intel_dp_set_link_train(intel_dp, &intel_dp->DP, dp_train_pat);
I915_WRITE(intel_dp->output_reg, intel_dp->DP);
POSTING_READ(intel_dp->output_reg);
}
void intel_dp_set_idle_link_train(struct intel_dp *intel_dp)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct drm_device *dev = intel_dig_port->base.base.dev;
struct drm_i915_private *dev_priv = to_i915(dev);
enum port port = intel_dig_port->port;
uint32_t val;
if (!HAS_DDI(dev_priv))
return;
val = I915_READ(DP_TP_CTL(port));
val &= ~DP_TP_CTL_LINK_TRAIN_MASK;
val |= DP_TP_CTL_LINK_TRAIN_IDLE;
I915_WRITE(DP_TP_CTL(port), val);
/*
* On PORT_A we can have only eDP in SST mode. There the only reason
* we need to set idle transmission mode is to work around a HW issue
* where we enable the pipe while not in idle link-training mode.
* In this case there is requirement to wait for a minimum number of
* idle patterns to be sent.
*/
if (port == PORT_A)
return;
if (intel_wait_for_register(dev_priv,DP_TP_STATUS(port),
DP_TP_STATUS_IDLE_DONE,
DP_TP_STATUS_IDLE_DONE,
1))
DRM_ERROR("Timed out waiting for DP idle patterns\n");
}
static void
intel_dp_link_down(struct intel_dp *intel_dp)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct intel_crtc *crtc = to_intel_crtc(intel_dig_port->base.base.crtc);
enum port port = intel_dig_port->port;
struct drm_device *dev = intel_dig_port->base.base.dev;
struct drm_i915_private *dev_priv = to_i915(dev);
uint32_t DP = intel_dp->DP;
if (WARN_ON(HAS_DDI(dev_priv)))
return;
if (WARN_ON((I915_READ(intel_dp->output_reg) & DP_PORT_EN) == 0))
return;
DRM_DEBUG_KMS("\n");
if ((IS_GEN7(dev_priv) && port == PORT_A) ||
(HAS_PCH_CPT(dev_priv) && port != PORT_A)) {
DP &= ~DP_LINK_TRAIN_MASK_CPT;
DP |= DP_LINK_TRAIN_PAT_IDLE_CPT;
} else {
if (IS_CHERRYVIEW(dev_priv))
DP &= ~DP_LINK_TRAIN_MASK_CHV;
else
DP &= ~DP_LINK_TRAIN_MASK;
DP |= DP_LINK_TRAIN_PAT_IDLE;
}
I915_WRITE(intel_dp->output_reg, DP);
POSTING_READ(intel_dp->output_reg);
DP &= ~(DP_PORT_EN | DP_AUDIO_OUTPUT_ENABLE);
I915_WRITE(intel_dp->output_reg, DP);
POSTING_READ(intel_dp->output_reg);
/*
* HW workaround for IBX, we need to move the port
* to transcoder A after disabling it to allow the
* matching HDMI port to be enabled on transcoder A.
*/
if (HAS_PCH_IBX(dev_priv) && crtc->pipe == PIPE_B && port != PORT_A) {
/*
* We get CPU/PCH FIFO underruns on the other pipe when
* doing the workaround. Sweep them under the rug.
*/
intel_set_cpu_fifo_underrun_reporting(dev_priv, PIPE_A, false);
intel_set_pch_fifo_underrun_reporting(dev_priv, PIPE_A, false);
/* always enable with pattern 1 (as per spec) */
DP &= ~(DP_PIPEB_SELECT | DP_LINK_TRAIN_MASK);
DP |= DP_PORT_EN | DP_LINK_TRAIN_PAT_1;
I915_WRITE(intel_dp->output_reg, DP);
POSTING_READ(intel_dp->output_reg);
DP &= ~DP_PORT_EN;
I915_WRITE(intel_dp->output_reg, DP);
POSTING_READ(intel_dp->output_reg);
intel_wait_for_vblank_if_active(dev_priv, PIPE_A);
intel_set_cpu_fifo_underrun_reporting(dev_priv, PIPE_A, true);
intel_set_pch_fifo_underrun_reporting(dev_priv, PIPE_A, true);
}
msleep(intel_dp->panel_power_down_delay);
intel_dp->DP = DP;
if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
pps_lock(intel_dp);
intel_dp->active_pipe = INVALID_PIPE;
pps_unlock(intel_dp);
}
}
bool
intel_dp_read_dpcd(struct intel_dp *intel_dp)
{
if (drm_dp_dpcd_read(&intel_dp->aux, 0x000, intel_dp->dpcd,
sizeof(intel_dp->dpcd)) < 0)
return false; /* aux transfer failed */
DRM_DEBUG_KMS("DPCD: %*ph\n", (int) sizeof(intel_dp->dpcd), intel_dp->dpcd);
return intel_dp->dpcd[DP_DPCD_REV] != 0;
}
static bool
intel_edp_init_dpcd(struct intel_dp *intel_dp)
{
struct drm_i915_private *dev_priv =
to_i915(dp_to_dig_port(intel_dp)->base.base.dev);
/* this function is meant to be called only once */
WARN_ON(intel_dp->dpcd[DP_DPCD_REV] != 0);
if (!intel_dp_read_dpcd(intel_dp))
return false;
drm_dp_read_desc(&intel_dp->aux, &intel_dp->desc,
drm_dp_is_branch(intel_dp->dpcd));
if (intel_dp->dpcd[DP_DPCD_REV] >= 0x11)
dev_priv->no_aux_handshake = intel_dp->dpcd[DP_MAX_DOWNSPREAD] &
DP_NO_AUX_HANDSHAKE_LINK_TRAINING;
/* Check if the panel supports PSR */
drm_dp_dpcd_read(&intel_dp->aux, DP_PSR_SUPPORT,
intel_dp->psr_dpcd,
sizeof(intel_dp->psr_dpcd));
if (intel_dp->psr_dpcd[0] & DP_PSR_IS_SUPPORTED) {
dev_priv->psr.sink_support = true;
DRM_DEBUG_KMS("Detected EDP PSR Panel.\n");
}
if (INTEL_GEN(dev_priv) >= 9 &&
(intel_dp->psr_dpcd[0] & DP_PSR2_IS_SUPPORTED)) {
uint8_t frame_sync_cap;
dev_priv->psr.sink_support = true;
if (drm_dp_dpcd_readb(&intel_dp->aux,
DP_SINK_DEVICE_AUX_FRAME_SYNC_CAP,
&frame_sync_cap) != 1)
frame_sync_cap = 0;
dev_priv->psr.aux_frame_sync = frame_sync_cap ? true : false;
/* PSR2 needs frame sync as well */
dev_priv->psr.psr2_support = dev_priv->psr.aux_frame_sync;
DRM_DEBUG_KMS("PSR2 %s on sink",
dev_priv->psr.psr2_support ? "supported" : "not supported");
if (dev_priv->psr.psr2_support) {
dev_priv->psr.y_cord_support =
intel_dp_get_y_cord_status(intel_dp);
dev_priv->psr.colorimetry_support =
intel_dp_get_colorimetry_status(intel_dp);
dev_priv->psr.alpm =
intel_dp_get_alpm_status(intel_dp);
}
}
/* Read the eDP Display control capabilities registers */
if ((intel_dp->dpcd[DP_EDP_CONFIGURATION_CAP] & DP_DPCD_DISPLAY_CONTROL_CAPABLE) &&
drm_dp_dpcd_read(&intel_dp->aux, DP_EDP_DPCD_REV,
intel_dp->edp_dpcd, sizeof(intel_dp->edp_dpcd)) ==
sizeof(intel_dp->edp_dpcd))
DRM_DEBUG_KMS("EDP DPCD : %*ph\n", (int) sizeof(intel_dp->edp_dpcd),
intel_dp->edp_dpcd);
/* Intermediate frequency support */
if (intel_dp->edp_dpcd[0] >= 0x03) { /* eDp v1.4 or higher */
__le16 sink_rates[DP_MAX_SUPPORTED_RATES];
int i;
drm_dp_dpcd_read(&intel_dp->aux, DP_SUPPORTED_LINK_RATES,
sink_rates, sizeof(sink_rates));
for (i = 0; i < ARRAY_SIZE(sink_rates); i++) {
int val = le16_to_cpu(sink_rates[i]);
if (val == 0)
break;
/* Value read multiplied by 200kHz gives the per-lane
* link rate in kHz. The source rates are, however,
* stored in terms of LS_Clk kHz. The full conversion
* back to symbols is
* (val * 200kHz)*(8/10 ch. encoding)*(1/8 bit to Byte)
*/
intel_dp->sink_rates[i] = (val * 200) / 10;
}
intel_dp->num_sink_rates = i;
}
if (intel_dp->num_sink_rates)
intel_dp->use_rate_select = true;
else
intel_dp_set_sink_rates(intel_dp);
intel_dp_set_common_rates(intel_dp);
return true;
}
static bool
intel_dp_get_dpcd(struct intel_dp *intel_dp)
{
u8 sink_count;
if (!intel_dp_read_dpcd(intel_dp))
return false;
/* Don't clobber cached eDP rates. */
if (!is_edp(intel_dp)) {
intel_dp_set_sink_rates(intel_dp);
intel_dp_set_common_rates(intel_dp);
}
if (drm_dp_dpcd_readb(&intel_dp->aux, DP_SINK_COUNT, &sink_count) <= 0)
return false;
/*
* Sink count can change between short pulse hpd hence
* a member variable in intel_dp will track any changes
* between short pulse interrupts.
*/
intel_dp->sink_count = DP_GET_SINK_COUNT(sink_count);
/*
* SINK_COUNT == 0 and DOWNSTREAM_PORT_PRESENT == 1 implies that
* a dongle is present but no display. Unless we require to know
* if a dongle is present or not, we don't need to update
* downstream port information. So, an early return here saves
* time from performing other operations which are not required.
*/
if (!is_edp(intel_dp) && !intel_dp->sink_count)
return false;
if (!drm_dp_is_branch(intel_dp->dpcd))
return true; /* native DP sink */
if (intel_dp->dpcd[DP_DPCD_REV] == 0x10)
return true; /* no per-port downstream info */
if (drm_dp_dpcd_read(&intel_dp->aux, DP_DOWNSTREAM_PORT_0,
intel_dp->downstream_ports,
DP_MAX_DOWNSTREAM_PORTS) < 0)
return false; /* downstream port status fetch failed */
return true;
}
static bool
intel_dp_can_mst(struct intel_dp *intel_dp)
{
u8 mstm_cap;
if (!i915.enable_dp_mst)
return false;
if (!intel_dp->can_mst)
return false;
if (intel_dp->dpcd[DP_DPCD_REV] < 0x12)
return false;
if (drm_dp_dpcd_readb(&intel_dp->aux, DP_MSTM_CAP, &mstm_cap) != 1)
return false;
return mstm_cap & DP_MST_CAP;
}
static void
intel_dp_configure_mst(struct intel_dp *intel_dp)
{
if (!i915.enable_dp_mst)
return;
if (!intel_dp->can_mst)
return;
intel_dp->is_mst = intel_dp_can_mst(intel_dp);
if (intel_dp->is_mst)
DRM_DEBUG_KMS("Sink is MST capable\n");
else
DRM_DEBUG_KMS("Sink is not MST capable\n");
drm_dp_mst_topology_mgr_set_mst(&intel_dp->mst_mgr,
intel_dp->is_mst);
}
static int intel_dp_sink_crc_stop(struct intel_dp *intel_dp)
{
struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
struct drm_i915_private *dev_priv = to_i915(dig_port->base.base.dev);
struct intel_crtc *intel_crtc = to_intel_crtc(dig_port->base.base.crtc);
u8 buf;
int ret = 0;
int count = 0;
int attempts = 10;
if (drm_dp_dpcd_readb(&intel_dp->aux, DP_TEST_SINK, &buf) < 0) {
DRM_DEBUG_KMS("Sink CRC couldn't be stopped properly\n");
ret = -EIO;
goto out;
}
if (drm_dp_dpcd_writeb(&intel_dp->aux, DP_TEST_SINK,
buf & ~DP_TEST_SINK_START) < 0) {
DRM_DEBUG_KMS("Sink CRC couldn't be stopped properly\n");
ret = -EIO;
goto out;
}
do {
intel_wait_for_vblank(dev_priv, intel_crtc->pipe);
if (drm_dp_dpcd_readb(&intel_dp->aux,
DP_TEST_SINK_MISC, &buf) < 0) {
ret = -EIO;
goto out;
}
count = buf & DP_TEST_COUNT_MASK;
} while (--attempts && count);
if (attempts == 0) {
DRM_DEBUG_KMS("TIMEOUT: Sink CRC counter is not zeroed after calculation is stopped\n");
ret = -ETIMEDOUT;
}
out:
hsw_enable_ips(intel_crtc);
return ret;
}
static int intel_dp_sink_crc_start(struct intel_dp *intel_dp)
{
struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
struct drm_i915_private *dev_priv = to_i915(dig_port->base.base.dev);
struct intel_crtc *intel_crtc = to_intel_crtc(dig_port->base.base.crtc);
u8 buf;
int ret;
if (drm_dp_dpcd_readb(&intel_dp->aux, DP_TEST_SINK_MISC, &buf) < 0)
return -EIO;
if (!(buf & DP_TEST_CRC_SUPPORTED))
return -ENOTTY;
if (drm_dp_dpcd_readb(&intel_dp->aux, DP_TEST_SINK, &buf) < 0)
return -EIO;
if (buf & DP_TEST_SINK_START) {
ret = intel_dp_sink_crc_stop(intel_dp);
if (ret)
return ret;
}
hsw_disable_ips(intel_crtc);
if (drm_dp_dpcd_writeb(&intel_dp->aux, DP_TEST_SINK,
buf | DP_TEST_SINK_START) < 0) {
hsw_enable_ips(intel_crtc);
return -EIO;
}
intel_wait_for_vblank(dev_priv, intel_crtc->pipe);
return 0;
}
int intel_dp_sink_crc(struct intel_dp *intel_dp, u8 *crc)
{
struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
struct drm_i915_private *dev_priv = to_i915(dig_port->base.base.dev);
struct intel_crtc *intel_crtc = to_intel_crtc(dig_port->base.base.crtc);
u8 buf;
int count, ret;
int attempts = 6;
ret = intel_dp_sink_crc_start(intel_dp);
if (ret)
return ret;
do {
intel_wait_for_vblank(dev_priv, intel_crtc->pipe);
if (drm_dp_dpcd_readb(&intel_dp->aux,
DP_TEST_SINK_MISC, &buf) < 0) {
ret = -EIO;
goto stop;
}
count = buf & DP_TEST_COUNT_MASK;
} while (--attempts && count == 0);
if (attempts == 0) {
DRM_ERROR("Panel is unable to calculate any CRC after 6 vblanks\n");
ret = -ETIMEDOUT;
goto stop;
}
if (drm_dp_dpcd_read(&intel_dp->aux, DP_TEST_CRC_R_CR, crc, 6) < 0) {
ret = -EIO;
goto stop;
}
stop:
intel_dp_sink_crc_stop(intel_dp);
return ret;
}
static bool
intel_dp_get_sink_irq(struct intel_dp *intel_dp, u8 *sink_irq_vector)
{
return drm_dp_dpcd_readb(&intel_dp->aux, DP_DEVICE_SERVICE_IRQ_VECTOR,
sink_irq_vector) == 1;
}
static bool
intel_dp_get_sink_irq_esi(struct intel_dp *intel_dp, u8 *sink_irq_vector)
{
int ret;
ret = drm_dp_dpcd_read(&intel_dp->aux,
DP_SINK_COUNT_ESI,
sink_irq_vector, 14);
if (ret != 14)
return false;
return true;
}
static uint8_t intel_dp_autotest_link_training(struct intel_dp *intel_dp)
{
int status = 0;
int test_link_rate;
uint8_t test_lane_count, test_link_bw;
/* (DP CTS 1.2)
* 4.3.1.11
*/
/* Read the TEST_LANE_COUNT and TEST_LINK_RTAE fields (DP CTS 3.1.4) */
status = drm_dp_dpcd_readb(&intel_dp->aux, DP_TEST_LANE_COUNT,
&test_lane_count);
if (status <= 0) {
DRM_DEBUG_KMS("Lane count read failed\n");
return DP_TEST_NAK;
}
test_lane_count &= DP_MAX_LANE_COUNT_MASK;
status = drm_dp_dpcd_readb(&intel_dp->aux, DP_TEST_LINK_RATE,
&test_link_bw);
if (status <= 0) {
DRM_DEBUG_KMS("Link Rate read failed\n");
return DP_TEST_NAK;
}
test_link_rate = drm_dp_bw_code_to_link_rate(test_link_bw);
/* Validate the requested link rate and lane count */
if (!intel_dp_link_params_valid(intel_dp, test_link_rate,
test_lane_count))
return DP_TEST_NAK;
intel_dp->compliance.test_lane_count = test_lane_count;
intel_dp->compliance.test_link_rate = test_link_rate;
return DP_TEST_ACK;
}
static uint8_t intel_dp_autotest_video_pattern(struct intel_dp *intel_dp)
{
uint8_t test_pattern;
uint8_t test_misc;
__be16 h_width, v_height;
int status = 0;
/* Read the TEST_PATTERN (DP CTS 3.1.5) */
status = drm_dp_dpcd_readb(&intel_dp->aux, DP_TEST_PATTERN,
&test_pattern);
if (status <= 0) {
DRM_DEBUG_KMS("Test pattern read failed\n");
return DP_TEST_NAK;
}
if (test_pattern != DP_COLOR_RAMP)
return DP_TEST_NAK;
status = drm_dp_dpcd_read(&intel_dp->aux, DP_TEST_H_WIDTH_HI,
&h_width, 2);
if (status <= 0) {
DRM_DEBUG_KMS("H Width read failed\n");
return DP_TEST_NAK;
}
status = drm_dp_dpcd_read(&intel_dp->aux, DP_TEST_V_HEIGHT_HI,
&v_height, 2);
if (status <= 0) {
DRM_DEBUG_KMS("V Height read failed\n");
return DP_TEST_NAK;
}
status = drm_dp_dpcd_readb(&intel_dp->aux, DP_TEST_MISC0,
&test_misc);
if (status <= 0) {
DRM_DEBUG_KMS("TEST MISC read failed\n");
return DP_TEST_NAK;
}
if ((test_misc & DP_TEST_COLOR_FORMAT_MASK) != DP_COLOR_FORMAT_RGB)
return DP_TEST_NAK;
if (test_misc & DP_TEST_DYNAMIC_RANGE_CEA)
return DP_TEST_NAK;
switch (test_misc & DP_TEST_BIT_DEPTH_MASK) {
case DP_TEST_BIT_DEPTH_6:
intel_dp->compliance.test_data.bpc = 6;
break;
case DP_TEST_BIT_DEPTH_8:
intel_dp->compliance.test_data.bpc = 8;
break;
default:
return DP_TEST_NAK;
}
intel_dp->compliance.test_data.video_pattern = test_pattern;
intel_dp->compliance.test_data.hdisplay = be16_to_cpu(h_width);
intel_dp->compliance.test_data.vdisplay = be16_to_cpu(v_height);
/* Set test active flag here so userspace doesn't interrupt things */
intel_dp->compliance.test_active = 1;
return DP_TEST_ACK;
}
static uint8_t intel_dp_autotest_edid(struct intel_dp *intel_dp)
{
uint8_t test_result = DP_TEST_ACK;
struct intel_connector *intel_connector = intel_dp->attached_connector;
struct drm_connector *connector = &intel_connector->base;
if (intel_connector->detect_edid == NULL ||
connector->edid_corrupt ||
intel_dp->aux.i2c_defer_count > 6) {
/* Check EDID read for NACKs, DEFERs and corruption
* (DP CTS 1.2 Core r1.1)
* 4.2.2.4 : Failed EDID read, I2C_NAK
* 4.2.2.5 : Failed EDID read, I2C_DEFER
* 4.2.2.6 : EDID corruption detected
* Use failsafe mode for all cases
*/
if (intel_dp->aux.i2c_nack_count > 0 ||
intel_dp->aux.i2c_defer_count > 0)
DRM_DEBUG_KMS("EDID read had %d NACKs, %d DEFERs\n",
intel_dp->aux.i2c_nack_count,
intel_dp->aux.i2c_defer_count);
intel_dp->compliance.test_data.edid = INTEL_DP_RESOLUTION_FAILSAFE;
} else {
struct edid *block = intel_connector->detect_edid;
/* We have to write the checksum
* of the last block read
*/
block += intel_connector->detect_edid->extensions;
if (drm_dp_dpcd_writeb(&intel_dp->aux, DP_TEST_EDID_CHECKSUM,
block->checksum) <= 0)
DRM_DEBUG_KMS("Failed to write EDID checksum\n");
test_result = DP_TEST_ACK | DP_TEST_EDID_CHECKSUM_WRITE;
intel_dp->compliance.test_data.edid = INTEL_DP_RESOLUTION_PREFERRED;
}
/* Set test active flag here so userspace doesn't interrupt things */
intel_dp->compliance.test_active = 1;
return test_result;
}
static uint8_t intel_dp_autotest_phy_pattern(struct intel_dp *intel_dp)
{
uint8_t test_result = DP_TEST_NAK;
return test_result;
}
static void intel_dp_handle_test_request(struct intel_dp *intel_dp)
{
uint8_t response = DP_TEST_NAK;
uint8_t request = 0;
int status;
status = drm_dp_dpcd_readb(&intel_dp->aux, DP_TEST_REQUEST, &request);
if (status <= 0) {
DRM_DEBUG_KMS("Could not read test request from sink\n");
goto update_status;
}
switch (request) {
case DP_TEST_LINK_TRAINING:
DRM_DEBUG_KMS("LINK_TRAINING test requested\n");
response = intel_dp_autotest_link_training(intel_dp);
break;
case DP_TEST_LINK_VIDEO_PATTERN:
DRM_DEBUG_KMS("TEST_PATTERN test requested\n");
response = intel_dp_autotest_video_pattern(intel_dp);
break;
case DP_TEST_LINK_EDID_READ:
DRM_DEBUG_KMS("EDID test requested\n");
response = intel_dp_autotest_edid(intel_dp);
break;
case DP_TEST_LINK_PHY_TEST_PATTERN:
DRM_DEBUG_KMS("PHY_PATTERN test requested\n");
response = intel_dp_autotest_phy_pattern(intel_dp);
break;
default:
DRM_DEBUG_KMS("Invalid test request '%02x'\n", request);
break;
}
if (response & DP_TEST_ACK)
intel_dp->compliance.test_type = request;
update_status:
status = drm_dp_dpcd_writeb(&intel_dp->aux, DP_TEST_RESPONSE, response);
if (status <= 0)
DRM_DEBUG_KMS("Could not write test response to sink\n");
}
static int
intel_dp_check_mst_status(struct intel_dp *intel_dp)
{
bool bret;
if (intel_dp->is_mst) {
u8 esi[16] = { 0 };
int ret = 0;
int retry;
bool handled;
bret = intel_dp_get_sink_irq_esi(intel_dp, esi);
go_again:
if (bret == true) {
/* check link status - esi[10] = 0x200c */
if (intel_dp->active_mst_links &&
!drm_dp_channel_eq_ok(&esi[10], intel_dp->lane_count)) {
DRM_DEBUG_KMS("channel EQ not ok, retraining\n");
intel_dp_start_link_train(intel_dp);
intel_dp_stop_link_train(intel_dp);
}
DRM_DEBUG_KMS("got esi %3ph\n", esi);
ret = drm_dp_mst_hpd_irq(&intel_dp->mst_mgr, esi, &handled);
if (handled) {
for (retry = 0; retry < 3; retry++) {
int wret;
wret = drm_dp_dpcd_write(&intel_dp->aux,
DP_SINK_COUNT_ESI+1,
&esi[1], 3);
if (wret == 3) {
break;
}
}
bret = intel_dp_get_sink_irq_esi(intel_dp, esi);
if (bret == true) {
DRM_DEBUG_KMS("got esi2 %3ph\n", esi);
goto go_again;
}
} else
ret = 0;
return ret;
} else {
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
DRM_DEBUG_KMS("failed to get ESI - device may have failed\n");
intel_dp->is_mst = false;
drm_dp_mst_topology_mgr_set_mst(&intel_dp->mst_mgr, intel_dp->is_mst);
/* send a hotplug event */
drm_kms_helper_hotplug_event(intel_dig_port->base.base.dev);
}
}
return -EINVAL;
}
static void
intel_dp_retrain_link(struct intel_dp *intel_dp)
{
struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base;
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc);
/* Suppress underruns caused by re-training */
intel_set_cpu_fifo_underrun_reporting(dev_priv, crtc->pipe, false);
if (crtc->config->has_pch_encoder)
intel_set_pch_fifo_underrun_reporting(dev_priv,
intel_crtc_pch_transcoder(crtc), false);
intel_dp_start_link_train(intel_dp);
intel_dp_stop_link_train(intel_dp);
/* Keep underrun reporting disabled until things are stable */
intel_wait_for_vblank(dev_priv, crtc->pipe);
intel_set_cpu_fifo_underrun_reporting(dev_priv, crtc->pipe, true);
if (crtc->config->has_pch_encoder)
intel_set_pch_fifo_underrun_reporting(dev_priv,
intel_crtc_pch_transcoder(crtc), true);
}
static void
intel_dp_check_link_status(struct intel_dp *intel_dp)
{
struct intel_encoder *intel_encoder = &dp_to_dig_port(intel_dp)->base;
struct drm_device *dev = intel_dp_to_dev(intel_dp);
u8 link_status[DP_LINK_STATUS_SIZE];
WARN_ON(!drm_modeset_is_locked(&dev->mode_config.connection_mutex));
if (!intel_dp_get_link_status(intel_dp, link_status)) {
DRM_ERROR("Failed to get link status\n");
return;
}
if (!intel_encoder->base.crtc)
return;
if (!to_intel_crtc(intel_encoder->base.crtc)->active)
return;
/*
* Validate the cached values of intel_dp->link_rate and
* intel_dp->lane_count before attempting to retrain.
*/
if (!intel_dp_link_params_valid(intel_dp, intel_dp->link_rate,
intel_dp->lane_count))
return;
/* Retrain if Channel EQ or CR not ok */
if (!drm_dp_channel_eq_ok(link_status, intel_dp->lane_count)) {
DRM_DEBUG_KMS("%s: channel EQ not ok, retraining\n",
intel_encoder->base.name);
intel_dp_retrain_link(intel_dp);
}
}
/*
* According to DP spec
* 5.1.2:
* 1. Read DPCD
* 2. Configure link according to Receiver Capabilities
* 3. Use Link Training from 2.5.3.3 and 3.5.1.3
* 4. Check link status on receipt of hot-plug interrupt
*
* intel_dp_short_pulse - handles short pulse interrupts
* when full detection is not required.
* Returns %true if short pulse is handled and full detection
* is NOT required and %false otherwise.
*/
static bool
intel_dp_short_pulse(struct intel_dp *intel_dp)
{
struct drm_device *dev = intel_dp_to_dev(intel_dp);
struct intel_encoder *intel_encoder = &dp_to_dig_port(intel_dp)->base;
u8 sink_irq_vector = 0;
u8 old_sink_count = intel_dp->sink_count;
bool ret;
/*
* Clearing compliance test variables to allow capturing
* of values for next automated test request.
*/
memset(&intel_dp->compliance, 0, sizeof(intel_dp->compliance));
/*
* Now read the DPCD to see if it's actually running
* If the current value of sink count doesn't match with
* the value that was stored earlier or dpcd read failed
* we need to do full detection
*/
ret = intel_dp_get_dpcd(intel_dp);
if ((old_sink_count != intel_dp->sink_count) || !ret) {
/* No need to proceed if we are going to do full detect */
return false;
}
/* Try to read the source of the interrupt */
if (intel_dp->dpcd[DP_DPCD_REV] >= 0x11 &&
intel_dp_get_sink_irq(intel_dp, &sink_irq_vector) &&
sink_irq_vector != 0) {
/* Clear interrupt source */
drm_dp_dpcd_writeb(&intel_dp->aux,
DP_DEVICE_SERVICE_IRQ_VECTOR,
sink_irq_vector);
if (sink_irq_vector & DP_AUTOMATED_TEST_REQUEST)
intel_dp_handle_test_request(intel_dp);
if (sink_irq_vector & (DP_CP_IRQ | DP_SINK_SPECIFIC_IRQ))
DRM_DEBUG_DRIVER("CP or sink specific irq unhandled\n");
}
drm_modeset_lock(&dev->mode_config.connection_mutex, NULL);
intel_dp_check_link_status(intel_dp);
drm_modeset_unlock(&dev->mode_config.connection_mutex);
if (intel_dp->compliance.test_type == DP_TEST_LINK_TRAINING) {
DRM_DEBUG_KMS("Link Training Compliance Test requested\n");
/* Send a Hotplug Uevent to userspace to start modeset */
drm_kms_helper_hotplug_event(intel_encoder->base.dev);
}
return true;
}
/* XXX this is probably wrong for multiple downstream ports */
static enum drm_connector_status
intel_dp_detect_dpcd(struct intel_dp *intel_dp)
{
struct intel_lspcon *lspcon = dp_to_lspcon(intel_dp);
uint8_t *dpcd = intel_dp->dpcd;
uint8_t type;
if (lspcon->active)
lspcon_resume(lspcon);
if (!intel_dp_get_dpcd(intel_dp))
return connector_status_disconnected;
if (is_edp(intel_dp))
return connector_status_connected;
/* if there's no downstream port, we're done */
if (!drm_dp_is_branch(dpcd))
return connector_status_connected;
/* If we're HPD-aware, SINK_COUNT changes dynamically */
if (intel_dp->dpcd[DP_DPCD_REV] >= 0x11 &&
intel_dp->downstream_ports[0] & DP_DS_PORT_HPD) {
return intel_dp->sink_count ?
connector_status_connected : connector_status_disconnected;
}
if (intel_dp_can_mst(intel_dp))
return connector_status_connected;
/* If no HPD, poke DDC gently */
if (drm_probe_ddc(&intel_dp->aux.ddc))
return connector_status_connected;
/* Well we tried, say unknown for unreliable port types */
if (intel_dp->dpcd[DP_DPCD_REV] >= 0x11) {
type = intel_dp->downstream_ports[0] & DP_DS_PORT_TYPE_MASK;
if (type == DP_DS_PORT_TYPE_VGA ||
type == DP_DS_PORT_TYPE_NON_EDID)
return connector_status_unknown;
} else {
type = intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT] &
DP_DWN_STRM_PORT_TYPE_MASK;
if (type == DP_DWN_STRM_PORT_TYPE_ANALOG ||
type == DP_DWN_STRM_PORT_TYPE_OTHER)
return connector_status_unknown;
}
/* Anything else is out of spec, warn and ignore */
DRM_DEBUG_KMS("Broken DP branch device, ignoring\n");
return connector_status_disconnected;
}
static enum drm_connector_status
edp_detect(struct intel_dp *intel_dp)
{
struct drm_device *dev = intel_dp_to_dev(intel_dp);
struct drm_i915_private *dev_priv = to_i915(dev);
enum drm_connector_status status;
status = intel_panel_detect(dev_priv);
if (status == connector_status_unknown)
status = connector_status_connected;
return status;
}
static bool ibx_digital_port_connected(struct drm_i915_private *dev_priv,
struct intel_digital_port *port)
{
u32 bit;
switch (port->port) {
case PORT_B:
bit = SDE_PORTB_HOTPLUG;
break;
case PORT_C:
bit = SDE_PORTC_HOTPLUG;
break;
case PORT_D:
bit = SDE_PORTD_HOTPLUG;
break;
default:
MISSING_CASE(port->port);
return false;
}
return I915_READ(SDEISR) & bit;
}
static bool cpt_digital_port_connected(struct drm_i915_private *dev_priv,
struct intel_digital_port *port)
{
u32 bit;
switch (port->port) {
case PORT_B:
bit = SDE_PORTB_HOTPLUG_CPT;
break;
case PORT_C:
bit = SDE_PORTC_HOTPLUG_CPT;
break;
case PORT_D:
bit = SDE_PORTD_HOTPLUG_CPT;
break;
default:
MISSING_CASE(port->port);
return false;
}
return I915_READ(SDEISR) & bit;
}
static bool spt_digital_port_connected(struct drm_i915_private *dev_priv,
struct intel_digital_port *port)
{
u32 bit;
switch (port->port) {
case PORT_A:
bit = SDE_PORTA_HOTPLUG_SPT;
break;
case PORT_E:
bit = SDE_PORTE_HOTPLUG_SPT;
break;
default:
return cpt_digital_port_connected(dev_priv, port);
}
return I915_READ(SDEISR) & bit;
}
static bool g4x_digital_port_connected(struct drm_i915_private *dev_priv,
struct intel_digital_port *port)
{
u32 bit;
switch (port->port) {
case PORT_B:
bit = PORTB_HOTPLUG_LIVE_STATUS_G4X;
break;
case PORT_C:
bit = PORTC_HOTPLUG_LIVE_STATUS_G4X;
break;
case PORT_D:
bit = PORTD_HOTPLUG_LIVE_STATUS_G4X;
break;
default:
MISSING_CASE(port->port);
return false;
}
return I915_READ(PORT_HOTPLUG_STAT) & bit;
}
static bool gm45_digital_port_connected(struct drm_i915_private *dev_priv,
struct intel_digital_port *port)
{
u32 bit;
switch (port->port) {
case PORT_B:
bit = PORTB_HOTPLUG_LIVE_STATUS_GM45;
break;
case PORT_C:
bit = PORTC_HOTPLUG_LIVE_STATUS_GM45;
break;
case PORT_D:
bit = PORTD_HOTPLUG_LIVE_STATUS_GM45;
break;
default:
MISSING_CASE(port->port);
return false;
}
return I915_READ(PORT_HOTPLUG_STAT) & bit;
}
static bool ilk_digital_port_connected(struct drm_i915_private *dev_priv,
struct intel_digital_port *port)
{
if (port->port == PORT_A)
return I915_READ(DEISR) & DE_DP_A_HOTPLUG;
else
return ibx_digital_port_connected(dev_priv, port);
}
static bool snb_digital_port_connected(struct drm_i915_private *dev_priv,
struct intel_digital_port *port)
{
if (port->port == PORT_A)
return I915_READ(DEISR) & DE_DP_A_HOTPLUG;
else
return cpt_digital_port_connected(dev_priv, port);
}
static bool ivb_digital_port_connected(struct drm_i915_private *dev_priv,
struct intel_digital_port *port)
{
if (port->port == PORT_A)
return I915_READ(DEISR) & DE_DP_A_HOTPLUG_IVB;
else
return cpt_digital_port_connected(dev_priv, port);
}
static bool bdw_digital_port_connected(struct drm_i915_private *dev_priv,
struct intel_digital_port *port)
{
if (port->port == PORT_A)
return I915_READ(GEN8_DE_PORT_ISR) & GEN8_PORT_DP_A_HOTPLUG;
else
return cpt_digital_port_connected(dev_priv, port);
}
static bool bxt_digital_port_connected(struct drm_i915_private *dev_priv,
struct intel_digital_port *intel_dig_port)
{
struct intel_encoder *intel_encoder = &intel_dig_port->base;
enum port port;
u32 bit;
port = intel_hpd_pin_to_port(intel_encoder->hpd_pin);
switch (port) {
case PORT_A:
bit = BXT_DE_PORT_HP_DDIA;
break;
case PORT_B:
bit = BXT_DE_PORT_HP_DDIB;
break;
case PORT_C:
bit = BXT_DE_PORT_HP_DDIC;
break;
default:
MISSING_CASE(port);
return false;
}
return I915_READ(GEN8_DE_PORT_ISR) & bit;
}
/*
* intel_digital_port_connected - is the specified port connected?
* @dev_priv: i915 private structure
* @port: the port to test
*
* Return %true if @port is connected, %false otherwise.
*/
bool intel_digital_port_connected(struct drm_i915_private *dev_priv,
struct intel_digital_port *port)
{
if (HAS_GMCH_DISPLAY(dev_priv)) {
if (IS_GM45(dev_priv))
return gm45_digital_port_connected(dev_priv, port);
else
return g4x_digital_port_connected(dev_priv, port);
}
if (IS_GEN5(dev_priv))
return ilk_digital_port_connected(dev_priv, port);
else if (IS_GEN6(dev_priv))
return snb_digital_port_connected(dev_priv, port);
else if (IS_GEN7(dev_priv))
return ivb_digital_port_connected(dev_priv, port);
else if (IS_GEN8(dev_priv))
return bdw_digital_port_connected(dev_priv, port);
else if (IS_GEN9_LP(dev_priv))
return bxt_digital_port_connected(dev_priv, port);
else
return spt_digital_port_connected(dev_priv, port);
}
static struct edid *
intel_dp_get_edid(struct intel_dp *intel_dp)
{
struct intel_connector *intel_connector = intel_dp->attached_connector;
/* use cached edid if we have one */
if (intel_connector->edid) {
/* invalid edid */
if (IS_ERR(intel_connector->edid))
return NULL;
return drm_edid_duplicate(intel_connector->edid);
} else
return drm_get_edid(&intel_connector->base,
&intel_dp->aux.ddc);
}
static void
intel_dp_set_edid(struct intel_dp *intel_dp)
{
struct intel_connector *intel_connector = intel_dp->attached_connector;
struct edid *edid;
intel_dp_unset_edid(intel_dp);
edid = intel_dp_get_edid(intel_dp);
intel_connector->detect_edid = edid;
intel_dp->has_audio = drm_detect_monitor_audio(edid);
}
static void
intel_dp_unset_edid(struct intel_dp *intel_dp)
{
struct intel_connector *intel_connector = intel_dp->attached_connector;
kfree(intel_connector->detect_edid);
intel_connector->detect_edid = NULL;
intel_dp->has_audio = false;
}
static int
intel_dp_long_pulse(struct intel_connector *intel_connector)
{
struct drm_connector *connector = &intel_connector->base;
struct intel_dp *intel_dp = intel_attached_dp(connector);
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct intel_encoder *intel_encoder = &intel_dig_port->base;
struct drm_device *dev = connector->dev;
enum drm_connector_status status;
u8 sink_irq_vector = 0;
WARN_ON(!drm_modeset_is_locked(&connector->dev->mode_config.connection_mutex));
intel_display_power_get(to_i915(dev), intel_dp->aux_power_domain);
/* Can't disconnect eDP, but you can close the lid... */
if (is_edp(intel_dp))
status = edp_detect(intel_dp);
else if (intel_digital_port_connected(to_i915(dev),
dp_to_dig_port(intel_dp)))
status = intel_dp_detect_dpcd(intel_dp);
else
status = connector_status_disconnected;
if (status == connector_status_disconnected) {
memset(&intel_dp->compliance, 0, sizeof(intel_dp->compliance));
if (intel_dp->is_mst) {
DRM_DEBUG_KMS("MST device may have disappeared %d vs %d\n",
intel_dp->is_mst,
intel_dp->mst_mgr.mst_state);
intel_dp->is_mst = false;
drm_dp_mst_topology_mgr_set_mst(&intel_dp->mst_mgr,
intel_dp->is_mst);
}
goto out;
}
if (intel_encoder->type != INTEL_OUTPUT_EDP)
intel_encoder->type = INTEL_OUTPUT_DP;
DRM_DEBUG_KMS("Display Port TPS3 support: source %s, sink %s\n",
yesno(intel_dp_source_supports_hbr2(intel_dp)),
yesno(drm_dp_tps3_supported(intel_dp->dpcd)));
if (intel_dp->reset_link_params) {
/* Initial max link lane count */
intel_dp->max_link_lane_count = intel_dp_max_common_lane_count(intel_dp);
/* Initial max link rate */
intel_dp->max_link_rate = intel_dp_max_common_rate(intel_dp);
intel_dp->reset_link_params = false;
}
intel_dp_print_rates(intel_dp);
drm_dp_read_desc(&intel_dp->aux, &intel_dp->desc,
drm_dp_is_branch(intel_dp->dpcd));
intel_dp_configure_mst(intel_dp);
if (intel_dp->is_mst) {
/*
* If we are in MST mode then this connector
* won't appear connected or have anything
* with EDID on it
*/
status = connector_status_disconnected;
goto out;
} else {
/*
* If display is now connected check links status,
* there has been known issues of link loss triggerring
* long pulse.
*
* Some sinks (eg. ASUS PB287Q) seem to perform some
* weird HPD ping pong during modesets. So we can apparently
* end up with HPD going low during a modeset, and then
* going back up soon after. And once that happens we must
* retrain the link to get a picture. That's in case no
* userspace component reacted to intermittent HPD dip.
*/
intel_dp_check_link_status(intel_dp);
}
/*
* Clearing NACK and defer counts to get their exact values
* while reading EDID which are required by Compliance tests
* 4.2.2.4 and 4.2.2.5
*/
intel_dp->aux.i2c_nack_count = 0;
intel_dp->aux.i2c_defer_count = 0;
intel_dp_set_edid(intel_dp);
if (is_edp(intel_dp) || intel_connector->detect_edid)
status = connector_status_connected;
intel_dp->detect_done = true;
/* Try to read the source of the interrupt */
if (intel_dp->dpcd[DP_DPCD_REV] >= 0x11 &&
intel_dp_get_sink_irq(intel_dp, &sink_irq_vector) &&
sink_irq_vector != 0) {
/* Clear interrupt source */
drm_dp_dpcd_writeb(&intel_dp->aux,
DP_DEVICE_SERVICE_IRQ_VECTOR,
sink_irq_vector);
if (sink_irq_vector & DP_AUTOMATED_TEST_REQUEST)
intel_dp_handle_test_request(intel_dp);
if (sink_irq_vector & (DP_CP_IRQ | DP_SINK_SPECIFIC_IRQ))
DRM_DEBUG_DRIVER("CP or sink specific irq unhandled\n");
}
out:
if (status != connector_status_connected && !intel_dp->is_mst)
intel_dp_unset_edid(intel_dp);
intel_display_power_put(to_i915(dev), intel_dp->aux_power_domain);
return status;
}
static int
intel_dp_detect(struct drm_connector *connector,
struct drm_modeset_acquire_ctx *ctx,
bool force)
{
struct intel_dp *intel_dp = intel_attached_dp(connector);
int status = connector->status;
DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
connector->base.id, connector->name);
/* If full detect is not performed yet, do a full detect */
if (!intel_dp->detect_done)
status = intel_dp_long_pulse(intel_dp->attached_connector);
intel_dp->detect_done = false;
return status;
}
static void
intel_dp_force(struct drm_connector *connector)
{
struct intel_dp *intel_dp = intel_attached_dp(connector);
struct intel_encoder *intel_encoder = &dp_to_dig_port(intel_dp)->base;
struct drm_i915_private *dev_priv = to_i915(intel_encoder->base.dev);
DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
connector->base.id, connector->name);
intel_dp_unset_edid(intel_dp);
if (connector->status != connector_status_connected)
return;
intel_display_power_get(dev_priv, intel_dp->aux_power_domain);
intel_dp_set_edid(intel_dp);
intel_display_power_put(dev_priv, intel_dp->aux_power_domain);
if (intel_encoder->type != INTEL_OUTPUT_EDP)
intel_encoder->type = INTEL_OUTPUT_DP;
}
static int intel_dp_get_modes(struct drm_connector *connector)
{
struct intel_connector *intel_connector = to_intel_connector(connector);
struct edid *edid;
edid = intel_connector->detect_edid;
if (edid) {
int ret = intel_connector_update_modes(connector, edid);
if (ret)
return ret;
}
/* if eDP has no EDID, fall back to fixed mode */
if (is_edp(intel_attached_dp(connector)) &&
intel_connector->panel.fixed_mode) {
struct drm_display_mode *mode;
mode = drm_mode_duplicate(connector->dev,
intel_connector->panel.fixed_mode);
if (mode) {
drm_mode_probed_add(connector, mode);
return 1;
}
}
return 0;
}
static int
intel_dp_connector_register(struct drm_connector *connector)
{
struct intel_dp *intel_dp = intel_attached_dp(connector);
int ret;
ret = intel_connector_register(connector);
if (ret)
return ret;
i915_debugfs_connector_add(connector);
DRM_DEBUG_KMS("registering %s bus for %s\n",
intel_dp->aux.name, connector->kdev->kobj.name);
intel_dp->aux.dev = connector->kdev;
return drm_dp_aux_register(&intel_dp->aux);
}
static void
intel_dp_connector_unregister(struct drm_connector *connector)
{
drm_dp_aux_unregister(&intel_attached_dp(connector)->aux);
intel_connector_unregister(connector);
}
static void
intel_dp_connector_destroy(struct drm_connector *connector)
{
struct intel_connector *intel_connector = to_intel_connector(connector);
kfree(intel_connector->detect_edid);
if (!IS_ERR_OR_NULL(intel_connector->edid))
kfree(intel_connector->edid);
/* Can't call is_edp() since the encoder may have been destroyed
* already. */
if (connector->connector_type == DRM_MODE_CONNECTOR_eDP)
intel_panel_fini(&intel_connector->panel);
drm_connector_cleanup(connector);
kfree(connector);
}
void intel_dp_encoder_destroy(struct drm_encoder *encoder)
{
struct intel_digital_port *intel_dig_port = enc_to_dig_port(encoder);
struct intel_dp *intel_dp = &intel_dig_port->dp;
intel_dp_mst_encoder_cleanup(intel_dig_port);
if (is_edp(intel_dp)) {
cancel_delayed_work_sync(&intel_dp->panel_vdd_work);
/*
* vdd might still be enabled do to the delayed vdd off.
* Make sure vdd is actually turned off here.
*/
pps_lock(intel_dp);
edp_panel_vdd_off_sync(intel_dp);
pps_unlock(intel_dp);
if (intel_dp->edp_notifier.notifier_call) {
unregister_reboot_notifier(&intel_dp->edp_notifier);
intel_dp->edp_notifier.notifier_call = NULL;
}
}
intel_dp_aux_fini(intel_dp);
drm_encoder_cleanup(encoder);
kfree(intel_dig_port);
}
void intel_dp_encoder_suspend(struct intel_encoder *intel_encoder)
{
struct intel_dp *intel_dp = enc_to_intel_dp(&intel_encoder->base);
if (!is_edp(intel_dp))
return;
/*
* vdd might still be enabled do to the delayed vdd off.
* Make sure vdd is actually turned off here.
*/
cancel_delayed_work_sync(&intel_dp->panel_vdd_work);
pps_lock(intel_dp);
edp_panel_vdd_off_sync(intel_dp);
pps_unlock(intel_dp);
}
static void intel_edp_panel_vdd_sanitize(struct intel_dp *intel_dp)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct drm_device *dev = intel_dig_port->base.base.dev;
struct drm_i915_private *dev_priv = to_i915(dev);
lockdep_assert_held(&dev_priv->pps_mutex);
if (!edp_have_panel_vdd(intel_dp))
return;
/*
* The VDD bit needs a power domain reference, so if the bit is
* already enabled when we boot or resume, grab this reference and
* schedule a vdd off, so we don't hold on to the reference
* indefinitely.
*/
DRM_DEBUG_KMS("VDD left on by BIOS, adjusting state tracking\n");
intel_display_power_get(dev_priv, intel_dp->aux_power_domain);
edp_panel_vdd_schedule_off(intel_dp);
}
static enum pipe vlv_active_pipe(struct intel_dp *intel_dp)
{
struct drm_i915_private *dev_priv = to_i915(intel_dp_to_dev(intel_dp));
if ((intel_dp->DP & DP_PORT_EN) == 0)
return INVALID_PIPE;
if (IS_CHERRYVIEW(dev_priv))
return DP_PORT_TO_PIPE_CHV(intel_dp->DP);
else
return PORT_TO_PIPE(intel_dp->DP);
}
void intel_dp_encoder_reset(struct drm_encoder *encoder)
{
struct drm_i915_private *dev_priv = to_i915(encoder->dev);
struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
struct intel_lspcon *lspcon = dp_to_lspcon(intel_dp);
if (!HAS_DDI(dev_priv))
intel_dp->DP = I915_READ(intel_dp->output_reg);
if (lspcon->active)
lspcon_resume(lspcon);
intel_dp->reset_link_params = true;
pps_lock(intel_dp);
if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
intel_dp->active_pipe = vlv_active_pipe(intel_dp);
if (is_edp(intel_dp)) {
/* Reinit the power sequencer, in case BIOS did something with it. */
intel_dp_pps_init(encoder->dev, intel_dp);
intel_edp_panel_vdd_sanitize(intel_dp);
}
pps_unlock(intel_dp);
}
static const struct drm_connector_funcs intel_dp_connector_funcs = {
.force = intel_dp_force,
.fill_modes = drm_helper_probe_single_connector_modes,
.atomic_get_property = intel_digital_connector_atomic_get_property,
.atomic_set_property = intel_digital_connector_atomic_set_property,
.late_register = intel_dp_connector_register,
.early_unregister = intel_dp_connector_unregister,
.destroy = intel_dp_connector_destroy,
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
.atomic_duplicate_state = intel_digital_connector_duplicate_state,
};
static const struct drm_connector_helper_funcs intel_dp_connector_helper_funcs = {
.detect_ctx = intel_dp_detect,
.get_modes = intel_dp_get_modes,
.mode_valid = intel_dp_mode_valid,
.atomic_check = intel_digital_connector_atomic_check,
};
static const struct drm_encoder_funcs intel_dp_enc_funcs = {
.reset = intel_dp_encoder_reset,
.destroy = intel_dp_encoder_destroy,
};
enum irqreturn
intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)
{
struct intel_dp *intel_dp = &intel_dig_port->dp;
struct drm_device *dev = intel_dig_port->base.base.dev;
struct drm_i915_private *dev_priv = to_i915(dev);
enum irqreturn ret = IRQ_NONE;
if (intel_dig_port->base.type != INTEL_OUTPUT_EDP &&
intel_dig_port->base.type != INTEL_OUTPUT_HDMI)
intel_dig_port->base.type = INTEL_OUTPUT_DP;
if (long_hpd && intel_dig_port->base.type == INTEL_OUTPUT_EDP) {
/*
* vdd off can generate a long pulse on eDP which
* would require vdd on to handle it, and thus we
* would end up in an endless cycle of
* "vdd off -> long hpd -> vdd on -> detect -> vdd off -> ..."
*/
DRM_DEBUG_KMS("ignoring long hpd on eDP port %c\n",
port_name(intel_dig_port->port));
return IRQ_HANDLED;
}
DRM_DEBUG_KMS("got hpd irq on port %c - %s\n",
port_name(intel_dig_port->port),
long_hpd ? "long" : "short");
if (long_hpd) {
intel_dp->reset_link_params = true;
intel_dp->detect_done = false;
return IRQ_NONE;
}
intel_display_power_get(dev_priv, intel_dp->aux_power_domain);
if (intel_dp->is_mst) {
if (intel_dp_check_mst_status(intel_dp) == -EINVAL) {
/*
* If we were in MST mode, and device is not
* there, get out of MST mode
*/
DRM_DEBUG_KMS("MST device may have disappeared %d vs %d\n",
intel_dp->is_mst, intel_dp->mst_mgr.mst_state);
intel_dp->is_mst = false;
drm_dp_mst_topology_mgr_set_mst(&intel_dp->mst_mgr,
intel_dp->is_mst);
intel_dp->detect_done = false;
goto put_power;
}
}
if (!intel_dp->is_mst) {
if (!intel_dp_short_pulse(intel_dp)) {
intel_dp->detect_done = false;
goto put_power;
}
}
ret = IRQ_HANDLED;
put_power:
intel_display_power_put(dev_priv, intel_dp->aux_power_domain);
return ret;
}
/* check the VBT to see whether the eDP is on another port */
bool intel_dp_is_edp(struct drm_i915_private *dev_priv, enum port port)
{
/*
* eDP not supported on g4x. so bail out early just
* for a bit extra safety in case the VBT is bonkers.
*/
if (INTEL_GEN(dev_priv) < 5)
return false;
if (INTEL_GEN(dev_priv) < 9 && port == PORT_A)
return true;
return intel_bios_is_port_edp(dev_priv, port);
}
static void
intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *connector)
{
struct drm_i915_private *dev_priv = to_i915(connector->dev);
intel_attach_force_audio_property(connector);
intel_attach_broadcast_rgb_property(connector);
if (is_edp(intel_dp)) {
u32 allowed_scalers;
allowed_scalers = BIT(DRM_MODE_SCALE_ASPECT) | BIT(DRM_MODE_SCALE_FULLSCREEN);
if (!HAS_GMCH_DISPLAY(dev_priv))
allowed_scalers |= BIT(DRM_MODE_SCALE_CENTER);
drm_connector_attach_scaling_mode_property(connector, allowed_scalers);
connector->state->scaling_mode = DRM_MODE_SCALE_ASPECT;
}
}
static void intel_dp_init_panel_power_timestamps(struct intel_dp *intel_dp)
{
intel_dp->panel_power_off_time = ktime_get_boottime();
intel_dp->last_power_on = jiffies;
intel_dp->last_backlight_off = jiffies;
}
static void
intel_pps_readout_hw_state(struct drm_i915_private *dev_priv,
struct intel_dp *intel_dp, struct edp_power_seq *seq)
{
u32 pp_on, pp_off, pp_div = 0, pp_ctl = 0;
struct pps_registers regs;
intel_pps_get_registers(dev_priv, intel_dp, ®s);
/* Workaround: Need to write PP_CONTROL with the unlock key as
* the very first thing. */
pp_ctl = ironlake_get_pp_control(intel_dp);
pp_on = I915_READ(regs.pp_on);
pp_off = I915_READ(regs.pp_off);
if (!IS_GEN9_LP(dev_priv) && !HAS_PCH_CNP(dev_priv)) {
I915_WRITE(regs.pp_ctrl, pp_ctl);
pp_div = I915_READ(regs.pp_div);
}
/* Pull timing values out of registers */
seq->t1_t3 = (pp_on & PANEL_POWER_UP_DELAY_MASK) >>
PANEL_POWER_UP_DELAY_SHIFT;
seq->t8 = (pp_on & PANEL_LIGHT_ON_DELAY_MASK) >>
PANEL_LIGHT_ON_DELAY_SHIFT;
seq->t9 = (pp_off & PANEL_LIGHT_OFF_DELAY_MASK) >>
PANEL_LIGHT_OFF_DELAY_SHIFT;
seq->t10 = (pp_off & PANEL_POWER_DOWN_DELAY_MASK) >>
PANEL_POWER_DOWN_DELAY_SHIFT;
if (IS_GEN9_LP(dev_priv) || HAS_PCH_CNP(dev_priv)) {
seq->t11_t12 = ((pp_ctl & BXT_POWER_CYCLE_DELAY_MASK) >>
BXT_POWER_CYCLE_DELAY_SHIFT) * 1000;
} else {
seq->t11_t12 = ((pp_div & PANEL_POWER_CYCLE_DELAY_MASK) >>
PANEL_POWER_CYCLE_DELAY_SHIFT) * 1000;
}
}
static void
intel_pps_dump_state(const char *state_name, const struct edp_power_seq *seq)
{
DRM_DEBUG_KMS("%s t1_t3 %d t8 %d t9 %d t10 %d t11_t12 %d\n",
state_name,
seq->t1_t3, seq->t8, seq->t9, seq->t10, seq->t11_t12);
}
static void
intel_pps_verify_state(struct drm_i915_private *dev_priv,
struct intel_dp *intel_dp)
{
struct edp_power_seq hw;
struct edp_power_seq *sw = &intel_dp->pps_delays;
intel_pps_readout_hw_state(dev_priv, intel_dp, &hw);
if (hw.t1_t3 != sw->t1_t3 || hw.t8 != sw->t8 || hw.t9 != sw->t9 ||
hw.t10 != sw->t10 || hw.t11_t12 != sw->t11_t12) {
DRM_ERROR("PPS state mismatch\n");
intel_pps_dump_state("sw", sw);
intel_pps_dump_state("hw", &hw);
}
}
static void
intel_dp_init_panel_power_sequencer(struct drm_device *dev,
struct intel_dp *intel_dp)
{
struct drm_i915_private *dev_priv = to_i915(dev);
struct edp_power_seq cur, vbt, spec,
*final = &intel_dp->pps_delays;
lockdep_assert_held(&dev_priv->pps_mutex);
/* already initialized? */
if (final->t11_t12 != 0)
return;
intel_pps_readout_hw_state(dev_priv, intel_dp, &cur);
intel_pps_dump_state("cur", &cur);
vbt = dev_priv->vbt.edp.pps;
/* On Toshiba Satellite P50-C-18C system the VBT T12 delay
* of 500ms appears to be too short. Ocassionally the panel
* just fails to power back on. Increasing the delay to 800ms
* seems sufficient to avoid this problem.
*/
if (dev_priv->quirks & QUIRK_INCREASE_T12_DELAY) {
vbt.t11_t12 = max_t(u16, vbt.t11_t12, 1300 * 10);
DRM_DEBUG_KMS("Increasing T12 panel delay as per the quirk to %d\n",
vbt.t11_t12);
}
/* T11_T12 delay is special and actually in units of 100ms, but zero
* based in the hw (so we need to add 100 ms). But the sw vbt
* table multiplies it with 1000 to make it in units of 100usec,
* too. */
vbt.t11_t12 += 100 * 10;
/* Upper limits from eDP 1.3 spec. Note that we use the clunky units of
* our hw here, which are all in 100usec. */
spec.t1_t3 = 210 * 10;
spec.t8 = 50 * 10; /* no limit for t8, use t7 instead */
spec.t9 = 50 * 10; /* no limit for t9, make it symmetric with t8 */
spec.t10 = 500 * 10;
/* This one is special and actually in units of 100ms, but zero
* based in the hw (so we need to add 100 ms). But the sw vbt
* table multiplies it with 1000 to make it in units of 100usec,
* too. */
spec.t11_t12 = (510 + 100) * 10;
intel_pps_dump_state("vbt", &vbt);
/* Use the max of the register settings and vbt. If both are
* unset, fall back to the spec limits. */
#define assign_final(field) final->field = (max(cur.field, vbt.field) == 0 ? \
spec.field : \
max(cur.field, vbt.field))
assign_final(t1_t3);
assign_final(t8);
assign_final(t9);
assign_final(t10);
assign_final(t11_t12);
#undef assign_final
#define get_delay(field) (DIV_ROUND_UP(final->field, 10))
intel_dp->panel_power_up_delay = get_delay(t1_t3);
intel_dp->backlight_on_delay = get_delay(t8);
intel_dp->backlight_off_delay = get_delay(t9);
intel_dp->panel_power_down_delay = get_delay(t10);
intel_dp->panel_power_cycle_delay = get_delay(t11_t12);
#undef get_delay
DRM_DEBUG_KMS("panel power up delay %d, power down delay %d, power cycle delay %d\n",
intel_dp->panel_power_up_delay, intel_dp->panel_power_down_delay,
intel_dp->panel_power_cycle_delay);
DRM_DEBUG_KMS("backlight on delay %d, off delay %d\n",
intel_dp->backlight_on_delay, intel_dp->backlight_off_delay);
/*
* We override the HW backlight delays to 1 because we do manual waits
* on them. For T8, even BSpec recommends doing it. For T9, if we
* don't do this, we'll end up waiting for the backlight off delay
* twice: once when we do the manual sleep, and once when we disable
* the panel and wait for the PP_STATUS bit to become zero.
*/
final->t8 = 1;
final->t9 = 1;
}
static void
intel_dp_init_panel_power_sequencer_registers(struct drm_device *dev,
struct intel_dp *intel_dp,
bool force_disable_vdd)
{
struct drm_i915_private *dev_priv = to_i915(dev);
u32 pp_on, pp_off, pp_div, port_sel = 0;
int div = dev_priv->rawclk_freq / 1000;
struct pps_registers regs;
enum port port = dp_to_dig_port(intel_dp)->port;
const struct edp_power_seq *seq = &intel_dp->pps_delays;
lockdep_assert_held(&dev_priv->pps_mutex);
intel_pps_get_registers(dev_priv, intel_dp, ®s);
/*
* On some VLV machines the BIOS can leave the VDD
* enabled even on power seqeuencers which aren't
* hooked up to any port. This would mess up the
* power domain tracking the first time we pick
* one of these power sequencers for use since
* edp_panel_vdd_on() would notice that the VDD was
* already on and therefore wouldn't grab the power
* domain reference. Disable VDD first to avoid this.
* This also avoids spuriously turning the VDD on as
* soon as the new power seqeuencer gets initialized.
*/
if (force_disable_vdd) {
u32 pp = ironlake_get_pp_control(intel_dp);
WARN(pp & PANEL_POWER_ON, "Panel power already on\n");
if (pp & EDP_FORCE_VDD)
DRM_DEBUG_KMS("VDD already on, disabling first\n");
pp &= ~EDP_FORCE_VDD;
I915_WRITE(regs.pp_ctrl, pp);
}
pp_on = (seq->t1_t3 << PANEL_POWER_UP_DELAY_SHIFT) |
(seq->t8 << PANEL_LIGHT_ON_DELAY_SHIFT);
pp_off = (seq->t9 << PANEL_LIGHT_OFF_DELAY_SHIFT) |
(seq->t10 << PANEL_POWER_DOWN_DELAY_SHIFT);
/* Compute the divisor for the pp clock, simply match the Bspec
* formula. */
if (IS_GEN9_LP(dev_priv) || HAS_PCH_CNP(dev_priv)) {
pp_div = I915_READ(regs.pp_ctrl);
pp_div &= ~BXT_POWER_CYCLE_DELAY_MASK;
pp_div |= (DIV_ROUND_UP(seq->t11_t12, 1000)
<< BXT_POWER_CYCLE_DELAY_SHIFT);
} else {
pp_div = ((100 * div)/2 - 1) << PP_REFERENCE_DIVIDER_SHIFT;
pp_div |= (DIV_ROUND_UP(seq->t11_t12, 1000)
<< PANEL_POWER_CYCLE_DELAY_SHIFT);
}
/* Haswell doesn't have any port selection bits for the panel
* power sequencer any more. */
if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
port_sel = PANEL_PORT_SELECT_VLV(port);
} else if (HAS_PCH_IBX(dev_priv) || HAS_PCH_CPT(dev_priv)) {
if (port == PORT_A)
port_sel = PANEL_PORT_SELECT_DPA;
else
port_sel = PANEL_PORT_SELECT_DPD;
}
pp_on |= port_sel;
I915_WRITE(regs.pp_on, pp_on);
I915_WRITE(regs.pp_off, pp_off);
if (IS_GEN9_LP(dev_priv) || HAS_PCH_CNP(dev_priv))
I915_WRITE(regs.pp_ctrl, pp_div);
else
I915_WRITE(regs.pp_div, pp_div);
DRM_DEBUG_KMS("panel power sequencer register settings: PP_ON %#x, PP_OFF %#x, PP_DIV %#x\n",
I915_READ(regs.pp_on),
I915_READ(regs.pp_off),
(IS_GEN9_LP(dev_priv) || HAS_PCH_CNP(dev_priv)) ?
(I915_READ(regs.pp_ctrl) & BXT_POWER_CYCLE_DELAY_MASK) :
I915_READ(regs.pp_div));
}
static void intel_dp_pps_init(struct drm_device *dev,
struct intel_dp *intel_dp)
{
struct drm_i915_private *dev_priv = to_i915(dev);
if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
vlv_initial_power_sequencer_setup(intel_dp);
} else {
intel_dp_init_panel_power_sequencer(dev, intel_dp);
intel_dp_init_panel_power_sequencer_registers(dev, intel_dp, false);
}
}
/**
* intel_dp_set_drrs_state - program registers for RR switch to take effect
* @dev_priv: i915 device
* @crtc_state: a pointer to the active intel_crtc_state
* @refresh_rate: RR to be programmed
*
* This function gets called when refresh rate (RR) has to be changed from
* one frequency to another. Switches can be between high and low RR
* supported by the panel or to any other RR based on media playback (in
* this case, RR value needs to be passed from user space).
*
* The caller of this function needs to take a lock on dev_priv->drrs.
*/
static void intel_dp_set_drrs_state(struct drm_i915_private *dev_priv,
struct intel_crtc_state *crtc_state,
int refresh_rate)
{
struct intel_encoder *encoder;
struct intel_digital_port *dig_port = NULL;
struct intel_dp *intel_dp = dev_priv->drrs.dp;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc_state->base.crtc);
enum drrs_refresh_rate_type index = DRRS_HIGH_RR;
if (refresh_rate <= 0) {
DRM_DEBUG_KMS("Refresh rate should be positive non-zero.\n");
return;
}
if (intel_dp == NULL) {
DRM_DEBUG_KMS("DRRS not supported.\n");
return;
}
/*
* FIXME: This needs proper synchronization with psr state for some
* platforms that cannot have PSR and DRRS enabled at the same time.
*/
dig_port = dp_to_dig_port(intel_dp);
encoder = &dig_port->base;
intel_crtc = to_intel_crtc(encoder->base.crtc);
if (!intel_crtc) {
DRM_DEBUG_KMS("DRRS: intel_crtc not initialized\n");
return;
}
if (dev_priv->drrs.type < SEAMLESS_DRRS_SUPPORT) {
DRM_DEBUG_KMS("Only Seamless DRRS supported.\n");
return;
}
if (intel_dp->attached_connector->panel.downclock_mode->vrefresh ==
refresh_rate)
index = DRRS_LOW_RR;
if (index == dev_priv->drrs.refresh_rate_type) {
DRM_DEBUG_KMS(
"DRRS requested for previously set RR...ignoring\n");
return;
}
if (!crtc_state->base.active) {
DRM_DEBUG_KMS("eDP encoder disabled. CRTC not Active\n");
return;
}
if (INTEL_GEN(dev_priv) >= 8 && !IS_CHERRYVIEW(dev_priv)) {
switch (index) {
case DRRS_HIGH_RR:
intel_dp_set_m_n(intel_crtc, M1_N1);
break;
case DRRS_LOW_RR:
intel_dp_set_m_n(intel_crtc, M2_N2);
break;
case DRRS_MAX_RR:
default:
DRM_ERROR("Unsupported refreshrate type\n");
}
} else if (INTEL_GEN(dev_priv) > 6) {
i915_reg_t reg = PIPECONF(crtc_state->cpu_transcoder);
u32 val;
val = I915_READ(reg);
if (index > DRRS_HIGH_RR) {
if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
val |= PIPECONF_EDP_RR_MODE_SWITCH_VLV;
else
val |= PIPECONF_EDP_RR_MODE_SWITCH;
} else {
if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
val &= ~PIPECONF_EDP_RR_MODE_SWITCH_VLV;
else
val &= ~PIPECONF_EDP_RR_MODE_SWITCH;
}
I915_WRITE(reg, val);
}
dev_priv->drrs.refresh_rate_type = index;
DRM_DEBUG_KMS("eDP Refresh Rate set to : %dHz\n", refresh_rate);
}
/**
* intel_edp_drrs_enable - init drrs struct if supported
* @intel_dp: DP struct
* @crtc_state: A pointer to the active crtc state.
*
* Initializes frontbuffer_bits and drrs.dp
*/
void intel_edp_drrs_enable(struct intel_dp *intel_dp,
struct intel_crtc_state *crtc_state)
{
struct drm_device *dev = intel_dp_to_dev(intel_dp);
struct drm_i915_private *dev_priv = to_i915(dev);
if (!crtc_state->has_drrs) {
DRM_DEBUG_KMS("Panel doesn't support DRRS\n");
return;
}
mutex_lock(&dev_priv->drrs.mutex);
if (WARN_ON(dev_priv->drrs.dp)) {
DRM_ERROR("DRRS already enabled\n");
goto unlock;
}
dev_priv->drrs.busy_frontbuffer_bits = 0;
dev_priv->drrs.dp = intel_dp;
unlock:
mutex_unlock(&dev_priv->drrs.mutex);
}
/**
* intel_edp_drrs_disable - Disable DRRS
* @intel_dp: DP struct
* @old_crtc_state: Pointer to old crtc_state.
*
*/
void intel_edp_drrs_disable(struct intel_dp *intel_dp,
struct intel_crtc_state *old_crtc_state)
{
struct drm_device *dev = intel_dp_to_dev(intel_dp);
struct drm_i915_private *dev_priv = to_i915(dev);
if (!old_crtc_state->has_drrs)
return;
mutex_lock(&dev_priv->drrs.mutex);
if (!dev_priv->drrs.dp) {
mutex_unlock(&dev_priv->drrs.mutex);
return;
}
if (dev_priv->drrs.refresh_rate_type == DRRS_LOW_RR)
intel_dp_set_drrs_state(dev_priv, old_crtc_state,
intel_dp->attached_connector->panel.fixed_mode->vrefresh);
dev_priv->drrs.dp = NULL;
mutex_unlock(&dev_priv->drrs.mutex);
cancel_delayed_work_sync(&dev_priv->drrs.work);
}
static void intel_edp_drrs_downclock_work(struct work_struct *work)
{
struct drm_i915_private *dev_priv =
container_of(work, typeof(*dev_priv), drrs.work.work);
struct intel_dp *intel_dp;
mutex_lock(&dev_priv->drrs.mutex);
intel_dp = dev_priv->drrs.dp;
if (!intel_dp)
goto unlock;
/*
* The delayed work can race with an invalidate hence we need to
* recheck.
*/
if (dev_priv->drrs.busy_frontbuffer_bits)
goto unlock;
if (dev_priv->drrs.refresh_rate_type != DRRS_LOW_RR) {
struct drm_crtc *crtc = dp_to_dig_port(intel_dp)->base.base.crtc;
intel_dp_set_drrs_state(dev_priv, to_intel_crtc(crtc)->config,
intel_dp->attached_connector->panel.downclock_mode->vrefresh);
}
unlock:
mutex_unlock(&dev_priv->drrs.mutex);
}
/**
* intel_edp_drrs_invalidate - Disable Idleness DRRS
* @dev_priv: i915 device
* @frontbuffer_bits: frontbuffer plane tracking bits
*
* This function gets called everytime rendering on the given planes start.
* Hence DRRS needs to be Upclocked, i.e. (LOW_RR -> HIGH_RR).
*
* Dirty frontbuffers relevant to DRRS are tracked in busy_frontbuffer_bits.
*/
void intel_edp_drrs_invalidate(struct drm_i915_private *dev_priv,
unsigned int frontbuffer_bits)
{
struct drm_crtc *crtc;
enum pipe pipe;
if (dev_priv->drrs.type == DRRS_NOT_SUPPORTED)
return;
cancel_delayed_work(&dev_priv->drrs.work);
mutex_lock(&dev_priv->drrs.mutex);
if (!dev_priv->drrs.dp) {
mutex_unlock(&dev_priv->drrs.mutex);
return;
}
crtc = dp_to_dig_port(dev_priv->drrs.dp)->base.base.crtc;
pipe = to_intel_crtc(crtc)->pipe;
frontbuffer_bits &= INTEL_FRONTBUFFER_ALL_MASK(pipe);
dev_priv->drrs.busy_frontbuffer_bits |= frontbuffer_bits;
/* invalidate means busy screen hence upclock */
if (frontbuffer_bits && dev_priv->drrs.refresh_rate_type == DRRS_LOW_RR)
intel_dp_set_drrs_state(dev_priv, to_intel_crtc(crtc)->config,
dev_priv->drrs.dp->attached_connector->panel.fixed_mode->vrefresh);
mutex_unlock(&dev_priv->drrs.mutex);
}
/**
* intel_edp_drrs_flush - Restart Idleness DRRS
* @dev_priv: i915 device
* @frontbuffer_bits: frontbuffer plane tracking bits
*
* This function gets called every time rendering on the given planes has
* completed or flip on a crtc is completed. So DRRS should be upclocked
* (LOW_RR -> HIGH_RR). And also Idleness detection should be started again,
* if no other planes are dirty.
*
* Dirty frontbuffers relevant to DRRS are tracked in busy_frontbuffer_bits.
*/
void intel_edp_drrs_flush(struct drm_i915_private *dev_priv,
unsigned int frontbuffer_bits)
{
struct drm_crtc *crtc;
enum pipe pipe;
if (dev_priv->drrs.type == DRRS_NOT_SUPPORTED)
return;
cancel_delayed_work(&dev_priv->drrs.work);
mutex_lock(&dev_priv->drrs.mutex);
if (!dev_priv->drrs.dp) {
mutex_unlock(&dev_priv->drrs.mutex);
return;
}
crtc = dp_to_dig_port(dev_priv->drrs.dp)->base.base.crtc;
pipe = to_intel_crtc(crtc)->pipe;
frontbuffer_bits &= INTEL_FRONTBUFFER_ALL_MASK(pipe);
dev_priv->drrs.busy_frontbuffer_bits &= ~frontbuffer_bits;
/* flush means busy screen hence upclock */
if (frontbuffer_bits && dev_priv->drrs.refresh_rate_type == DRRS_LOW_RR)
intel_dp_set_drrs_state(dev_priv, to_intel_crtc(crtc)->config,
dev_priv->drrs.dp->attached_connector->panel.fixed_mode->vrefresh);
/*
* flush also means no more activity hence schedule downclock, if all
* other fbs are quiescent too
*/
if (!dev_priv->drrs.busy_frontbuffer_bits)
schedule_delayed_work(&dev_priv->drrs.work,
msecs_to_jiffies(1000));
mutex_unlock(&dev_priv->drrs.mutex);
}
/**
* DOC: Display Refresh Rate Switching (DRRS)
*
* Display Refresh Rate Switching (DRRS) is a power conservation feature
* which enables swtching between low and high refresh rates,
* dynamically, based on the usage scenario. This feature is applicable
* for internal panels.
*
* Indication that the panel supports DRRS is given by the panel EDID, which
* would list multiple refresh rates for one resolution.
*
* DRRS is of 2 types - static and seamless.
* Static DRRS involves changing refresh rate (RR) by doing a full modeset
* (may appear as a blink on screen) and is used in dock-undock scenario.
* Seamless DRRS involves changing RR without any visual effect to the user
* and can be used during normal system usage. This is done by programming
* certain registers.
*
* Support for static/seamless DRRS may be indicated in the VBT based on
* inputs from the panel spec.
*
* DRRS saves power by switching to low RR based on usage scenarios.
*
* The implementation is based on frontbuffer tracking implementation. When
* there is a disturbance on the screen triggered by user activity or a periodic
* system activity, DRRS is disabled (RR is changed to high RR). When there is
* no movement on screen, after a timeout of 1 second, a switch to low RR is
* made.
*
* For integration with frontbuffer tracking code, intel_edp_drrs_invalidate()
* and intel_edp_drrs_flush() are called.
*
* DRRS can be further extended to support other internal panels and also
* the scenario of video playback wherein RR is set based on the rate
* requested by userspace.
*/
/**
* intel_dp_drrs_init - Init basic DRRS work and mutex.
* @intel_connector: eDP connector
* @fixed_mode: preferred mode of panel
*
* This function is called only once at driver load to initialize basic
* DRRS stuff.
*
* Returns:
* Downclock mode if panel supports it, else return NULL.
* DRRS support is determined by the presence of downclock mode (apart
* from VBT setting).
*/
static struct drm_display_mode *
intel_dp_drrs_init(struct intel_connector *intel_connector,
struct drm_display_mode *fixed_mode)
{
struct drm_connector *connector = &intel_connector->base;
struct drm_device *dev = connector->dev;
struct drm_i915_private *dev_priv = to_i915(dev);
struct drm_display_mode *downclock_mode = NULL;
INIT_DELAYED_WORK(&dev_priv->drrs.work, intel_edp_drrs_downclock_work);
mutex_init(&dev_priv->drrs.mutex);
if (INTEL_GEN(dev_priv) <= 6) {
DRM_DEBUG_KMS("DRRS supported for Gen7 and above\n");
return NULL;
}
if (dev_priv->vbt.drrs_type != SEAMLESS_DRRS_SUPPORT) {
DRM_DEBUG_KMS("VBT doesn't support DRRS\n");
return NULL;
}
downclock_mode = intel_find_panel_downclock
(dev_priv, fixed_mode, connector);
if (!downclock_mode) {
DRM_DEBUG_KMS("Downclock mode is not found. DRRS not supported\n");
return NULL;
}
dev_priv->drrs.type = dev_priv->vbt.drrs_type;
dev_priv->drrs.refresh_rate_type = DRRS_HIGH_RR;
DRM_DEBUG_KMS("seamless DRRS supported for eDP panel.\n");
return downclock_mode;
}
static bool intel_edp_init_connector(struct intel_dp *intel_dp,
struct intel_connector *intel_connector)
{
struct drm_connector *connector = &intel_connector->base;
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct intel_encoder *intel_encoder = &intel_dig_port->base;
struct drm_device *dev = intel_encoder->base.dev;
struct drm_i915_private *dev_priv = to_i915(dev);
struct drm_display_mode *fixed_mode = NULL;
struct drm_display_mode *alt_fixed_mode = NULL;
struct drm_display_mode *downclock_mode = NULL;
bool has_dpcd;
struct drm_display_mode *scan;
struct edid *edid;
enum pipe pipe = INVALID_PIPE;
if (!is_edp(intel_dp))
return true;
/*
* On IBX/CPT we may get here with LVDS already registered. Since the
* driver uses the only internal power sequencer available for both
* eDP and LVDS bail out early in this case to prevent interfering
* with an already powered-on LVDS power sequencer.
*/
if (intel_get_lvds_encoder(dev)) {
WARN_ON(!(HAS_PCH_IBX(dev_priv) || HAS_PCH_CPT(dev_priv)));
DRM_INFO("LVDS was detected, not registering eDP\n");
return false;
}
pps_lock(intel_dp);
intel_dp_init_panel_power_timestamps(intel_dp);
intel_dp_pps_init(dev, intel_dp);
intel_edp_panel_vdd_sanitize(intel_dp);
pps_unlock(intel_dp);
/* Cache DPCD and EDID for edp. */
has_dpcd = intel_edp_init_dpcd(intel_dp);
if (!has_dpcd) {
/* if this fails, presume the device is a ghost */
DRM_INFO("failed to retrieve link info, disabling eDP\n");
goto out_vdd_off;
}
mutex_lock(&dev->mode_config.mutex);
edid = drm_get_edid(connector, &intel_dp->aux.ddc);
if (edid) {
if (drm_add_edid_modes(connector, edid)) {
drm_mode_connector_update_edid_property(connector,
edid);
drm_edid_to_eld(connector, edid);
} else {
kfree(edid);
edid = ERR_PTR(-EINVAL);
}
} else {
edid = ERR_PTR(-ENOENT);
}
intel_connector->edid = edid;
/* prefer fixed mode from EDID if available, save an alt mode also */
list_for_each_entry(scan, &connector->probed_modes, head) {
if ((scan->type & DRM_MODE_TYPE_PREFERRED)) {
fixed_mode = drm_mode_duplicate(dev, scan);
downclock_mode = intel_dp_drrs_init(
intel_connector, fixed_mode);
} else if (!alt_fixed_mode) {
alt_fixed_mode = drm_mode_duplicate(dev, scan);
}
}
/* fallback to VBT if available for eDP */
if (!fixed_mode && dev_priv->vbt.lfp_lvds_vbt_mode) {
fixed_mode = drm_mode_duplicate(dev,
dev_priv->vbt.lfp_lvds_vbt_mode);
if (fixed_mode) {
fixed_mode->type |= DRM_MODE_TYPE_PREFERRED;
connector->display_info.width_mm = fixed_mode->width_mm;
connector->display_info.height_mm = fixed_mode->height_mm;
}
}
mutex_unlock(&dev->mode_config.mutex);
if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
intel_dp->edp_notifier.notifier_call = edp_notify_handler;
register_reboot_notifier(&intel_dp->edp_notifier);
/*
* Figure out the current pipe for the initial backlight setup.
* If the current pipe isn't valid, try the PPS pipe, and if that
* fails just assume pipe A.
*/
pipe = vlv_active_pipe(intel_dp);
if (pipe != PIPE_A && pipe != PIPE_B)
pipe = intel_dp->pps_pipe;
if (pipe != PIPE_A && pipe != PIPE_B)
pipe = PIPE_A;
DRM_DEBUG_KMS("using pipe %c for initial backlight setup\n",
pipe_name(pipe));
}
intel_panel_init(&intel_connector->panel, fixed_mode, alt_fixed_mode,
downclock_mode);
intel_connector->panel.backlight.power = intel_edp_backlight_power;
intel_panel_setup_backlight(connector, pipe);
return true;
out_vdd_off:
cancel_delayed_work_sync(&intel_dp->panel_vdd_work);
/*
* vdd might still be enabled do to the delayed vdd off.
* Make sure vdd is actually turned off here.
*/
pps_lock(intel_dp);
edp_panel_vdd_off_sync(intel_dp);
pps_unlock(intel_dp);
return false;
}
/* Set up the hotplug pin and aux power domain. */
static void
intel_dp_init_connector_port_info(struct intel_digital_port *intel_dig_port)
{
struct intel_encoder *encoder = &intel_dig_port->base;
struct intel_dp *intel_dp = &intel_dig_port->dp;
encoder->hpd_pin = intel_hpd_pin(intel_dig_port->port);
switch (intel_dig_port->port) {
case PORT_A:
intel_dp->aux_power_domain = POWER_DOMAIN_AUX_A;
break;
case PORT_B:
intel_dp->aux_power_domain = POWER_DOMAIN_AUX_B;
break;
case PORT_C:
intel_dp->aux_power_domain = POWER_DOMAIN_AUX_C;
break;
case PORT_D:
intel_dp->aux_power_domain = POWER_DOMAIN_AUX_D;
break;
case PORT_E:
/* FIXME: Check VBT for actual wiring of PORT E */
intel_dp->aux_power_domain = POWER_DOMAIN_AUX_D;
break;
default:
MISSING_CASE(intel_dig_port->port);
}
}
static void intel_dp_modeset_retry_work_fn(struct work_struct *work)
{
struct intel_connector *intel_connector;
struct drm_connector *connector;
intel_connector = container_of(work, typeof(*intel_connector),
modeset_retry_work);
connector = &intel_connector->base;
DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", connector->base.id,
connector->name);
/* Grab the locks before changing connector property*/
mutex_lock(&connector->dev->mode_config.mutex);
/* Set connector link status to BAD and send a Uevent to notify
* userspace to do a modeset.
*/
drm_mode_connector_set_link_status_property(connector,
DRM_MODE_LINK_STATUS_BAD);
mutex_unlock(&connector->dev->mode_config.mutex);
/* Send Hotplug uevent so userspace can reprobe */
drm_kms_helper_hotplug_event(connector->dev);
}
bool
intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
struct intel_connector *intel_connector)
{
struct drm_connector *connector = &intel_connector->base;
struct intel_dp *intel_dp = &intel_dig_port->dp;
struct intel_encoder *intel_encoder = &intel_dig_port->base;
struct drm_device *dev = intel_encoder->base.dev;
struct drm_i915_private *dev_priv = to_i915(dev);
enum port port = intel_dig_port->port;
int type;
/* Initialize the work for modeset in case of link train failure */
INIT_WORK(&intel_connector->modeset_retry_work,
intel_dp_modeset_retry_work_fn);
if (WARN(intel_dig_port->max_lanes < 1,
"Not enough lanes (%d) for DP on port %c\n",
intel_dig_port->max_lanes, port_name(port)))
return false;
intel_dp_set_source_rates(intel_dp);
intel_dp->reset_link_params = true;
intel_dp->pps_pipe = INVALID_PIPE;
intel_dp->active_pipe = INVALID_PIPE;
/* intel_dp vfuncs */
if (INTEL_GEN(dev_priv) >= 9)
intel_dp->get_aux_clock_divider = skl_get_aux_clock_divider;
else if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv))
intel_dp->get_aux_clock_divider = hsw_get_aux_clock_divider;
else if (HAS_PCH_SPLIT(dev_priv))
intel_dp->get_aux_clock_divider = ilk_get_aux_clock_divider;
else
intel_dp->get_aux_clock_divider = g4x_get_aux_clock_divider;
if (INTEL_GEN(dev_priv) >= 9)
intel_dp->get_aux_send_ctl = skl_get_aux_send_ctl;
else
intel_dp->get_aux_send_ctl = g4x_get_aux_send_ctl;
if (HAS_DDI(dev_priv))
intel_dp->prepare_link_retrain = intel_ddi_prepare_link_retrain;
/* Preserve the current hw state. */
intel_dp->DP = I915_READ(intel_dp->output_reg);
intel_dp->attached_connector = intel_connector;
if (intel_dp_is_edp(dev_priv, port))
type = DRM_MODE_CONNECTOR_eDP;
else
type = DRM_MODE_CONNECTOR_DisplayPort;
if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
intel_dp->active_pipe = vlv_active_pipe(intel_dp);
/*
* For eDP we always set the encoder type to INTEL_OUTPUT_EDP, but
* for DP the encoder type can be set by the caller to
* INTEL_OUTPUT_UNKNOWN for DDI, so don't rewrite it.
*/
if (type == DRM_MODE_CONNECTOR_eDP)
intel_encoder->type = INTEL_OUTPUT_EDP;
/* eDP only on port B and/or C on vlv/chv */
if (WARN_ON((IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) &&
is_edp(intel_dp) && port != PORT_B && port != PORT_C))
return false;
DRM_DEBUG_KMS("Adding %s connector on port %c\n",
type == DRM_MODE_CONNECTOR_eDP ? "eDP" : "DP",
port_name(port));
drm_connector_init(dev, connector, &intel_dp_connector_funcs, type);
drm_connector_helper_add(connector, &intel_dp_connector_helper_funcs);
connector->interlace_allowed = true;
connector->doublescan_allowed = 0;
intel_dp_init_connector_port_info(intel_dig_port);
intel_dp_aux_init(intel_dp);
INIT_DELAYED_WORK(&intel_dp->panel_vdd_work,
edp_panel_vdd_work);
intel_connector_attach_encoder(intel_connector, intel_encoder);
if (HAS_DDI(dev_priv))
intel_connector->get_hw_state = intel_ddi_connector_get_hw_state;
else
intel_connector->get_hw_state = intel_connector_get_hw_state;
/* init MST on ports that can support it */
if (HAS_DP_MST(dev_priv) && !is_edp(intel_dp) &&
(port == PORT_B || port == PORT_C || port == PORT_D))
intel_dp_mst_encoder_init(intel_dig_port,
intel_connector->base.base.id);
if (!intel_edp_init_connector(intel_dp, intel_connector)) {
intel_dp_aux_fini(intel_dp);
intel_dp_mst_encoder_cleanup(intel_dig_port);
goto fail;
}
intel_dp_add_properties(intel_dp, connector);
/* For G4X desktop chip, PEG_BAND_GAP_DATA 3:0 must first be written
* 0xd. Failure to do so will result in spurious interrupts being
* generated on the port when a cable is not attached.
*/
if (IS_G4X(dev_priv) && !IS_GM45(dev_priv)) {
u32 temp = I915_READ(PEG_BAND_GAP_DATA);
I915_WRITE(PEG_BAND_GAP_DATA, (temp & ~0xf) | 0xd);
}
return true;
fail:
drm_connector_cleanup(connector);
return false;
}
bool intel_dp_init(struct drm_i915_private *dev_priv,
i915_reg_t output_reg,
enum port port)
{
struct intel_digital_port *intel_dig_port;
struct intel_encoder *intel_encoder;
struct drm_encoder *encoder;
struct intel_connector *intel_connector;
intel_dig_port = kzalloc(sizeof(*intel_dig_port), GFP_KERNEL);
if (!intel_dig_port)
return false;
intel_connector = intel_connector_alloc();
if (!intel_connector)
goto err_connector_alloc;
intel_encoder = &intel_dig_port->base;
encoder = &intel_encoder->base;
if (drm_encoder_init(&dev_priv->drm, &intel_encoder->base,
&intel_dp_enc_funcs, DRM_MODE_ENCODER_TMDS,
"DP %c", port_name(port)))
goto err_encoder_init;
intel_encoder->compute_config = intel_dp_compute_config;
intel_encoder->disable = intel_disable_dp;
intel_encoder->get_hw_state = intel_dp_get_hw_state;
intel_encoder->get_config = intel_dp_get_config;
intel_encoder->suspend = intel_dp_encoder_suspend;
if (IS_CHERRYVIEW(dev_priv)) {
intel_encoder->pre_pll_enable = chv_dp_pre_pll_enable;
intel_encoder->pre_enable = chv_pre_enable_dp;
intel_encoder->enable = vlv_enable_dp;
intel_encoder->post_disable = chv_post_disable_dp;
intel_encoder->post_pll_disable = chv_dp_post_pll_disable;
} else if (IS_VALLEYVIEW(dev_priv)) {
intel_encoder->pre_pll_enable = vlv_dp_pre_pll_enable;
intel_encoder->pre_enable = vlv_pre_enable_dp;
intel_encoder->enable = vlv_enable_dp;
intel_encoder->post_disable = vlv_post_disable_dp;
} else {
intel_encoder->pre_enable = g4x_pre_enable_dp;
intel_encoder->enable = g4x_enable_dp;
if (INTEL_GEN(dev_priv) >= 5)
intel_encoder->post_disable = ilk_post_disable_dp;
}
intel_dig_port->port = port;
intel_dig_port->dp.output_reg = output_reg;
intel_dig_port->max_lanes = 4;
intel_encoder->type = INTEL_OUTPUT_DP;
intel_encoder->power_domain = intel_port_to_power_domain(port);
if (IS_CHERRYVIEW(dev_priv)) {
if (port == PORT_D)
intel_encoder->crtc_mask = 1 << 2;
else
intel_encoder->crtc_mask = (1 << 0) | (1 << 1);
} else {
intel_encoder->crtc_mask = (1 << 0) | (1 << 1) | (1 << 2);
}
intel_encoder->cloneable = 0;
intel_encoder->port = port;
intel_dig_port->hpd_pulse = intel_dp_hpd_pulse;
dev_priv->hotplug.irq_port[port] = intel_dig_port;
if (!intel_dp_init_connector(intel_dig_port, intel_connector))
goto err_init_connector;
return true;
err_init_connector:
drm_encoder_cleanup(encoder);
err_encoder_init:
kfree(intel_connector);
err_connector_alloc:
kfree(intel_dig_port);
return false;
}
void intel_dp_mst_suspend(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = to_i915(dev);
int i;
/* disable MST */
for (i = 0; i < I915_MAX_PORTS; i++) {
struct intel_digital_port *intel_dig_port = dev_priv->hotplug.irq_port[i];
if (!intel_dig_port || !intel_dig_port->dp.can_mst)
continue;
if (intel_dig_port->dp.is_mst)
drm_dp_mst_topology_mgr_suspend(&intel_dig_port->dp.mst_mgr);
}
}
void intel_dp_mst_resume(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = to_i915(dev);
int i;
for (i = 0; i < I915_MAX_PORTS; i++) {
struct intel_digital_port *intel_dig_port = dev_priv->hotplug.irq_port[i];
int ret;
if (!intel_dig_port || !intel_dig_port->dp.can_mst)
continue;
ret = drm_dp_mst_topology_mgr_resume(&intel_dig_port->dp.mst_mgr);
if (ret)
intel_dp_check_mst_status(&intel_dig_port->dp);
}
}
| gpl-2.0 |
Zia-/pgrouting | src/ksp/src/ksp_driver.cpp | 4199 | /*PGR
Copyright (c) 2015 Celia Virginia Vergara Castillo
[email protected]
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifdef __MINGW32__
#include <winsock2.h>
#include <windows.h>
#endif
#include <deque>
#include <sstream>
#include <boost/config.hpp>
#include <boost/graph/adjacency_list.hpp>
#include "./ksp_driver.h"
extern "C" {
#if 0
#include "postgres.h"
#include "./ksp.h"
#include "./../../common/src/pgr_types.h"
#endif
#include "./../../common/src/postgres_connection.h"
}
#include "./pgr_ksp.hpp"
int do_pgr_ksp(pgr_edge_t *data_edges, int64_t total_tuples,
int64_t start_vertex, int64_t end_vertex,
int no_paths, bool has_reverse_cost, bool directedFlag,
pgr_path_element3_t **ksp_path, int *path_count,
char ** err_msg) {
try {
// in c code this should have been checked:
// 1) start_vertex is in the data_edges DONE
// 2) end_vertex is in the data_edges DONE
// 3) start and end_vertex are different DONE
std::ostringstream log;
graphType gType = directedFlag? DIRECTED: UNDIRECTED;
const int initial_size = 1;
std::deque< Path > paths;
typedef boost::adjacency_list < boost::vecS, boost::vecS,
boost::undirectedS,
boost_vertex_t, boost_edge_t > UndirectedGraph;
typedef boost::adjacency_list < boost::vecS, boost::vecS,
boost::bidirectionalS,
boost_vertex_t, boost_edge_t > DirectedGraph;
Pgr_ksp < DirectedGraph > digraph(gType, initial_size);
Pgr_ksp < UndirectedGraph > undigraph(gType, initial_size);
if (directedFlag) {
digraph.initialize_graph(data_edges, total_tuples);
paths = digraph.Yen(start_vertex, end_vertex, no_paths);
digraph.clear();
} else {
undigraph.initialize_graph(data_edges, total_tuples);
paths = undigraph.Yen(start_vertex, end_vertex, no_paths);
}
int count(count_tuples(paths));
if (count == 0) {
*err_msg = strdup(
"NOTICE: No path found between Starting and Ending vertices");
*ksp_path = noPathFound3(-1, path_count, (*ksp_path));
return 0;
}
// get the space required to store all the paths
*ksp_path = NULL;
*ksp_path = pgr_get_memory3(count, (*ksp_path));
int sequence = 0;
int route_id = 0;
for (const auto &path : paths) {
if (path.path.size() > 0)
path.dpPrint(ksp_path, sequence, route_id);
++route_id;
}
log << "NOTICE Sequence: " << sequence << "\n";
if (count != sequence) {
log << "ERROR: Internal count and real count are different. \n"
<< "ERROR: This should not happen: Please report in GitHub:"
<< " pgrouting issues.";
*err_msg = strdup(log.str().c_str());
return -1;
}
#if 1
*err_msg = strdup("OK");
#else
*err_msg = strdup(log.str().c_str());
#endif
*path_count = count;
return EXIT_SUCCESS;
} catch ( ... ) {
*err_msg = strdup("Caught unknown expection!");
return -1;
}
}
#if 0
// move around this lines to force a return with an empty path and the log msg
// cool for debugging
*err_msg = strdup(log.str().c_str());
(*path_count) = 1;
*path = noPathFound(start_vertex);
return -1;
#endif
| gpl-2.0 |
RealDigitalMediaAndroid/linux-imx6 | drivers/net/wireless/rtlwifi/rtl8821as/hal/OUTSRC/rtl8821a/HalHWImg8821A_RF.h | 4832 | /******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
#if (RTL8821A_SUPPORT == 1)
#ifndef __INC_MP_RF_HW_IMG_8821A_H
#define __INC_MP_RF_HW_IMG_8821A_H
/******************************************************************************
* RadioA.TXT
******************************************************************************/
void
ODM_ReadAndConfig_MP_8821A_RadioA( // TC: Test Chip, MP: MP Chip
IN PDM_ODM_T pDM_Odm
);
u4Byte ODM_GetVersion_MP_8821A_RadioA(void);
/******************************************************************************
* TxPowerTrack_AP.TXT
******************************************************************************/
void
ODM_ReadAndConfig_MP_8821A_TxPowerTrack_AP( // TC: Test Chip, MP: MP Chip
IN PDM_ODM_T pDM_Odm
);
u4Byte ODM_GetVersion_MP_8821A_TxPowerTrack_AP(void);
/******************************************************************************
* TxPowerTrack_PCIE.TXT
******************************************************************************/
void
ODM_ReadAndConfig_MP_8821A_TxPowerTrack_PCIE( // TC: Test Chip, MP: MP Chip
IN PDM_ODM_T pDM_Odm
);
u4Byte ODM_GetVersion_MP_8821A_TxPowerTrack_PCIE(void);
/******************************************************************************
* TxPowerTrack_USB.TXT
******************************************************************************/
void
ODM_ReadAndConfig_MP_8821A_TxPowerTrack_USB( // TC: Test Chip, MP: MP Chip
IN PDM_ODM_T pDM_Odm
);
u4Byte ODM_GetVersion_MP_8821A_TxPowerTrack_USB(void);
/******************************************************************************
* TXPWR_LMT_8811AU_FEM.TXT
******************************************************************************/
void
ODM_ReadAndConfig_MP_8821A_TXPWR_LMT_8811AU_FEM( // TC: Test Chip, MP: MP Chip
IN PDM_ODM_T pDM_Odm
);
u4Byte ODM_GetVersion_MP_8821A_TXPWR_LMT_8811AU_FEM(void);
/******************************************************************************
* TXPWR_LMT_8811AU_IPA.TXT
******************************************************************************/
void
ODM_ReadAndConfig_MP_8821A_TXPWR_LMT_8811AU_IPA( // TC: Test Chip, MP: MP Chip
IN PDM_ODM_T pDM_Odm
);
u4Byte ODM_GetVersion_MP_8821A_TXPWR_LMT_8811AU_IPA(void);
/******************************************************************************
* TXPWR_LMT_8821A.TXT
******************************************************************************/
void
ODM_ReadAndConfig_MP_8821A_TXPWR_LMT_8821A( // TC: Test Chip, MP: MP Chip
IN PDM_ODM_T pDM_Odm
);
u4Byte ODM_GetVersion_MP_8821A_TXPWR_LMT_8821A(void);
/******************************************************************************
* TXPWR_LMT_8821A_SAR_13dBm.TXT
******************************************************************************/
void
ODM_ReadAndConfig_MP_8821A_TXPWR_LMT_8821A_SAR_13dBm( // TC: Test Chip, MP: MP Chip
IN PDM_ODM_T pDM_Odm
);
u4Byte ODM_GetVersion_MP_8821A_TXPWR_LMT_8821A_SAR_13dBm(void);
/******************************************************************************
* TXPWR_LMT_8821A_SAR_5mm.TXT
******************************************************************************/
void
ODM_ReadAndConfig_MP_8821A_TXPWR_LMT_8821A_SAR_5mm( // TC: Test Chip, MP: MP Chip
IN PDM_ODM_T pDM_Odm
);
u4Byte ODM_GetVersion_MP_8821A_TXPWR_LMT_8821A_SAR_5mm(void);
/******************************************************************************
* TXPWR_LMT_8821A_SAR_8mm.TXT
******************************************************************************/
void
ODM_ReadAndConfig_MP_8821A_TXPWR_LMT_8821A_SAR_8mm( // TC: Test Chip, MP: MP Chip
IN PDM_ODM_T pDM_Odm
);
u4Byte ODM_GetVersion_MP_8821A_TXPWR_LMT_8821A_SAR_8mm(void);
#endif
#endif // end of HWIMG_SUPPORT
| gpl-2.0 |
popazerty/test | mytest.py | 17270 | import sys, os
if os.path.isfile("/usr/lib/enigma2/python/enigma.zip"):
sys.path.append("/usr/lib/enigma2/python/enigma.zip")
from Tools.Profile import profile, profile_final
profile("PYTHON_START")
import Tools.RedirectOutput
import enigma
import eConsoleImpl
import eBaseImpl
from boxbranding import getBoxType
enigma.eTimer = eBaseImpl.eTimer
enigma.eSocketNotifier = eBaseImpl.eSocketNotifier
enigma.eConsoleAppContainer = eConsoleImpl.eConsoleAppContainer
from traceback import print_exc
profile("SimpleSummary")
from Screens import InfoBar
from Screens.SimpleSummary import SimpleSummary
from sys import stdout, exc_info
profile("Bouquets")
from Components.config import config, configfile, ConfigText, ConfigYesNo, ConfigInteger, NoSave
config.misc.load_unlinked_userbouquets = ConfigYesNo(default=True)
def setLoadUnlinkedUserbouquets(configElement):
enigma.eDVBDB.getInstance().setLoadUnlinkedUserbouquets(configElement.value)
config.misc.load_unlinked_userbouquets.addNotifier(setLoadUnlinkedUserbouquets)
enigma.eDVBDB.getInstance().reloadBouquets()
profile("ParentalControl")
import Components.ParentalControl
Components.ParentalControl.InitParentalControl()
profile("LOAD:Navigation")
from Navigation import Navigation
profile("LOAD:skin")
from skin import readSkin
profile("LOAD:Tools")
from Tools.Directories import InitFallbackFiles, resolveFilename, SCOPE_PLUGINS, SCOPE_CURRENT_SKIN
InitFallbackFiles()
profile("config.misc")
config.misc.radiopic = ConfigText(default = resolveFilename(SCOPE_CURRENT_SKIN, "radio.mvi"))
config.misc.blackradiopic = ConfigText(default = resolveFilename(SCOPE_CURRENT_SKIN, "black.mvi"))
config.misc.useTransponderTime = ConfigYesNo(default=True)
config.misc.startCounter = ConfigInteger(default=0) # number of e2 starts...
config.misc.standbyCounter = NoSave(ConfigInteger(default=0)) # number of standby
config.misc.DeepStandby = NoSave(ConfigYesNo(default=False)) # detect deepstandby
config.misc.RestartUI = ConfigYesNo(default=False) # detect user interface restart
config.misc.epgcache_filename = ConfigText(default = "/hdd/epg.dat")
def setEPGCachePath(configElement):
enigma.eEPGCache.getInstance().setCacheFile(configElement.value)
#demo code for use of standby enter leave callbacks
#def leaveStandby():
# print "!!!!!!!!!!!!!!!!!leave standby"
#def standbyCountChanged(configElement):
# print "!!!!!!!!!!!!!!!!!enter standby num", configElement.value
# from Screens.Standby import inStandby
# inStandby.onClose.append(leaveStandby)
#config.misc.standbyCounter.addNotifier(standbyCountChanged, initial_call = False)
####################################################
def useTransponderTimeChanged(configElement):
enigma.eDVBLocalTimeHandler.getInstance().setUseDVBTime(configElement.value)
config.misc.useTransponderTime.addNotifier(useTransponderTimeChanged)
profile("Twisted")
try:
import twisted.python.runtime
import e2reactor
e2reactor.install()
from twisted.internet import reactor
def runReactor():
reactor.run(installSignalHandlers=False)
except ImportError:
print "twisted not available"
def runReactor():
enigma.runMainloop()
profile("LOAD:Plugin")
# initialize autorun plugins and plugin menu entries
from Components.PluginComponent import plugins
profile("LOAD:Wizard")
from Screens.Wizard import wizardManager
from Screens.StartWizard import *
import Screens.Rc
from Tools.BoundFunction import boundFunction
from Plugins.Plugin import PluginDescriptor
profile("misc")
had = dict()
def dump(dir, p = ""):
if isinstance(dir, dict):
for (entry, val) in dir.items():
dump(val, p + "(dict)/" + entry)
if hasattr(dir, "__dict__"):
for name, value in dir.__dict__.items():
if not had.has_key(str(value)):
had[str(value)] = 1
dump(value, p + "/" + str(name))
else:
print p + "/" + str(name) + ":" + str(dir.__class__) + "(cycle)"
else:
print p + ":" + str(dir)
# + ":" + str(dir.__class__)
# display
profile("LOAD:ScreenGlobals")
from Screens.Globals import Globals
from Screens.SessionGlobals import SessionGlobals
from Screens.Screen import Screen
profile("Screen")
Screen.global_screen = Globals()
# Session.open:
# * push current active dialog ('current_dialog') onto stack
# * call execEnd for this dialog
# * clear in_exec flag
# * hide screen
# * instantiate new dialog into 'current_dialog'
# * create screens, components
# * read, apply skin
# * create GUI for screen
# * call execBegin for new dialog
# * set in_exec
# * show gui screen
# * call components' / screen's onExecBegin
# ... screen is active, until it calls 'close'...
# Session.close:
# * assert in_exec
# * save return value
# * start deferred close handler ('onClose')
# * execEnd
# * clear in_exec
# * hide screen
# .. a moment later:
# Session.doClose:
# * destroy screen
class Session:
def __init__(self, desktop = None, summary_desktop = None, navigation = None):
self.desktop = desktop
self.summary_desktop = summary_desktop
self.nav = navigation
self.delay_timer = enigma.eTimer()
self.delay_timer.callback.append(self.processDelay)
self.current_dialog = None
self.dialog_stack = [ ]
self.summary_stack = [ ]
self.summary = None
self.in_exec = False
self.screen = SessionGlobals(self)
for p in plugins.getPlugins(PluginDescriptor.WHERE_SESSIONSTART):
try:
p(reason=0, session=self)
except:
print "Plugin raised exception at WHERE_SESSIONSTART"
import traceback
traceback.print_exc()
def processDelay(self):
callback = self.current_dialog.callback
retval = self.current_dialog.returnValue
if self.current_dialog.isTmp:
self.current_dialog.doClose()
# dump(self.current_dialog)
del self.current_dialog
else:
del self.current_dialog.callback
self.popCurrent()
if callback is not None:
callback(*retval)
def execBegin(self, first=True, do_show = True):
assert not self.in_exec
self.in_exec = True
c = self.current_dialog
# when this is an execbegin after a execend of a "higher" dialog,
# popSummary already did the right thing.
if first:
self.instantiateSummaryDialog(c)
c.saveKeyboardMode()
c.execBegin()
# when execBegin opened a new dialog, don't bother showing the old one.
if c == self.current_dialog and do_show:
c.show()
def execEnd(self, last=True):
assert self.in_exec
self.in_exec = False
self.current_dialog.execEnd()
self.current_dialog.restoreKeyboardMode()
self.current_dialog.hide()
if last:
self.current_dialog.removeSummary(self.summary)
self.popSummary()
def create(self, screen, arguments, **kwargs):
# creates an instance of 'screen' (which is a class)
try:
return screen(self, *arguments, **kwargs)
except:
errstr = "Screen %s(%s, %s): %s" % (str(screen), str(arguments), str(kwargs), exc_info()[0])
print errstr
print_exc(file=stdout)
enigma.quitMainloop(5)
def instantiateDialog(self, screen, *arguments, **kwargs):
return self.doInstantiateDialog(screen, arguments, kwargs, self.desktop)
def deleteDialog(self, screen):
screen.hide()
screen.doClose()
def instantiateSummaryDialog(self, screen, **kwargs):
self.pushSummary()
summary = screen.createSummary() or SimpleSummary
arguments = (screen,)
self.summary = self.doInstantiateDialog(summary, arguments, kwargs, self.summary_desktop)
self.summary.show()
screen.addSummary(self.summary)
def doInstantiateDialog(self, screen, arguments, kwargs, desktop):
# create dialog
try:
dlg = self.create(screen, arguments, **kwargs)
except:
print 'EXCEPTION IN DIALOG INIT CODE, ABORTING:'
print '-'*60
print_exc(file=stdout)
enigma.quitMainloop(5)
print '-'*60
if dlg is None:
return
# read skin data
readSkin(dlg, None, dlg.skinName, desktop)
# create GUI view of this dialog
assert desktop is not None
dlg.setDesktop(desktop)
dlg.applySkin()
return dlg
def pushCurrent(self):
if self.current_dialog is not None:
self.dialog_stack.append((self.current_dialog, self.current_dialog.shown))
self.execEnd(last=False)
def popCurrent(self):
if self.dialog_stack:
(self.current_dialog, do_show) = self.dialog_stack.pop()
self.execBegin(first=False, do_show=do_show)
else:
self.current_dialog = None
def execDialog(self, dialog):
self.pushCurrent()
self.current_dialog = dialog
self.current_dialog.isTmp = False
self.current_dialog.callback = None # would cause re-entrancy problems.
self.execBegin()
def openWithCallback(self, callback, screen, *arguments, **kwargs):
dlg = self.open(screen, *arguments, **kwargs)
dlg.callback = callback
return dlg
def open(self, screen, *arguments, **kwargs):
if self.dialog_stack and not self.in_exec:
raise RuntimeError("modal open are allowed only from a screen which is modal!")
# ...unless it's the very first screen.
self.pushCurrent()
dlg = self.current_dialog = self.instantiateDialog(screen, *arguments, **kwargs)
dlg.isTmp = True
dlg.callback = None
self.execBegin()
return dlg
def close(self, screen, *retval):
if not self.in_exec:
print "close after exec!"
return
# be sure that the close is for the right dialog!
# if it's not, you probably closed after another dialog
# was opened. this can happen if you open a dialog
# onExecBegin, and forget to do this only once.
# after close of the top dialog, the underlying will
# gain focus again (for a short time), thus triggering
# the onExec, which opens the dialog again, closing the loop.
assert screen == self.current_dialog
self.current_dialog.returnValue = retval
self.delay_timer.start(0, 1)
self.execEnd()
def pushSummary(self):
if self.summary is not None:
self.summary.hide()
self.summary_stack.append(self.summary)
self.summary = None
def popSummary(self):
if self.summary is not None:
self.summary.doClose()
self.summary = self.summary_stack.pop()
if self.summary is not None:
self.summary.show()
profile("Standby,PowerKey")
import Screens.Standby
from Screens.Menu import MainMenu, mdom
from GlobalActions import globalActionMap
class PowerKey:
""" PowerKey stuff - handles the powerkey press and powerkey release actions"""
def __init__(self, session):
self.session = session
globalActionMap.actions["power_down"]=self.powerdown
globalActionMap.actions["power_up"]=self.powerup
globalActionMap.actions["power_long"]=self.powerlong
globalActionMap.actions["deepstandby"]=self.shutdown # frontpanel long power button press
globalActionMap.actions["discrete_off"]=self.standby
self.standbyblocked = 1
def MenuClosed(self, *val):
self.session.infobar = None
def shutdown(self):
print "PowerOff - Now!"
if not Screens.Standby.inTryQuitMainloop and self.session.current_dialog and self.session.current_dialog.ALLOW_SUSPEND:
self.session.open(Screens.Standby.TryQuitMainloop, 1)
def powerlong(self):
if Screens.Standby.inTryQuitMainloop or (self.session.current_dialog and not self.session.current_dialog.ALLOW_SUSPEND):
return
self.doAction(action = config.usage.on_long_powerpress.value)
def doAction(self, action):
self.standbyblocked = 1
if action == "shutdown":
self.shutdown()
elif action == "show_menu":
print "Show shutdown Menu"
root = mdom.getroot()
for x in root.findall("menu"):
y = x.find("id")
if y is not None:
id = y.get("val")
if id and id == "shutdown":
self.session.infobar = self
menu_screen = self.session.openWithCallback(self.MenuClosed, MainMenu, x)
menu_screen.setTitle(_("Standby / restart"))
return
elif action == "standby":
self.standby()
def powerdown(self):
self.standbyblocked = 0
def powerup(self):
if self.standbyblocked == 0:
self.doAction(action = config.usage.on_short_powerpress.value)
def standby(self):
if not Screens.Standby.inStandby and self.session.current_dialog and self.session.current_dialog.ALLOW_SUSPEND and self.session.in_exec:
self.session.open(Screens.Standby.Standby)
profile("Scart")
from Screens.Scart import Scart
class AutoScartControl:
def __init__(self, session):
self.force = False
self.current_vcr_sb = enigma.eAVSwitch.getInstance().getVCRSlowBlanking()
if self.current_vcr_sb and config.av.vcrswitch.value:
self.scartDialog = session.instantiateDialog(Scart, True)
else:
self.scartDialog = session.instantiateDialog(Scart, False)
config.av.vcrswitch.addNotifier(self.recheckVCRSb)
enigma.eAVSwitch.getInstance().vcr_sb_notifier.get().append(self.VCRSbChanged)
def recheckVCRSb(self, configElement):
self.VCRSbChanged(self.current_vcr_sb)
def VCRSbChanged(self, value):
#print "vcr sb changed to", value
self.current_vcr_sb = value
if config.av.vcrswitch.value or value > 2:
if value:
self.scartDialog.showMessageBox()
else:
self.scartDialog.switchToTV()
profile("Load:CI")
from enigma import eDVBCIInterfaces
from Screens.Ci import CiHandler
profile("Load:VolumeControl")
from Components.VolumeControl import VolumeControl
def runScreenTest():
config.misc.startCounter.value += 1
profile("readPluginList")
plugins.readPluginList(resolveFilename(SCOPE_PLUGINS))
profile("Init:Session")
nav = Navigation()
session = Session(desktop = enigma.getDesktop(0), summary_desktop = enigma.getDesktop(1), navigation = nav)
CiHandler.setSession(session)
screensToRun = [ p.__call__ for p in plugins.getPlugins(PluginDescriptor.WHERE_WIZARD) ]
profile("wizards")
screensToRun += wizardManager.getWizards()
screensToRun.append((100, InfoBar.InfoBar))
screensToRun.sort()
enigma.ePythonConfigQuery.setQueryFunc(configfile.getResolvedKey)
# eDVBCIInterfaces.getInstance().setDescrambleRules(0 # Slot Number
# ,( ["1:0:1:24:4:85:C00000:0:0:0:"], #service_list
# ["PREMIERE"], #provider_list,
# [] #caid_list
# ));
def runNextScreen(session, screensToRun, *result):
if result:
enigma.quitMainloop(*result)
return
screen = screensToRun[0][1]
args = screensToRun[0][2:]
if screensToRun:
session.openWithCallback(boundFunction(runNextScreen, session, screensToRun[1:]), screen, *args)
else:
session.open(screen, *args)
config.misc.epgcache_filename.addNotifier(setEPGCachePath)
runNextScreen(session, screensToRun)
profile("Init:VolumeControl")
vol = VolumeControl(session)
profile("Init:PowerKey")
power = PowerKey(session)
# we need session.scart to access it from within menu.xml
session.scart = AutoScartControl(session)
profile("Init:Trashcan")
import Tools.Trashcan
Tools.Trashcan.init(session)
profile("RunReactor")
profile_final()
if getBoxType() == 'odinm7':
f = open("/dev/dbox/oled0", "w")
f.write('-E2-')
f.close()
runReactor()
config.misc.startCounter.save()
profile("wakeup")
from time import time, strftime, localtime
from Tools.StbHardware import setFPWakeuptime, getFPWakeuptime, setRTCtime
#get currentTime
nowTime = time()
wakeupList = [
x for x in ((session.nav.RecordTimer.getNextRecordingTime(), 0),
(session.nav.RecordTimer.getNextZapTime(isWakeup=True), 1),
(plugins.getNextWakeupTime(), 2))
if x[0] != -1
]
wakeupList.sort()
if wakeupList:
from time import strftime
startTime = wakeupList[0]
if (startTime[0] - nowTime) < 270: # no time to switch box back on
wptime = nowTime + 30 # so switch back on in 30 seconds
else:
wptime = startTime[0] - 240
if not config.misc.useTransponderTime.value:
print "dvb time sync disabled... so set RTC now to current linux time!", strftime("%Y/%m/%d %H:%M", localtime(nowTime))
setRTCtime(nowTime)
print "set wakeup time to", strftime("%Y/%m/%d %H:%M", localtime(wptime))
setFPWakeuptime(wptime)
profile("stopService")
session.nav.stopService()
profile("nav shutdown")
session.nav.shutdown()
profile("configfile.save")
configfile.save()
from Screens import InfoBarGenerics
InfoBarGenerics.saveResumePoints()
return 0
profile("Init:skin")
import skin
skin.loadSkinData(enigma.getDesktop(0))
profile("InputDevice")
import Components.InputDevice
Components.InputDevice.InitInputDevices()
import Components.InputHotplug
profile("SetupDevices")
import Components.SetupDevices
Components.SetupDevices.InitSetupDevices()
profile("AVSwitch")
import Components.AVSwitch
Components.AVSwitch.InitAVSwitch()
profile("RecordingConfig")
import Components.RecordingConfig
Components.RecordingConfig.InitRecordingConfig()
profile("UsageConfig")
import Components.UsageConfig
Components.UsageConfig.InitUsageConfig()
profile("keymapparser")
import keymapparser
keymapparser.readKeymap(config.usage.keymap.value)
profile("Network")
import Components.Network
Components.Network.InitNetwork()
profile("LCD")
import Components.Lcd
Components.Lcd.InitLcd()
profile("RFMod")
import Components.RFmod
Components.RFmod.InitRFmod()
profile("Init:CI")
import Screens.Ci
Screens.Ci.InitCiConfig()
profile("RcModel")
import Components.RcModel
#from enigma import dump_malloc_stats
#t = eTimer()
#t.callback.append(dump_malloc_stats)
#t.start(1000)
# first, setup a screen
try:
runScreenTest()
plugins.shutdown()
Components.ParentalControl.parentalControl.save()
except:
print 'EXCEPTION IN PYTHON STARTUP CODE:'
print '-'*60
print_exc(file=stdout)
enigma.quitMainloop(5)
print '-'*60
| gpl-2.0 |
hsundar/dendro | examples/src/drivers/dumpMesh.C | 8933 |
#include "mpi.h"
#include "petsc.h"
#include "sys.h"
#include "parUtils.h"
#include "TreeNode.h"
#include "oda.h"
#include <cstdlib>
#include "colors.h"
#include "externVars.h"
#include "dendro.h"
//Don't want time to be synchronized. Need to check load imbalance.
#ifdef MPI_WTIME_IS_GLOBAL
#undef MPI_WTIME_IS_GLOBAL
#endif
int main(int argc, char ** argv ) {
int size, rank;
char bFile[50];
DendroIntL locSz, totalSz;
PetscInitialize(&argc,&argv,0,NULL);
ot::RegisterEvents();
ot::DA_Initialize(MPI_COMM_WORLD);
if(argc < 2) {
std::cerr << "Usage: " << argv[0] << "inpfile " << std::endl;
return -1;
}
MPI_Comm_size(MPI_COMM_WORLD,&size);
MPI_Comm_rank(MPI_COMM_WORLD,&rank);
sprintf(bFile,"%s%d_%d.ot",argv[1],rank,size);
if(!rank){
std::cout << " reading "<<bFile<<std::endl; // Point size
}
std::vector<ot::TreeNode> balOct;
ot::readNodesFromFile (bFile,balOct);
MPI_Barrier(MPI_COMM_WORLD);
if(!rank){
std::cout << " finished reading "<<bFile<<std::endl; // Point size
}
// compute total inp size and output size
locSz = balOct.size();
par::Mpi_Reduce<DendroIntL>(&locSz, &totalSz, 1, MPI_SUM, 0, MPI_COMM_WORLD);
MPI_Barrier(MPI_COMM_WORLD);
if(!rank) {
std::cout << "# of Balanced Octants: "<< totalSz << std::endl;
}
//ODA ...
MPI_Barrier(MPI_COMM_WORLD);
assert(!(balOct.empty()));
ot::DA da(balOct,MPI_COMM_WORLD, MPI_COMM_WORLD, false,NULL,NULL);
balOct.clear();
MPI_Barrier(MPI_COMM_WORLD);
if(!rank) {
std::cout << "Finished Meshing "<< std::endl;
}
MPI_Barrier(MPI_COMM_WORLD);
unsigned int maxDepth = (da.getMaxDepth()-1);
//ComputeLocalToGlobalElemMappings
if( !(da.computedLocalToGlobalElems()) ) {
da.computeLocalToGlobalElemMappings();
}
MPI_Barrier(MPI_COMM_WORLD);
if(!rank) {
std::cout << "Computed Local To Global (Nodes) Maps "<< std::endl;
}
MPI_Barrier(MPI_COMM_WORLD);
//ComputeLocalToGlobalNodeMappings
if( !(da.computedLocalToGlobal()) ) {
da.computeLocalToGlobalMappings();
}
MPI_Barrier(MPI_COMM_WORLD);
if(!rank) {
std::cout << "Computed Local To Global (Elements) Maps "<< std::endl;
}
if(!rank) {
std::cout << "Dumping Mesh... "<< std::endl;
}
DendroIntL* localToGlobalMap = da.getLocalToGlobalMap();
DendroIntL* localToGlobalElemsMap = da.getLocalToGlobalElemsMap();
unsigned int localElemSize = da.getElementSize();
unsigned int localNodeSize = da.getNodeSize();
std::vector<char> nodeVisited;
da.createVector<char>(nodeVisited, false, false, 1);
//Initialize
for(unsigned int i = 0; i < nodeVisited.size(); i++) {
nodeVisited[i] = 0;
}
char* nodeVisitedBuffer = NULL;
da.vecGetBuffer<char>(nodeVisited, nodeVisitedBuffer, false, false, true, 1);
unsigned int idxElemBegin = da.getIdxElementBegin();
unsigned int idxPostGhostBegin = da.getIdxPostGhostBegin();
char nodeListFileName[100];
sprintf(nodeListFileName,"%s_NL_%d_%d.out",argv[1],rank,size);
FILE* outNodeListFile = fopen(nodeListFileName,"wb");
fwrite((&localNodeSize), sizeof(unsigned int), 1, outNodeListFile);
unsigned int nodeCnt = 0;
if(da.iAmActive()) {
for( da.init<ot::DA_FLAGS::ALL>();
da.curr() < da.end<ot::DA_FLAGS::ALL>();
da.next<ot::DA_FLAGS::ALL>() ) {
Point currPt = da.getCurrentOffset();
unsigned int Lev = da.getLevel(da.curr());
unsigned int xCurr = currPt.xint();
unsigned int yCurr = currPt.yint();
unsigned int zCurr = currPt.zint();
ot::TreeNode current(xCurr, yCurr, zCurr, Lev, 3, (maxDepth+1));
ot::TreeNode parent = current.getParent();
unsigned char hnType = da.getHangingNodeIndex(da.curr());
unsigned int xyz[8][3];
//node 0
if(hnType & (1 << 0)) {
xyz[0][0] = parent.minX();
xyz[0][1] = parent.minY();
xyz[0][2] = parent.minZ();
} else {
xyz[0][0] = current.minX();
xyz[0][1] = current.minY();
xyz[0][2] = current.minZ();
}
//node 1
if(hnType & (1 << 1)) {
xyz[1][0] = parent.maxX();
xyz[1][1] = parent.minY();
xyz[1][2] = parent.minZ();
} else {
xyz[1][0] = current.maxX();
xyz[1][1] = current.minY();
xyz[1][2] = current.minZ();
}
//node 2
if(hnType & (1 << 2)) {
xyz[2][0] = parent.minX();
xyz[2][1] = parent.maxY();
xyz[2][2] = parent.minZ();
} else {
xyz[2][0] = current.minX();
xyz[2][1] = current.maxY();
xyz[2][2] = current.minZ();
}
//node 3
if(hnType & (1 << 3)) {
xyz[3][0] = parent.maxX();
xyz[3][1] = parent.maxY();
xyz[3][2] = parent.minZ();
} else {
xyz[3][0] = current.maxX();
xyz[3][1] = current.maxY();
xyz[3][2] = current.minZ();
}
//node 4
if(hnType & (1 << 4)) {
xyz[4][0] = parent.minX();
xyz[4][1] = parent.minY();
xyz[4][2] = parent.maxZ();
} else {
xyz[4][0] = current.minX();
xyz[4][1] = current.minY();
xyz[4][2] = current.maxZ();
}
//node 5
if(hnType & (1 << 5)) {
xyz[5][0] = parent.maxX();
xyz[5][1] = parent.minY();
xyz[5][2] = parent.maxZ();
} else {
xyz[5][0] = current.maxX();
xyz[5][1] = current.minY();
xyz[5][2] = current.maxZ();
}
//node 6
if(hnType & (1 << 6)) {
xyz[6][0] = parent.minX();
xyz[6][1] = parent.maxY();
xyz[6][2] = parent.maxZ();
} else {
xyz[6][0] = current.minX();
xyz[6][1] = current.maxY();
xyz[6][2] = current.maxZ();
}
//node 7
if(hnType & (1 << 7)) {
xyz[7][0] = parent.maxX();
xyz[7][1] = parent.maxY();
xyz[7][2] = parent.maxZ();
} else {
xyz[7][0] = current.maxX();
xyz[7][1] = current.maxY();
xyz[7][2] = current.maxZ();
}
unsigned int indices[8];
da.getNodeIndices(indices);
for(unsigned int j = 0; j < 8; j++) {
if( (indices[j] >= idxElemBegin) && (indices[j] < idxPostGhostBegin) &&
(nodeVisitedBuffer[indices[j]] == 0) ) {
fwrite(xyz[j], sizeof(unsigned int), 3, outNodeListFile);
fwrite((&(localToGlobalMap[indices[j]])), sizeof(DendroIntL), 1, outNodeListFile);
nodeVisitedBuffer[indices[j]] = 1;
nodeCnt++;
}
}//end for j
}//end loop
}//end if active
da.vecRestoreBuffer<char>(nodeVisited, nodeVisitedBuffer, false, false, true, 1);
nodeVisited.clear();
assert(nodeCnt == localNodeSize);
fclose(outNodeListFile);
MPI_Barrier(MPI_COMM_WORLD);
if(!rank) {
std::cout<<"Finished Writing Node List."<<std::endl;
}
MPI_Barrier(MPI_COMM_WORLD);
char elemListFileName[100];
sprintf(elemListFileName,"%s_EL_%d_%d.out",argv[1],rank,size);
FILE* outElemListFile = fopen(elemListFileName,"wb");
fwrite(&maxDepth, sizeof(unsigned int), 1, outElemListFile);
fwrite(&localElemSize, sizeof(unsigned int), 1, outElemListFile);
unsigned int writableCnt = 0;
if(da.iAmActive()) {
for( da.init<ot::DA_FLAGS::WRITABLE>(); da.curr() < da.end<ot::DA_FLAGS::WRITABLE>(); da.next<ot::DA_FLAGS::WRITABLE>() ) {
Point currPt = da.getCurrentOffset();
DendroIntL xyzdi[5];
xyzdi[0] = currPt.xint();
xyzdi[1] = currPt.yint();
xyzdi[2] = currPt.zint();
xyzdi[3] = ( (da.getLevel(da.curr())) - 1 );
xyzdi[4] = localToGlobalElemsMap[da.curr()];
fwrite(xyzdi, sizeof(DendroIntL), 5, outElemListFile);
writableCnt++;
}
}
assert(writableCnt == localElemSize);
fclose(outElemListFile);
MPI_Barrier(MPI_COMM_WORLD);
if(!rank) {
std::cout<<"Finished Writing Element List."<<std::endl;
}
MPI_Barrier(MPI_COMM_WORLD);
char meshFileName[100];
sprintf(meshFileName,"%s_M_%d_%d.out",argv[1],rank,size);
FILE* outMeshFile = fopen(meshFileName,"wb");
fwrite(&localElemSize, sizeof(unsigned int), 1, outMeshFile);
if(da.iAmActive()) {
for( da.init<ot::DA_FLAGS::WRITABLE>();
da.curr() < da.end<ot::DA_FLAGS::WRITABLE>();
da.next<ot::DA_FLAGS::WRITABLE>() ) {
unsigned int indices[8];
da.getNodeIndices(indices);
DendroIntL record[9];
record[0] = localToGlobalElemsMap[da.curr()];
for(unsigned int j = 0; j < 8; j++) {
record[j+1] = localToGlobalMap[indices[j]];
}
fwrite(record, sizeof(DendroIntL), 9, outMeshFile);
writableCnt++;
}
}
fclose(outMeshFile);
MPI_Barrier(MPI_COMM_WORLD);
if(!rank) {
std::cout<<"Finished Dumping Mesh."<<std::endl;
}
MPI_Barrier(MPI_COMM_WORLD);
if (!rank) {
std::cout << GRN << "Finalizing PETSC" << NRM << std::endl;
}
ot::DA_Finalize();
PetscFinalize();
}//end function
| gpl-2.0 |
diedthreetimes/VCrash | .waf-1.6.7-0a94702c61504c487a251b8d0a04ca9a/waflib/Tools/c_config.py | 20820 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/svn/docs/wafbook/single.html#_obtaining_the_waf_file
import sys
if sys.hexversion < 0x020400f0: from sets import Set as set
import os,imp,sys,shlex,shutil
from waflib import Build,Utils,Configure,Task,Options,Logs,TaskGen,Errors,ConfigSet,Runner
from waflib.TaskGen import before_method,after_method,feature
from waflib.Configure import conf
WAF_CONFIG_H='config.h'
DEFKEYS='define_key'
INCKEYS='include_key'
cfg_ver={'atleast-version':'>=','exact-version':'==','max-version':'<=',}
SNIP_FUNCTION='''
int main() {
void *p;
p=(void*)(%s);
return 0;
}
'''
SNIP_TYPE='''
int main() {
if ((%(type_name)s *) 0) return 0;
if (sizeof (%(type_name)s)) return 0;
}
'''
SNIP_CLASS='''
int main() {
if (
}
'''
SNIP_EMPTY_PROGRAM='''
int main() {
return 0;
}
'''
SNIP_FIELD='''
int main() {
char *off;
off = (char*) &((%(type_name)s*)0)->%(field_name)s;
return (size_t) off < sizeof(%(type_name)s);
}
'''
MACRO_TO_DESTOS={'__linux__':'linux','__GNU__':'gnu','__FreeBSD__':'freebsd','__NetBSD__':'netbsd','__OpenBSD__':'openbsd','__sun':'sunos','__hpux':'hpux','__sgi':'irix','_AIX':'aix','__CYGWIN__':'cygwin','__MSYS__':'msys','_UWIN':'uwin','_WIN64':'win32','_WIN32':'win32','__POWERPC__':'powerpc','__QNX__':'qnx'}
MACRO_TO_DEST_CPU={'__x86_64__':'x86_64','__i386__':'x86','__ia64__':'ia','__mips__':'mips','__sparc__':'sparc','__alpha__':'alpha','__arm__':'arm','__hppa__':'hppa','__powerpc__':'powerpc',}
def parse_flags(self,line,uselib,env=None):
assert(isinstance(line,str))
env=env or self.env
app=env.append_value
appu=env.append_unique
lex=shlex.shlex(line,posix=False)
lex.whitespace_split=True
lex.commenters=''
lst=list(lex)
while lst:
x=lst.pop(0)
st=x[:2]
ot=x[2:]
if st=='-I'or st=='/I':
if not ot:ot=lst.pop(0)
appu('INCLUDES_'+uselib,[ot])
elif st=='-include':
tmp=[x,lst.pop(0)]
app('CFLAGS',tmp)
app('CXXFLAGS',tmp)
elif st=='-D'or(self.env.CXX_NAME=='msvc'and st=='/D'):
if not ot:ot=lst.pop(0)
app('DEFINES_'+uselib,[ot])
elif st=='-l':
if not ot:ot=lst.pop(0)
appu('LIB_'+uselib,[ot])
elif st=='-L':
if not ot:ot=lst.pop(0)
appu('LIBPATH_'+uselib,[ot])
elif x=='-pthread'or x.startswith('+')or x.startswith('-std'):
app('CFLAGS_'+uselib,[x])
app('CXXFLAGS_'+uselib,[x])
app('LINKFLAGS_'+uselib,[x])
elif x=='-framework':
appu('FRAMEWORK_'+uselib,[lst.pop(0)])
elif x.startswith('-F'):
appu('FRAMEWORKPATH_'+uselib,[x[2:]])
elif x.startswith('-Wl'):
app('LINKFLAGS_'+uselib,[x])
elif x.startswith('-m')or x.startswith('-f')or x.startswith('-dynamic'):
app('CFLAGS_'+uselib,[x])
app('CXXFLAGS_'+uselib,[x])
elif x.startswith('-arch')or x.startswith('-isysroot'):
tmp=[x,lst.pop(0)]
app('CFLAGS_'+uselib,tmp)
app('CXXFLAGS_'+uselib,tmp)
app('LINKFLAGS_'+uselib,tmp)
elif x.endswith('.a')or x.endswith('.so')or x.endswith('.dylib'):
appu('LINKFLAGS_'+uselib,[x])
def ret_msg(self,f,kw):
if isinstance(f,str):
return f
return f(kw)
def validate_cfg(self,kw):
if not'path'in kw:
if not self.env.PKGCONFIG:
self.find_program('pkg-config',var='PKGCONFIG')
kw['path']=self.env.PKGCONFIG
if'atleast_pkgconfig_version'in kw:
if not'msg'in kw:
kw['msg']='Checking for pkg-config version >= %r'%kw['atleast_pkgconfig_version']
return
if not'okmsg'in kw:
kw['okmsg']='yes'
if not'errmsg'in kw:
kw['errmsg']='not found'
if'modversion'in kw:
if not'msg'in kw:
kw['msg']='Checking for %r version'%kw['modversion']
return
for x in cfg_ver.keys():
y=x.replace('-','_')
if y in kw:
if not'package'in kw:
raise ValueError('%s requires a package'%x)
if not'msg'in kw:
kw['msg']='Checking for %r %s %s'%(kw['package'],cfg_ver[x],kw[y])
return
if not'msg'in kw:
kw['msg']='Checking for %r'%(kw['package']or kw['path'])
def exec_cfg(self,kw):
if'atleast_pkgconfig_version'in kw:
cmd=[kw['path'],'--atleast-pkgconfig-version=%s'%kw['atleast_pkgconfig_version']]
self.cmd_and_log(cmd)
if not'okmsg'in kw:
kw['okmsg']='yes'
return
for x in cfg_ver:
y=x.replace('-','_')
if y in kw:
self.cmd_and_log([kw['path'],'--%s=%s'%(x,kw[y]),kw['package']])
if not'okmsg'in kw:
kw['okmsg']='yes'
self.define(self.have_define(kw.get('uselib_store',kw['package'])),1,0)
break
if'modversion'in kw:
version=self.cmd_and_log([kw['path'],'--modversion',kw['modversion']]).strip()
self.define('%s_VERSION'%Utils.quote_define_name(kw.get('uselib_store',kw['modversion'])),version)
return version
lst=[kw['path']]
defi=kw.get('define_variable',None)
if not defi:
defi=self.env.PKG_CONFIG_DEFINES or{}
for key,val in defi.items():
lst.append('--define-variable=%s=%s'%(key,val))
if kw['package']:
lst.extend(Utils.to_list(kw['package']))
if'variables'in kw:
env=kw.get('env',self.env)
uselib=kw.get('uselib_store',kw['package'].upper())
vars=Utils.to_list(kw['variables'])
for v in vars:
val=self.cmd_and_log(lst+['--variable='+v]).strip()
var='%s_%s'%(uselib,v)
env[var]=val
if not'okmsg'in kw:
kw['okmsg']='yes'
return
if'args'in kw:
lst+=Utils.to_list(kw['args'])
ret=self.cmd_and_log(lst)
if not'okmsg'in kw:
kw['okmsg']='yes'
self.define(self.have_define(kw.get('uselib_store',kw['package'])),1,0)
self.parse_flags(ret,kw.get('uselib_store',kw['package'].upper()),kw.get('env',self.env))
return ret
def check_cfg(self,*k,**kw):
if k:
lst=k[0].split()
kw['package']=lst[0]
kw['args']=' '.join(lst[1:])
self.validate_cfg(kw)
if'msg'in kw:
self.start_msg(kw['msg'])
ret=None
try:
ret=self.exec_cfg(kw)
except self.errors.WafError ,e:
if'errmsg'in kw:
self.end_msg(kw['errmsg'],'YELLOW')
if Logs.verbose>1:
raise
else:
self.fatal('The configuration failed')
else:
kw['success']=ret
if'okmsg'in kw:
self.end_msg(self.ret_msg(kw['okmsg'],kw))
return ret
def validate_c(self,kw):
if not'env'in kw:
kw['env']=self.env.derive()
env=kw['env']
if not'compiler'in kw and not'features'in kw:
kw['compiler']='c'
if env['CXX_NAME']and Task.classes.get('cxx',None):
kw['compiler']='cxx'
if not self.env['CXX']:
self.fatal('a c++ compiler is required')
else:
if not self.env['CC']:
self.fatal('a c compiler is required')
if not'compile_mode'in kw:
kw['compile_mode']='c'
if'cxx'in Utils.to_list(kw.get('features',[]))or kw.get('compiler','')=='cxx':
kw['compile_mode']='cxx'
if not'type'in kw:
kw['type']='cprogram'
if not'features'in kw:
kw['features']=[kw['compile_mode'],kw['type']]
else:
kw['features']=Utils.to_list(kw['features'])
if not'compile_filename'in kw:
kw['compile_filename']='test.c'+((kw['compile_mode']=='cxx')and'pp'or'')
def to_header(dct):
if'header_name'in dct:
dct=Utils.to_list(dct['header_name'])
return''.join(['#include <%s>\n'%x for x in dct])
return''
if'framework_name'in kw:
fwkname=kw['framework_name']
if not'uselib_store'in kw:
kw['uselib_store']=fwkname.upper()
if not kw.get('no_header',False):
if not'header_name'in kw:
kw['header_name']=[]
fwk='%s/%s.h'%(fwkname,fwkname)
if kw.get('remove_dot_h',None):
fwk=fwk[:-2]
kw['header_name']=Utils.to_list(kw['header_name'])+[fwk]
kw['msg']='Checking for framework %s'%fwkname
kw['framework']=fwkname
if'function_name'in kw:
fu=kw['function_name']
if not'msg'in kw:
kw['msg']='Checking for function %s'%fu
kw['code']=to_header(kw)+SNIP_FUNCTION%fu
if not'uselib_store'in kw:
kw['uselib_store']=fu.upper()
if not'define_name'in kw:
kw['define_name']=self.have_define(fu)
elif'type_name'in kw:
tu=kw['type_name']
if not'header_name'in kw:
kw['header_name']='stdint.h'
if'field_name'in kw:
field=kw['field_name']
kw['code']=to_header(kw)+SNIP_FIELD%{'type_name':tu,'field_name':field}
if not'msg'in kw:
kw['msg']='Checking for field %s in %s'%(field,tu)
if not'define_name'in kw:
kw['define_name']=self.have_define((tu+'_'+field).upper())
else:
kw['code']=to_header(kw)+SNIP_TYPE%{'type_name':tu}
if not'msg'in kw:
kw['msg']='Checking for type %s'%tu
if not'define_name'in kw:
kw['define_name']=self.have_define(tu.upper())
elif'header_name'in kw:
if not'msg'in kw:
kw['msg']='Checking for header %s'%kw['header_name']
l=Utils.to_list(kw['header_name'])
assert len(l)>0,'list of headers in header_name is empty'
kw['code']=to_header(kw)+SNIP_EMPTY_PROGRAM
if not'uselib_store'in kw:
kw['uselib_store']=l[0].upper()
if not'define_name'in kw:
kw['define_name']=self.have_define(l[0])
if'lib'in kw:
if not'msg'in kw:
kw['msg']='Checking for library %s'%kw['lib']
if not'uselib_store'in kw:
kw['uselib_store']=kw['lib'].upper()
if'stlib'in kw:
if not'msg'in kw:
kw['msg']='Checking for static library %s'%kw['stlib']
if not'uselib_store'in kw:
kw['uselib_store']=kw['stlib'].upper()
if'fragment'in kw:
kw['code']=kw['fragment']
if not'msg'in kw:
kw['msg']='Checking for code snippet'
if not'errmsg'in kw:
kw['errmsg']='no'
for(flagsname,flagstype)in[('cxxflags','compiler'),('cflags','compiler'),('linkflags','linker')]:
if flagsname in kw:
if not'msg'in kw:
kw['msg']='Checking for %s flags %s'%(flagstype,kw[flagsname])
if not'errmsg'in kw:
kw['errmsg']='no'
if not'execute'in kw:
kw['execute']=False
if kw['execute']:
kw['features'].append('test_exec')
if not'errmsg'in kw:
kw['errmsg']='not found'
if not'okmsg'in kw:
kw['okmsg']='yes'
if not'code'in kw:
kw['code']=SNIP_EMPTY_PROGRAM
if self.env[INCKEYS]:
kw['code']='\n'.join(['#include <%s>'%x for x in self.env[INCKEYS]])+'\n'+kw['code']
if not kw.get('success'):kw['success']=None
if'define_name'in kw:
self.undefine(kw['define_name'])
assert'msg'in kw,'invalid parameters, read http://freehackers.org/~tnagy/wafbook/single.html#config_helpers_c'
def post_check(self,*k,**kw):
is_success=0
if kw['execute']:
if kw['success']is not None:
if kw.get('define_ret',False):
is_success=kw['success']
else:
is_success=(kw['success']==0)
else:
is_success=(kw['success']==0)
if'define_name'in kw:
if'header_name'in kw or'function_name'in kw or'type_name'in kw or'fragment'in kw:
nm=kw['define_name']
if kw['execute']and kw.get('define_ret',None)and isinstance(is_success,str):
self.define(kw['define_name'],is_success,quote=kw.get('quote',1))
else:
self.define_cond(kw['define_name'],is_success)
else:
self.define_cond(kw['define_name'],is_success)
if'header_name'in kw:
if kw.get('auto_add_header_name',False):
self.env.append_value(INCKEYS,Utils.to_list(kw['header_name']))
if is_success and'uselib_store'in kw:
from waflib.Tools import ccroot
_vars=set([])
for x in kw['features']:
if x in ccroot.USELIB_VARS:
_vars|=ccroot.USELIB_VARS[x]
for k in _vars:
lk=k.lower()
if k=='INCLUDES':lk='includes'
if k=='DEFINES':lk='defines'
if lk in kw:
val=kw[lk]
if isinstance(val,str):
val=val.rstrip(os.path.sep)
self.env.append_unique(k+'_'+kw['uselib_store'],val)
return is_success
def check(self,*k,**kw):
self.validate_c(kw)
self.start_msg(kw['msg'])
ret=None
try:
ret=self.run_c_code(*k,**kw)
except self.errors.ConfigurationError ,e:
self.end_msg(kw['errmsg'],'YELLOW')
if Logs.verbose>1:
raise
else:
self.fatal('The configuration failed')
else:
kw['success']=ret
self.end_msg(self.ret_msg(kw['okmsg'],kw))
ret=self.post_check(*k,**kw)
if not ret:
self.fatal('The configuration failed %r'%ret)
return ret
class test_exec(Task.Task):
color='PINK'
def run(self):
if getattr(self.generator,'rpath',None):
if getattr(self.generator,'define_ret',False):
self.generator.bld.retval=self.generator.bld.cmd_and_log([self.inputs[0].abspath()])
else:
self.generator.bld.retval=self.generator.bld.exec_command([self.inputs[0].abspath()])
else:
env=self.env.env or{}
env.update(dict(os.environ))
for var in('LD_LIBRARY_PATH','DYLD_LIBRARY_PATH','PATH'):
env[var]=self.inputs[0].parent.abspath()+os.path.pathsep+env.get(var,'')
if getattr(self.generator,'define_ret',False):
self.generator.bld.retval=self.generator.bld.cmd_and_log([self.inputs[0].abspath()],env=env)
else:
self.generator.bld.retval=self.generator.bld.exec_command([self.inputs[0].abspath()],env=env)
def test_exec_fun(self):
self.create_task('test_exec',self.link_task.outputs[0])
CACHE_RESULTS=1
COMPILE_ERRORS=2
def run_c_code(self,*k,**kw):
lst=[str(v)for(p,v)in kw.items()if p!='env']
h=Utils.h_list(lst)
dir=self.bldnode.abspath()+os.sep+(not Utils.is_win32 and'.'or'')+'conf_check_'+Utils.to_hex(h)
try:
os.makedirs(dir)
except:
pass
try:
os.stat(dir)
except:
self.fatal('cannot use the configuration test folder %r'%dir)
cachemode=getattr(Options.options,'confcache',None)
if cachemode==CACHE_RESULTS:
try:
proj=ConfigSet.ConfigSet(os.path.join(dir,'cache_run_c_code'))
ret=proj['cache_run_c_code']
except:
pass
else:
if isinstance(ret,str)and ret.startswith('Test does not build'):
self.fatal(ret)
return ret
bdir=os.path.join(dir,'testbuild')
if not os.path.exists(bdir):
os.makedirs(bdir)
self.test_bld=bld=Build.BuildContext(top_dir=dir,out_dir=bdir)
bld.init_dirs()
bld.progress_bar=0
bld.targets='*'
if kw['compile_filename']:
node=bld.srcnode.make_node(kw['compile_filename'])
node.write(kw['code'])
bld.logger=self.logger
bld.all_envs.update(self.all_envs)
bld.env=kw['env']
o=bld(features=kw['features'],source=kw['compile_filename'],target='testprog')
for k,v in kw.items():
setattr(o,k,v)
self.to_log("==>\n%s\n<=="%kw['code'])
bld.targets='*'
ret=-1
try:
try:
bld.compile()
except Errors.WafError:
ret='Test does not build: %s'%Utils.ex_stack()
self.fatal(ret)
else:
ret=getattr(bld,'retval',0)
finally:
proj=ConfigSet.ConfigSet()
proj['cache_run_c_code']=ret
proj.store(os.path.join(dir,'cache_run_c_code'))
return ret
def check_cxx(self,*k,**kw):
kw['compiler']='cxx'
return self.check(*k,**kw)
def check_cc(self,*k,**kw):
kw['compiler']='c'
return self.check(*k,**kw)
def define(self,key,val,quote=True):
assert key and isinstance(key,str)
if isinstance(val,int)or isinstance(val,float):
s='%s=%s'
else:
s=quote and'%s="%s"'or'%s=%s'
app=s%(key,str(val))
ban=key+'='
lst=self.env['DEFINES']
for x in lst:
if x.startswith(ban):
lst[lst.index(x)]=app
break
else:
self.env.append_value('DEFINES',app)
self.env.append_unique(DEFKEYS,key)
def undefine(self,key):
assert key and isinstance(key,str)
ban=key+'='
lst=[x for x in self.env['DEFINES']if not x.startswith(ban)]
self.env['DEFINES']=lst
self.env.append_unique(DEFKEYS,key)
def define_cond(self,key,val):
assert key and isinstance(key,str)
if val:
self.define(key,1)
else:
self.undefine(key)
def is_defined(self,key):
assert key and isinstance(key,str)
ban=key+'='
for x in self.env['DEFINES']:
if x.startswith(ban):
return True
return False
def get_define(self,key):
assert key and isinstance(key,str)
ban=key+'='
for x in self.env['DEFINES']:
if x.startswith(ban):
return x[len(ban):]
return None
def have_define(self,key):
return self.__dict__.get('HAVE_PAT','HAVE_%s')%Utils.quote_define_name(key)
def write_config_header(self,configfile='',guard='',top=False,env=None,defines=True,headers=False,remove=True):
if not configfile:configfile=WAF_CONFIG_H
waf_guard=guard or'_%s_WAF'%Utils.quote_define_name(configfile)
node=top and self.bldnode or self.path.get_bld()
node=node.make_node(configfile)
node.parent.mkdir()
lst=['/* WARNING! All changes made to this file will be lost! */\n']
lst.append('#ifndef %s\n#define %s\n'%(waf_guard,waf_guard))
lst.append(self.get_config_header(defines,headers))
lst.append('\n#endif /* %s */\n'%waf_guard)
node.write('\n'.join(lst))
env=env or self.env
env.append_unique(Build.CFG_FILES,[node.abspath()])
if remove:
for key in self.env[DEFKEYS]:
self.undefine(key)
self.env[DEFKEYS]=[]
def get_config_header(self,defines=True,headers=False):
lst=[]
if headers:
for x in self.env[INCKEYS]:
lst.append('#include <%s>'%x)
if defines:
for x in self.env[DEFKEYS]:
if self.is_defined(x):
val=self.get_define(x)
lst.append('#define %s %s'%(x,val))
else:
lst.append('/* #undef %s */'%x)
return"\n".join(lst)
def cc_add_flags(conf):
conf.add_os_flags('CPPFLAGS','CFLAGS')
conf.add_os_flags('CFLAGS')
def cxx_add_flags(conf):
conf.add_os_flags('CPPFLAGS','CXXFLAGS')
conf.add_os_flags('CXXFLAGS')
def link_add_flags(conf):
conf.add_os_flags('LINKFLAGS')
conf.add_os_flags('LDFLAGS','LINKFLAGS')
def cc_load_tools(conf):
if not conf.env.DEST_OS:
conf.env.DEST_OS=Utils.unversioned_sys_platform()
conf.load('c')
def cxx_load_tools(conf):
if not conf.env.DEST_OS:
conf.env.DEST_OS=Utils.unversioned_sys_platform()
conf.load('cxx')
def get_cc_version(conf,cc,gcc=False,icc=False):
cmd=cc+['-dM','-E','-']
try:
p=Utils.subprocess.Popen(cmd,stdin=Utils.subprocess.PIPE,stdout=Utils.subprocess.PIPE,stderr=Utils.subprocess.PIPE)
p.stdin.write('\n')
out=p.communicate()[0]
except:
conf.fatal('could not determine the compiler version %r'%cmd)
if not isinstance(out,str):
out=out.decode(sys.stdout.encoding)
if gcc:
if out.find('__INTEL_COMPILER')>=0:
conf.fatal('The intel compiler pretends to be gcc')
if out.find('__GNUC__')<0:
conf.fatal('Could not determine the compiler type')
if icc and out.find('__INTEL_COMPILER')<0:
conf.fatal('Not icc/icpc')
k={}
if icc or gcc:
out=out.split('\n')
import shlex
for line in out:
lst=shlex.split(line)
if len(lst)>2:
key=lst[1]
val=lst[2]
k[key]=val
def isD(var):
return var in k
def isT(var):
return var in k and k[var]!='0'
if not conf.env.DEST_OS:
conf.env.DEST_OS=''
for i in MACRO_TO_DESTOS:
if isD(i):
conf.env.DEST_OS=MACRO_TO_DESTOS[i]
break
else:
if isD('__APPLE__')and isD('__MACH__'):
conf.env.DEST_OS='darwin'
elif isD('__unix__'):
conf.env.DEST_OS='generic'
if isD('__ELF__'):
conf.env.DEST_BINFMT='elf'
elif isD('__WINNT__')or isD('__CYGWIN__'):
conf.env.DEST_BINFMT='pe'
conf.env.LIBDIR=conf.env['PREFIX']+'/bin'
elif isD('__APPLE__'):
conf.env.DEST_BINFMT='mac-o'
if not conf.env.DEST_BINFMT:
conf.env.DEST_BINFMT=Utils.destos_to_binfmt(conf.env.DEST_OS)
for i in MACRO_TO_DEST_CPU:
if isD(i):
conf.env.DEST_CPU=MACRO_TO_DEST_CPU[i]
break
Logs.debug('ccroot: dest platform: '+' '.join([conf.env[x]or'?'for x in('DEST_OS','DEST_BINFMT','DEST_CPU')]))
if icc:
ver=k['__INTEL_COMPILER']
conf.env['CC_VERSION']=(ver[:-2],ver[-2],ver[-1])
else:
conf.env['CC_VERSION']=(k['__GNUC__'],k['__GNUC_MINOR__'],k['__GNUC_PATCHLEVEL__'])
return k
def add_as_needed(self):
if self.env.DEST_BINFMT=='elf'and'gcc'in(self.env.CXX_NAME,self.env.CC_NAME):
self.env.append_unique('LINKFLAGS','--as-needed')
class cfgtask(Task.TaskBase):
def display(self):
return''
def runnable_status(self):
return Task.RUN_ME
def run(self):
conf=self.conf
bld=Build.BuildContext(top_dir=conf.srcnode.abspath(),out_dir=conf.bldnode.abspath())
bld.env=conf.env
bld.init_dirs()
bld.in_msg=1
bld.logger=self.logger
try:
bld.check(**self.args)
except:
return 1
def multicheck(self,*k,**kw):
self.start_msg(kw.get('msg','Executing %d configuration tests'%len(k)))
class par(object):
def __init__(self):
self.keep=False
self.cache_global=Options.cache_global
self.nocache=Options.options.nocache
self.returned_tasks=[]
def total(self):
return len(tasks)
def to_log(self,*k,**kw):
return
bld=par()
tasks=[]
for dct in k:
x=cfgtask(bld=bld)
tasks.append(x)
x.args=dct
x.bld=bld
x.conf=self
x.args=dct
x.logger=Logs.make_mem_logger(str(id(x)),self.logger)
def it():
yield tasks
while 1:
yield[]
p=Runner.Parallel(bld,Options.options.jobs)
p.biter=it()
p.start()
for x in tasks:
x.logger.memhandler.flush()
for x in tasks:
if x.hasrun!=Task.SUCCESS:
self.end_msg(kw.get('errmsg','no'),color='YELLOW')
self.fatal(kw.get('fatalmsg',None)or'One of the tests has failed, see the config.log for more information')
self.end_msg('ok')
conf(parse_flags)
conf(ret_msg)
conf(validate_cfg)
conf(exec_cfg)
conf(check_cfg)
conf(validate_c)
conf(post_check)
conf(check)
feature('test_exec')(test_exec_fun)
after_method('apply_link')(test_exec_fun)
conf(run_c_code)
conf(check_cxx)
conf(check_cc)
conf(define)
conf(undefine)
conf(define_cond)
conf(is_defined)
conf(get_define)
conf(have_define)
conf(write_config_header)
conf(get_config_header)
conf(cc_add_flags)
conf(cxx_add_flags)
conf(link_add_flags)
conf(cc_load_tools)
conf(cxx_load_tools)
conf(get_cc_version)
conf(add_as_needed)
conf(multicheck) | gpl-2.0 |
AdmireTheDistance/android_libcore | luni/src/main/java/java/nio/charset/CharsetEncoderICU.java | 9977 | /**
*******************************************************************************
* Copyright (C) 1996-2006, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*
*******************************************************************************
*/
/**
* A JNI interface for ICU converters.
*
*
* @author Ram Viswanadha, IBM
*/
package java.nio.charset;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.util.HashMap;
import java.util.Map;
import libcore.icu.ICU;
import libcore.icu.NativeConverter;
import libcore.util.EmptyArray;
final class CharsetEncoderICU extends CharsetEncoder {
private static final Map<String, byte[]> DEFAULT_REPLACEMENTS = new HashMap<String, byte[]>();
static {
// ICU has different default replacements to the RI in some cases. There are many
// additional cases, but this covers all the charsets that Java guarantees will be
// available, which is where compatibility seems most important. (The RI even uses
// the byte corresponding to '?' in ASCII as the replacement byte for charsets where that
// byte corresponds to an entirely different character.)
// It's odd that UTF-8 doesn't use U+FFFD, given that (unlike ISO-8859-1 and US-ASCII) it
// can represent it, but this is what the RI does...
byte[] questionMark = new byte[] { (byte) '?' };
DEFAULT_REPLACEMENTS.put("UTF-8", questionMark);
DEFAULT_REPLACEMENTS.put("ISO-8859-1", questionMark);
DEFAULT_REPLACEMENTS.put("US-ASCII", questionMark);
}
private static final int INPUT_OFFSET = 0;
private static final int OUTPUT_OFFSET = 1;
private static final int INVALID_CHAR_COUNT = 2;
/*
* data[INPUT_OFFSET] = on input contains the start of input and on output the number of input chars consumed
* data[OUTPUT_OFFSET] = on input contains the start of output and on output the number of output bytes written
* data[INVALID_CHARS] = number of invalid chars
*/
private int[] data = new int[3];
/* handle to the ICU converter that is opened */
private long converterHandle=0;
private char[] input = null;
private byte[] output = null;
private char[] allocatedInput = null;
private byte[] allocatedOutput = null;
// These instance variables are always assigned in the methods before being used. This class
// is inherently thread-unsafe so we don't have to worry about synchronization.
private int inEnd;
private int outEnd;
public static CharsetEncoderICU newInstance(Charset cs, String icuCanonicalName) {
// This complexity is necessary to ensure that even if the constructor, superclass
// constructor, or call to updateCallback throw, we still free the native peer.
long address = 0;
try {
address = NativeConverter.openConverter(icuCanonicalName);
float averageBytesPerChar = NativeConverter.getAveBytesPerChar(address);
float maxBytesPerChar = NativeConverter.getMaxBytesPerChar(address);
byte[] replacement = makeReplacement(icuCanonicalName, address);
CharsetEncoderICU result = new CharsetEncoderICU(cs, averageBytesPerChar, maxBytesPerChar, replacement, address);
address = 0; // CharsetEncoderICU has taken ownership; its finalizer will do the free.
return result;
} finally {
if (address != 0) {
NativeConverter.closeConverter(address);
}
}
}
private static byte[] makeReplacement(String icuCanonicalName, long address) {
// We have our own map of RI-compatible default replacements (where ICU disagrees)...
byte[] replacement = DEFAULT_REPLACEMENTS.get(icuCanonicalName);
if (replacement != null) {
return replacement.clone();
}
// ...but fall back to asking ICU.
return NativeConverter.getSubstitutionBytes(address);
}
private CharsetEncoderICU(Charset cs, float averageBytesPerChar, float maxBytesPerChar, byte[] replacement, long address) {
super(cs, averageBytesPerChar, maxBytesPerChar, replacement, true);
// Our native peer needs to know what just happened...
this.converterHandle = address;
updateCallback();
}
@Override protected void implReplaceWith(byte[] newReplacement) {
updateCallback();
}
@Override protected void implOnMalformedInput(CodingErrorAction newAction) {
updateCallback();
}
@Override protected void implOnUnmappableCharacter(CodingErrorAction newAction) {
updateCallback();
}
private void updateCallback() {
NativeConverter.setCallbackEncode(converterHandle, this);
}
@Override protected void implReset() {
NativeConverter.resetCharToByte(converterHandle);
data[INPUT_OFFSET] = 0;
data[OUTPUT_OFFSET] = 0;
data[INVALID_CHAR_COUNT] = 0;
output = null;
input = null;
allocatedInput = null;
allocatedOutput = null;
inEnd = 0;
outEnd = 0;
}
@Override protected CoderResult implFlush(ByteBuffer out) {
try {
// ICU needs to see an empty input.
input = EmptyArray.CHAR;
inEnd = 0;
data[INPUT_OFFSET] = 0;
data[OUTPUT_OFFSET] = getArray(out);
data[INVALID_CHAR_COUNT] = 0; // Make sure we don't see earlier errors.
int error = NativeConverter.encode(converterHandle, input, inEnd, output, outEnd, data, true);
if (ICU.U_FAILURE(error)) {
if (error == ICU.U_BUFFER_OVERFLOW_ERROR) {
return CoderResult.OVERFLOW;
} else if (error == ICU.U_TRUNCATED_CHAR_FOUND) {
if (data[INVALID_CHAR_COUNT] > 0) {
return CoderResult.malformedForLength(data[INVALID_CHAR_COUNT]);
}
}
}
return CoderResult.UNDERFLOW;
} finally {
setPosition(out);
implReset();
}
}
@Override protected CoderResult encodeLoop(CharBuffer in, ByteBuffer out) {
if (!in.hasRemaining()) {
return CoderResult.UNDERFLOW;
}
data[INPUT_OFFSET] = getArray(in);
data[OUTPUT_OFFSET]= getArray(out);
data[INVALID_CHAR_COUNT] = 0; // Make sure we don't see earlier errors.
try {
int error = NativeConverter.encode(converterHandle, input, inEnd, output, outEnd, data, false);
if (ICU.U_FAILURE(error)) {
if (error == ICU.U_BUFFER_OVERFLOW_ERROR) {
return CoderResult.OVERFLOW;
} else if (error == ICU.U_INVALID_CHAR_FOUND) {
return CoderResult.unmappableForLength(data[INVALID_CHAR_COUNT]);
} else if (error == ICU.U_ILLEGAL_CHAR_FOUND) {
return CoderResult.malformedForLength(data[INVALID_CHAR_COUNT]);
} else {
throw new AssertionError(error);
}
}
// Decoding succeeded: give us more data.
return CoderResult.UNDERFLOW;
} finally {
setPosition(in);
setPosition(out);
}
}
@Override protected void finalize() throws Throwable {
try {
NativeConverter.closeConverter(converterHandle);
converterHandle=0;
} finally {
super.finalize();
}
}
private int getArray(ByteBuffer out) {
if (out.hasArray()) {
output = out.array();
outEnd = out.arrayOffset() + out.limit();
return out.arrayOffset() + out.position();
} else {
outEnd = out.remaining();
if (allocatedOutput == null || outEnd > allocatedOutput.length) {
allocatedOutput = new byte[outEnd];
}
// The array's start position is 0
output = allocatedOutput;
return 0;
}
}
private int getArray(CharBuffer in) {
if (in.hasArray()) {
input = in.array();
inEnd = in.arrayOffset() + in.limit();
return in.arrayOffset() + in.position();
} else {
inEnd = in.remaining();
if (allocatedInput == null || inEnd > allocatedInput.length) {
allocatedInput = new char[inEnd];
}
// Copy the input buffer into the allocated array.
int pos = in.position();
in.get(allocatedInput, 0, inEnd);
in.position(pos);
// The array's start position is 0
input = allocatedInput;
return 0;
}
}
private void setPosition(ByteBuffer out) {
if (out.hasArray()) {
out.position(data[OUTPUT_OFFSET] - out.arrayOffset());
} else {
out.put(output, 0, data[OUTPUT_OFFSET]);
}
// release reference to output array, which may not be ours
output = null;
}
private void setPosition(CharBuffer in) {
int position = in.position() + data[INPUT_OFFSET] - data[INVALID_CHAR_COUNT];
if (position < 0) {
// The calculated position might be negative if we encountered an
// invalid char that spanned input buffers. We adjust it to 0 in this case.
//
// NOTE: The API doesn't allow us to adjust the position of the previous
// input buffer. (Doing that wouldn't serve any useful purpose anyway.)
position = 0;
}
in.position(position);
// release reference to input array, which may not be ours
input = null;
}
}
| gpl-2.0 |
Wisling/tibiaauto-pub | tibiaauto-kernel/tibiaauto_util/ModuleUtil.h | 3782 | #pragma once
#include "tibiaauto_util.h"
#include "InstallPath.h"
#include <cstdint>
#include <memory>
#include <queue>
using namespace std;
class CTibiaItem;
class CTibiaList;
enum StepDirsEnum
{
STEP_NULL = 0,
STEP_EAST = 1,
STEP_NORTHEAST = 2,
STEP_NORTH = 3,
STEP_NORTHWEST = 4,
STEP_WEST = 5,
STEP_SOUTHWEST = 6,
STEP_SOUTH = 7,
STEP_SOUTHEAST = 8,
STEP_UPSTAIRS = 0x10,
STEP_DOWNSTAIRS = 0x20,
STEP_TELEPORT = 0x30,
STEP_USABLE_TELEPORT = 0x40
};
class TIBIAAUTOUTIL_API CModuleUtil
{
public:
static int randomFormula(int average, int halfrange);
static int randomFormula(int average, int halfrange, int cutoff);
static int randomFormula(int average, int halfrange, int minR, int maxR);
static int waitForHpManaIncrease(int oldHp, int oldMana);
static int waitForManaDecrease(int oldMana);
static int waitForCapsChange(float origCaps);
static int waitForItemChange(int locationAddress, int origItemId);
static int waitForItemChange(int contNr, int slotNr, int origItemId, int quantity);
static int waitForItemsInsideChange(int contNr, int origItemsCount);
static int waitForItemsInsideChange(int contNr, int origItemSlot, int origItemQuantity, int origItemsCount);
static CTibiaItem * lookupItem(int containerNr, CUIntArray *itemsAccepted);
static CTibiaItem * lookupItem(int containerNr, CUIntArray *itemsAccepted, int qty);
static int findFreeSpace(int &x, int &y, int z, int r = 1);
static struct point findPathOnMap(int startX, int startY, int startZ, int endX, int endY, int endZ, int endSpecialLocation, uint8_t path[15], int radius = 1);
static void executeWalk(int startX, int startY, int startZ, uint8_t path[15]);
static void lootItemFromContainer(int conTNr, CUIntArray *acceptedItems, int ignoreCont1 = -1, int ignoreCont2 = -1);
static int lootItemFromSpecifiedContainer(int containerNr, CUIntArray *acceptedItems, int containerCarrying);
static int lootItemsToSpecifiedContainers(int containerNr, CUIntArray *acceptedItems, int carriedContainers);
static void eatItemFromContainer(int contNr);
static int waitForOpenContainer(int contNr, int open);
static void sleepWithStop(int ms, int *stopFlag);
static int waitForCreatureDisappear(int x, int y, int tibiaId);
static int waitForCreatureDisappear(int creatureNr);
static int waitToApproachSquare(int x, int y);
static int waitToStandOnSquare(int x, int y);
static int waitForCreatureDisappear(int x, int y, int tibiaId, int &, int &);
static int calcLootChecksum(time_t tm, int killNr, int nameLen, int itemNr, int objectId, int qty, int lootInBags, int creatX, int creatY, int creatZ);
static void prepareProhPointList();
static void findPathAllDirection(queue<point> &pointsToAdd, int x, int y, int z);
static int findNextClosedContainer(int afterCont = -1);
static void masterDebug(const char* fname, const char* buf1 = "", const char* buf2 = "", const char* buf3 = "", const char* buf4 = "", const char* buf5 = "", const char* buf6 = "");
static void getInstallPath(char* path);
static void setTASetting(const char* name, int value);
static int getTASetting(const char* name);
static struct point GetPathTab(int);
static int GetPathTabCount(void);
static int RegexMatch(char *string, char *regex);
private:
static int AStarFindPath(int closerEnd, int pathFindX, int pathFindY, int radius, int pathFindZ, point &endPoint, int endSpecialLocation, int startX, int startY, int startZ);
static struct point AStarRetrievePath(int gotToEndPoint, point &endPoint, int startX, int startY, int startZ, uint8_t * path, int endX, int endY, int endZ);
static void findPathOnMapProcessPoint(queue<point> &pointsToAdd, int prevX, int prevY, int prevZ, int newX, int newY, int newZ);
CModuleUtil();
virtual ~CModuleUtil();
};
| gpl-2.0 |
liuy/sheepdog-ng | sheep/cluster.h | 5870 | /*
* Copyright (C) 2011 Nippon Telegraph and Telephone Corporation.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version
* 2 as published by the Free Software Foundation.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __CLUSTER_H__
#define __CLUSTER_H__
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <inttypes.h>
#include <arpa/inet.h>
#include <memory.h>
#include "sheepdog_proto.h"
#include "sheep_priv.h"
#include "sheep.h"
#include "config.h"
#include "common.h"
/*
* maximum payload size sent in ->notify and ->unblock, it should be large
* enough to support COROSYNC_MAX_NODES * struct sd_node
*/
#define SD_MAX_EVENT_BUF_SIZE (128 * 1024) /* 128k */
struct cluster_driver {
const char *name;
/*
* Initialize the cluster driver
*
* Returns zero on success, -1 on error.
*/
int (*init)(const char *option);
/*
* Get a node ID for this sheep.
*
* Gets and ID that is used in all communication with other sheep,
* which normally would be a string formatted IP address.
*
* Returns zero on success, -1 on error.
*/
int (*get_local_addr)(uint8_t *myaddr);
uint8_t (*block_event_number)(void);
/*
* Join the cluster
*
* This function is used to join the cluster, and notifies a join
* event to all the nodes. The copy of 'opaque' is passed to
* sd_join_handler() and sd_accept_handler().
*
* sd_join_handler() must be called on at least one node which already
* participates in the cluster. If the content of 'opaque' is changed in
* sd_join_handler(), the updated 'opaque' must be passed to
* sd_accept_handler().
*
* Returns zero on success, -1 on error
*/
int (*join)(const struct sd_node *myself, void *opaque,
size_t opaque_len);
/*
* Leave the cluster
*
* This function is used to leave the cluster, and notifies a
* leave event to all the nodes. The cluster driver calls event
* handlers even after this function is called, so the left node can
* work as a gateway.
*
* Returns zero on success, -1 on error
*/
int (*leave)(void);
/*
* Notify a message to all nodes in the cluster
*
* This function sends 'msg' to all the nodes. The notified messages
* can be read through sd_notify_handler() and totally ordered with
* node change events.
*
* Returns SD_RES_XXX
*/
int (*notify)(void *msg, size_t msg_len);
/*
* Send a message to all nodes to block further events.
*
* Once the cluster driver has ensured that events are blocked on all
* nodes it needs to call sd_block_handler() on the node where ->block
* was called.
*
* Returns SD_RES_XXX
*/
int (*block)(void);
/*
* Unblock events on all nodes, and send a total order message
* to all nodes.
*
* Returns SD_RES_XXX
*/
int (*unblock)(void *msg, size_t msg_len);
/*
* Acquire the distributed lock.
*
* Create a distributed mutually exclusive lock to avoid race condition
* and try to acquire the lock.
*
* This function use 'lock_id' as the id of this distributed lock.
* A thread can acquire many locks with different lock_id in one
* sheep daemon.
*
* The cluster lock referenced by 'lock' shall be locked by calling
* cluster->lock(). If the cluster lock is already locked, the calling
* thread shall block until the cluster lock becomes available.
*/
void (*lock)(uint64_t lock_id);
/*
* Release the distributed lock.
*
* If the owner of the cluster lock release it (or the owner is
* killed by accident), zookeeper will trigger zk_watch() which will
* wake up all waiting threads to compete new owner of the lock
*
* After all thread unlock, all the resource of this distributed lock
* will be released.
*/
void (*unlock)(uint64_t lock_id);
/*
* Update the specific node in the driver's private copy of nodes
*
* Returns SD_RES_XXX
*/
int (*update_node)(struct sd_node *);
struct list_node list;
};
extern struct list_head cluster_drivers;
#ifdef HAVE_COROSYNC
#define DEFAULT_CLUSTER_DRIVER "corosync"
#else
#define DEFAULT_CLUSTER_DRIVER "local"
#endif /* HAVE_COROSYNC */
#define cdrv_register(driver) \
static void __attribute__((constructor)) regist_ ## driver(void) \
{ \
if (!driver.init || !driver.join || !driver.leave || !driver.notify) \
panic("the driver '%s' is incomplete", driver.name); \
list_add(&driver.list, &cluster_drivers); \
}
#define FOR_EACH_CLUSTER_DRIVER(driver) \
list_for_each_entry(driver, &cluster_drivers, list)
static inline struct cluster_driver *find_cdrv(const char *name)
{
struct cluster_driver *cdrv;
int len;
FOR_EACH_CLUSTER_DRIVER(cdrv) {
len = strlen(cdrv->name);
if (strncmp(cdrv->name, name, len) == 0 &&
(name[len] == ':' || name[len] == '\0'))
return cdrv;
}
return NULL;
}
static inline const char *get_cdrv_option(const struct cluster_driver *cdrv,
const char *arg)
{
int len = strlen(cdrv->name);
if (arg[len] == ':')
return strdup(arg + len + 1);
else
return NULL;
}
/* callbacks back into sheepdog from the cluster drivers */
void sd_accept_handler(const struct sd_node *joined,
const struct rb_root *nroot, size_t nr_members,
const void *opaque);
void sd_leave_handler(const struct sd_node *left, const struct rb_root *nroot,
size_t nr_members);
void sd_notify_handler(const struct sd_node *sender, void *msg, size_t msg_len);
bool sd_block_handler(const struct sd_node *sender);
int sd_reconnect_handler(void);
void sd_update_node_handler(struct sd_node *, struct rb_root *);
bool sd_join_handler(const struct sd_node *joining,
const struct rb_root *nroot, size_t nr_nodes,
void *opaque);
#endif
| gpl-2.0 |
sukutforum/phpBB-3.1-Social-Media-Buttons | language/fa/info_acp_socialmedia.php | 1196 | <?php
/**
*
* @package phpBB Extension - tas2580 Social Media Buttons
* @copyright (c) 2014 tas2580 (https://tas2580.net)
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
* Perisan Translator: Meis@M noubari from php-bb.ir
*
*/
/**
* DO NOT CHANGE
*/
if (!defined('IN_PHPBB'))
{
exit;
}
if (empty($lang) || !is_array($lang))
{
$lang = array();
}
// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
//
// Some characters you may want to copy&paste:
// ’ » “ ” …
//
$lang = array_merge($lang, array(
'ACP_SOCIALBUTTONS_TITLE' => 'دکمه های رسانه های اجتماعی',
));
| gpl-2.0 |
FelixNong1990/andy | wp-content/themes/BUZZBLOG-theme/includes/post-formats/post-thumb.php | 1297 | <?php if(!is_singular()) : ?>
<?php $post_image_size = of_get_option('post_image_size'); ?>
<?php if($post_image_size=='' || $post_image_size=='normal'){ ?>
<?php if(has_post_thumbnail()) { ?>
<div class="featured-thumbnail thumbnail norm"><a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a></div>
<?php } ?>
<?php } else { ?>
<?php if(has_post_thumbnail()) { ?>
<figure class="featured-thumbnail thumbnail large">
<div class="hider-page"></div>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php the_post_thumbnail( 'standard-large' ); ?>
</a>
</figure>
<?php } ?>
<?php } ?>
<?php else :?>
<?php $single_image_size = of_get_option('single_image_size'); ?>
<?php if ($single_image_size == '' || $single_image_size == 'normal'){ ?>
<?php if(has_post_thumbnail()) { ?>
<div class="featured-thumbnail thumbnail norm"><?php the_post_thumbnail('medium'); ?></div>
<?php } ?>
<?php } else { ?>
<?php if(has_post_thumbnail()) { ?>
<figure class="featured-thumbnail thumbnail large">
<div class="hider-page"></div>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php the_post_thumbnail( 'standard-large' ); ?>
</a>
</figure>
<?php } ?>
<?php } ?>
<?php endif; ?> | gpl-2.0 |
smilykoch/SteadyBeam | project/4g/net/vnstat/Makefile | 2928 | #
# Copyright (C) 2006-2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=vnstat
PKG_VERSION:=1.11
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://humdi.net/vnstat
PKG_MD5SUM:=a5a113f9176cd61fb954f2ba297f5fdb
PKG_INSTALL:=1
PKG_BUILD_DEPENDS:=libgd
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/vnstat/Default
SECTION:=net
CATEGORY:=Network
URL:=http://humdi.net/vnstat/
endef
define Package/vnstat
$(call Package/vnstat/Default)
TITLE:=Console-based network traffic monitor
endef
define Package/vnstat/description
vnStat is a network traffic monitor for Linux that keeps a log of daily
network traffic for the selected interface(s). vnStat isn't a packet
sniffer. The traffic information is analyzed from the /proc -filesystem,
so vnStat can be used without root permissions.
endef
define Package/vnstati
$(call Package/vnstat/Default)
DEPENDS+=vnstat +libgd
TITLE:=PNG image output support for vnStat
endef
define Package/vnstati/description
The purpose of vnstati is to provide image output support for statistics
collected using vnstat(1). However, the image file format is limited to
png. All basic outputs of vnStat are supported excluding live traffic
features. The image can be outputted either to a file or to standard
output.
endef
define Package/vnstat/conffiles
/etc/vnstat.conf
/etc/config/vnstat
endef
define Build/Compile/vnstat
$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)"
endef
define Build/Compile/vnstati
$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
LDFLAGS="$(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib" \
all
endef
define Build/Compile
$(call Build/Compile/vnstat)
$(call Build/Compile/vnstati)
endef
define Package/vnstat/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/vnstat $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/sbin
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/vnstatd $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc
$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/vnstat.conf $(1)/etc/
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/vnstat.config $(1)/etc/config/vnstat
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/vnstat.init $(1)/etc/init.d/vnstat
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) ./files/vnstat.defaults $(1)/etc/uci-defaults/vnstat
endef
define Package/vnstati/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/vnstati $(1)/usr/bin/
endef
define Package/vnstat/postinst
#!/bin/sh
[ -n "$${IPKG_INSTROOT}" ] || (. /etc/uci-defaults/vnstat) && rm -f /etc/uci-defaults/vnstat
exit 0
endef
$(eval $(call BuildPackage,vnstat))
$(eval $(call BuildPackage,vnstati))
| gpl-2.0 |
kldxzzhc2/KLDXZZHC_TRINITY_CORE | src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp | 6405 | /*
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Boss_Talon_King_Ikiss
SD%Complete: 80
SDComment: Heroic supported. Some details missing, but most are spell related.
SDCategory: Auchindoun, Sethekk Halls
EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "sethekk_halls.h"
enum Says
{
SAY_INTRO = 0,
SAY_AGGRO = 1,
SAY_SLAY = 2,
SAY_DEATH = 3,
EMOTE_ARCANE_EXP = 4
};
enum Spells
{
SPELL_BLINK = 38194,
SPELL_BLINK_TELEPORT = 38203,
SPELL_MANA_SHIELD = 38151,
SPELL_ARCANE_BUBBLE = 9438,
H_SPELL_SLOW = 35032,
SPELL_POLYMORPH = 38245,
H_SPELL_POLYMORPH = 43309,
SPELL_ARCANE_VOLLEY = 35059,
H_SPELL_ARCANE_VOLLEY = 40424,
SPELL_ARCANE_EXPLOSION = 38197,
H_SPELL_ARCANE_EXPLOSION = 40425
};
class boss_talon_king_ikiss : public CreatureScript
{
public:
boss_talon_king_ikiss() : CreatureScript("boss_talon_king_ikiss") { }
struct boss_talon_king_ikissAI : public BossAI
{
boss_talon_king_ikissAI(Creature* creature) : BossAI(creature, DATA_TALON_KING_IKISS) { }
void Reset() override
{
_Reset();
ArcaneVolley_Timer = 5000;
Sheep_Timer = 8000;
Blink_Timer = 35000;
Slow_Timer = 15000 + rand32() % 15000;
Blink = false;
Intro = false;
ManaShield = false;
}
void MoveInLineOfSight(Unit* who) override
{
if (!me->GetVictim() && me->CanCreatureAttack(who))
{
if (!Intro && me->IsWithinDistInMap(who, 100))
{
Intro = true;
Talk(SAY_INTRO);
}
if (!me->CanFly() && me->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE)
return;
float attackRadius = me->GetAttackDistance(who);
if (me->IsWithinDistInMap(who, attackRadius) && me->IsWithinLOSInMap(who))
{
//who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
AttackStart(who);
}
}
}
void EnterCombat(Unit* /*who*/) override
{
_EnterCombat();
Talk(SAY_AGGRO);
}
void JustDied(Unit* /*killer*/) override
{
_JustDied();
Talk(SAY_DEATH);
}
void KilledUnit(Unit* who) override
{
if (who->GetTypeId() == TYPEID_PLAYER)
Talk(SAY_SLAY);
}
void UpdateAI(uint32 diff) override
{
if (!UpdateVictim())
return;
if (Blink)
{
DoCast(me, SPELL_ARCANE_EXPLOSION);
DoCast(me, SPELL_ARCANE_BUBBLE, true);
Blink = false;
}
if (ArcaneVolley_Timer <= diff)
{
DoCast(me, SPELL_ARCANE_VOLLEY);
ArcaneVolley_Timer = 7000 + rand32() % 5000;
} else ArcaneVolley_Timer -= diff;
if (Sheep_Timer <= diff)
{
Unit* target;
//second top aggro target in normal, random target in heroic correct?
if (IsHeroic())
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
else
target = SelectTarget(SELECT_TARGET_TOPAGGRO, 1);
if (target)
DoCast(target, SPELL_POLYMORPH);
Sheep_Timer = 15000 + rand32() % 2500;
} else Sheep_Timer -= diff;
//may not be correct time to cast
if (!ManaShield && HealthBelowPct(20))
{
DoCast(me, SPELL_MANA_SHIELD);
ManaShield = true;
}
if (IsHeroic())
{
if (Slow_Timer <= diff)
{
DoCast(me, H_SPELL_SLOW);
Slow_Timer = 15000 + rand32() % 25000;
} else Slow_Timer -= diff;
}
if (Blink_Timer <= diff)
{
Talk(EMOTE_ARCANE_EXP);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
if (me->IsNonMeleeSpellCast(false))
me->InterruptNonMeleeSpells(false);
//Spell doesn't work, but we use for visual effect at least
DoCast(target, SPELL_BLINK);
float X = target->GetPositionX();
float Y = target->GetPositionY();
float Z = target->GetPositionZ();
DoTeleportTo(X, Y, Z);
DoCast(target, SPELL_BLINK_TELEPORT);
Blink = true;
}
Blink_Timer = 35000 + rand32() % 5000;
} else Blink_Timer -= diff;
if (!Blink)
DoMeleeAttackIfReady();
}
private:
uint32 ArcaneVolley_Timer;
uint32 Sheep_Timer;
uint32 Blink_Timer;
uint32 Slow_Timer;
bool ManaShield;
bool Blink;
bool Intro;
};
CreatureAI* GetAI(Creature* creature) const override
{
return GetSethekkHallsAI<boss_talon_king_ikissAI>(creature);
}
};
void AddSC_boss_talon_king_ikiss()
{
new boss_talon_king_ikiss();
}
| gpl-2.0 |
CFDEMproject/OpenFOAM-1.6-ext | src/finiteArea/fields/faePatchFields/constraint/cyclic/cyclicFaePatchFields.C | 1713 | /*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright held by original author
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include "cyclicFaePatchFields.H"
#include "faePatchFields.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
makeFaePatchFields(cyclic);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //
| gpl-2.0 |
dameiss/wireshark-aeron | ui/qt/lbm_uimflow_dialog.h | 3474 | /* lbm_uimflow_dialog.h
*
* Copyright (c) 2005-2014 Informatica Corporation. All Rights Reserved.
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <[email protected]>
* Copyright 1998 Gerald Combs
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef LBM_UIMFLOW_DIALOG_H
#define LBM_UIMFLOW_DIALOG_H
#include "config.h"
#include <glib.h>
#include "cfile.h"
#include "epan/packet.h"
#include "ui/tap-sequence-analysis.h"
#include "sequence_diagram.h"
#include <QDialog>
#include <QMenu>
namespace Ui
{
class LBMUIMFlowDialog;
}
class LBMUIMFlowDialog : public QDialog
{
Q_OBJECT
public:
explicit LBMUIMFlowDialog(QWidget * parent = 0, capture_file * cfile = NULL);
~LBMUIMFlowDialog(void);
signals:
void goToPacket(int packet_number);
public slots:
void setCaptureFile(capture_file * CaptureFile);
protected:
void showEvent(QShowEvent * event);
void resizeEvent(QResizeEvent * event);
void keyPressEvent(QKeyEvent * event);
void mouseReleaseEvent(QMouseEvent * event);
private slots:
void hScrollBarChanged(int value);
void vScrollBarChanged(int value);
void xAxisChanged(QCPRange range);
void yAxisChanged(QCPRange range);
void diagramClicked(QMouseEvent * event);
void mouseMoved(QMouseEvent * event);
void mouseReleased(QMouseEvent * event);
void on_buttonBox_accepted(void);
void on_resetButton_clicked(void);
void on_actionGoToPacket_triggered(void);
void on_showComboBox_currentIndexChanged(int index);
void on_actionReset_triggered(void);
void on_actionMoveRight10_triggered(void);
void on_actionMoveLeft10_triggered(void);
void on_actionMoveUp10_triggered(void);
void on_actionMoveDown10_triggered(void);
void on_actionMoveRight1_triggered(void);
void on_actionMoveLeft1_triggered(void);
void on_actionMoveUp1_triggered(void);
void on_actionMoveDown1_triggered(void);
private:
Ui::LBMUIMFlowDialog * m_ui;
SequenceDiagram * m_sequence_diagram;
capture_file * m_capture_file;
seq_analysis_info_t m_sequence_analysis;
int m_num_items;
guint32 m_packet_num;
double m_one_em;
int m_node_label_width;
QMenu m_context_menu;
void fillDiagram(void);
void panAxes(int x_pixels, int y_pixels);
void resetAxes(bool keep_lower = false);
};
#endif
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*
* Local variables:
* c-basic-offset: 4
* tab-width: 4
* indent-tabs-mode: nil
* End:
*
* vi: set shiftwidth=4 tabstop=4 expandtab:
* :indentSize=4:tabSize=4:noTabs=true:
*/
| gpl-2.0 |
mchibouni/wp_classified_ad_poc | wp-content/themes/sommerce/woocommerce/single-product/product-thumbnails.php | 1064 | <?php
/**
* Single Product Thumbnails
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 1.6.4
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
global $post, $product, $woocommerce;
?>
<div class="thumbnails"><?php
$attachment_ids = $product->get_gallery_attachment_ids();
if ( $attachment_ids ) {
$loop = 0;
$columns = apply_filters( 'woocommerce_product_thumbnails_columns', 3 );
foreach ( $attachment_ids as $id ) {
$classes = array( 'zoom' );
if ( $loop == 0 || $loop % $columns == 0 )
$classes[] = 'first';
if ( ( $loop + 1 ) % $columns == 0 )
$classes[] = 'last';
$attachment_url = wp_get_attachment_url( $id );
if ( ! $attachment_url )
continue;
printf( '<a href="%s" title="%s" rel="prettyPhoto[product-gallery]" class="%s">%s</a>', esc_attr( $attachment_url ), esc_attr( get_the_title( $id ) ), implode( ' ', $classes ), wp_get_attachment_image( $id, apply_filters( 'single_product_small_thumbnail_size', 'shop_thumbnail' ) ) );
$loop++;
}
}
?></div> | gpl-2.0 |
sebasMonsalve/VARIAMOS | com.variamos.gui/src/com/variamos/gui/refas/editor/actions/EditorActions.java | 48399 | /*
* $Id: EditorActions.java,v 1.38 2012/09/20 14:59:30 david Exp $
* Copyright (c) 2001-2012, JGraph Ltd
*/
package com.variamos.gui.refas.editor.actions;
import java.awt.Color;
import java.awt.Component;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import java.awt.print.PageFormat;
import java.awt.print.Paper;
import java.awt.print.PrinterException;
import java.awt.print.PrinterJob;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FilenameFilter;
import java.io.IOException;
import java.lang.reflect.Method;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.util.HashSet;
import java.util.Map;
import javax.imageio.ImageIO;
import javax.swing.AbstractAction;
import javax.swing.ImageIcon;
import javax.swing.JCheckBoxMenuItem;
import javax.swing.JColorChooser;
import javax.swing.JComponent;
import javax.swing.JEditorPane;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.JSplitPane;
import javax.swing.SwingUtilities;
import javax.swing.filechooser.FileFilter;
import javax.swing.text.html.HTML;
import javax.swing.text.html.HTMLDocument;
import javax.swing.text.html.HTMLEditorKit;
import org.w3c.dom.Document;
import com.cfm.productline.io.SXFMWriter;
import com.mxgraph.analysis.mxDistanceCostFunction;
import com.mxgraph.analysis.mxGraphAnalysis;
import com.mxgraph.canvas.mxGraphics2DCanvas;
import com.mxgraph.canvas.mxICanvas;
import com.mxgraph.canvas.mxSvgCanvas;
import com.mxgraph.io.mxCodec;
import com.mxgraph.io.mxGdCodec;
import com.mxgraph.model.mxGraphModel;
import com.mxgraph.model.mxIGraphModel;
import com.mxgraph.shape.mxStencilShape;
import com.mxgraph.swing.mxGraphComponent;
import com.mxgraph.swing.mxGraphOutline;
import com.mxgraph.swing.handler.mxConnectionHandler;
import com.mxgraph.swing.util.mxGraphActions;
import com.mxgraph.swing.view.mxCellEditor;
import com.mxgraph.util.mxCellRenderer;
import com.mxgraph.util.mxCellRenderer.CanvasFactory;
import com.mxgraph.util.mxConstants;
import com.mxgraph.util.mxDomUtils;
import com.mxgraph.util.mxResources;
import com.mxgraph.util.mxUtils;
import com.mxgraph.util.mxXmlUtils;
import com.mxgraph.util.png.mxPngEncodeParam;
import com.mxgraph.util.png.mxPngImageEncoder;
import com.mxgraph.util.png.mxPngTextDecoder;
import com.mxgraph.view.mxGraph;
import com.variamos.gui.maineditor.BasicGraphEditor;
import com.variamos.gui.maineditor.DefaultFileFilter;
import com.variamos.gui.maineditor.EditorPalette;
import com.variamos.gui.maineditor.EditorRuler;
import com.variamos.gui.maineditor.MainFrame;
import com.variamos.gui.maineditor.VariamosGraphEditor;
import com.variamos.gui.pl.editor.ProductLineGraph;
/**
* A class to support most of the actions through the interface. Initially
* copied from EditorActions on maineditor. Part of PhD work at University of
* Paris 1
*
* @author Juan C. Muñoz Fernández <[email protected]>
*
* @version 1.1
* @since 2014-11-10
* @see com.variamos.gui.maineditor.EditorActions
*/
public class EditorActions {
/**
*
* @param e
* @return Returns the graph for the given action event.
*/
public static final BasicGraphEditor getEditor(ActionEvent e) {
if (e.getSource() instanceof Component) {
Component component = (Component) e.getSource();
while (component != null
&& !(component instanceof BasicGraphEditor)) {
component = component.getParent();
}
return (BasicGraphEditor) component;
}
return null;
}
/**
*
*/
@SuppressWarnings("serial")
public static class ToggleRulersItem extends JCheckBoxMenuItem {
/**
*
*/
public ToggleRulersItem(final BasicGraphEditor editor, String name) {
super(name);
setSelected(editor.getGraphComponent().getColumnHeader() != null);
addActionListener(new ActionListener() {
/**
*
*/
public void actionPerformed(ActionEvent e) {
mxGraphComponent graphComponent = editor
.getGraphComponent();
if (graphComponent.getColumnHeader() != null) {
graphComponent.setColumnHeader(null);
graphComponent.setRowHeader(null);
} else {
graphComponent.setColumnHeaderView(new EditorRuler(
graphComponent,
EditorRuler.ORIENTATION_HORIZONTAL));
graphComponent.setRowHeaderView(new EditorRuler(
graphComponent,
EditorRuler.ORIENTATION_VERTICAL));
}
}
});
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class ToggleGridItem extends JCheckBoxMenuItem {
/**
*
*/
public ToggleGridItem(final BasicGraphEditor editor, String name) {
super(name);
setSelected(true);
addActionListener(new ActionListener() {
/**
*
*/
public void actionPerformed(ActionEvent e) {
mxGraphComponent graphComponent = editor
.getGraphComponent();
mxGraph graph = graphComponent.getGraph();
boolean enabled = !graph.isGridEnabled();
graph.setGridEnabled(enabled);
graphComponent.setGridVisible(enabled);
graphComponent.repaint();
setSelected(enabled);
}
});
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class ToggleOutlineItem extends JCheckBoxMenuItem {
/**
*
*/
public ToggleOutlineItem(final BasicGraphEditor editor, String name) {
super(name);
setSelected(true);
addActionListener(new ActionListener() {
/**
*
*/
public void actionPerformed(ActionEvent e) {
final mxGraphOutline outline = editor.getGraphOutline();
outline.setVisible(!outline.isVisible());
outline.revalidate();
SwingUtilities.invokeLater(new Runnable() {
/*
* (non-Javadoc)
*
* @see java.lang.Runnable#run()
*/
public void run() {
if (outline.getParent() instanceof JSplitPane) {
if (outline.isVisible()) {
((JSplitPane) outline.getParent())
.setDividerLocation(editor
.getHeight() - 300);
((JSplitPane) outline.getParent())
.setDividerSize(6);
} else {
((JSplitPane) outline.getParent())
.setDividerSize(0);
}
}
}
});
}
});
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class ExitAction extends AbstractAction {
/**
*
*/
public void actionPerformed(ActionEvent e) {
BasicGraphEditor editor = getEditor(e);
if (editor != null) {
editor.exit();
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class StylesheetAction extends AbstractAction {
/**
*
*/
protected String stylesheet;
/**
*
*/
public StylesheetAction(String stylesheet) {
this.stylesheet = stylesheet;
}
/**
*
*/
public void actionPerformed(ActionEvent e) {
if (e.getSource() instanceof mxGraphComponent) {
mxGraphComponent graphComponent = (mxGraphComponent) e
.getSource();
mxGraph graph = graphComponent.getGraph();
mxCodec codec = new mxCodec();
Document doc = mxUtils.loadDocument(EditorActions.class
.getResource(stylesheet).toString());
if (doc != null) {
codec.decode(doc.getDocumentElement(),
graph.getStylesheet());
graph.refresh();
}
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class ZoomPolicyAction extends AbstractAction {
/**
*
*/
protected int zoomPolicy;
/**
*
*/
public ZoomPolicyAction(int zoomPolicy) {
this.zoomPolicy = zoomPolicy;
}
/**
*
*/
public void actionPerformed(ActionEvent e) {
if (e.getSource() instanceof mxGraphComponent) {
mxGraphComponent graphComponent = (mxGraphComponent) e
.getSource();
graphComponent.setPageVisible(true);
graphComponent.setZoomPolicy(zoomPolicy);
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class GridStyleAction extends AbstractAction {
/**
*
*/
protected int style;
/**
*
*/
public GridStyleAction(int style) {
this.style = style;
}
/**
*
*/
public void actionPerformed(ActionEvent e) {
if (e.getSource() instanceof mxGraphComponent) {
mxGraphComponent graphComponent = (mxGraphComponent) e
.getSource();
graphComponent.setGridStyle(style);
graphComponent.repaint();
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class GridColorAction extends AbstractAction {
/**
*
*/
public void actionPerformed(ActionEvent e) {
if (e.getSource() instanceof mxGraphComponent) {
mxGraphComponent graphComponent = (mxGraphComponent) e
.getSource();
Color newColor = JColorChooser.showDialog(graphComponent,
mxResources.get("gridColor"),
graphComponent.getGridColor());
if (newColor != null) {
graphComponent.setGridColor(newColor);
graphComponent.repaint();
}
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class ScaleAction extends AbstractAction {
/**
*
*/
protected double scale;
/**
*
*/
public ScaleAction(double scale) {
this.scale = scale;
}
/**
*
*/
public void actionPerformed(ActionEvent e) {
if (e.getSource() instanceof mxGraphComponent) {
mxGraphComponent graphComponent = (mxGraphComponent) e
.getSource();
double scale = this.scale;
if (scale == 0) {
String value = (String) JOptionPane.showInputDialog(
graphComponent, mxResources.get("value"),
mxResources.get("scale") + " (%)",
JOptionPane.PLAIN_MESSAGE, null, null, "");
if (value != null) {
scale = Double.parseDouble(value.replace("%", "")) / 100;
}
}
if (scale > 0) {
graphComponent.zoomTo(scale, graphComponent.isCenterZoom());
}
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class PageSetupAction extends AbstractAction {
/**
*
*/
public void actionPerformed(ActionEvent e) {
if (e.getSource() instanceof mxGraphComponent) {
mxGraphComponent graphComponent = (mxGraphComponent) e
.getSource();
PrinterJob pj = PrinterJob.getPrinterJob();
PageFormat format = pj.pageDialog(graphComponent
.getPageFormat());
if (format != null) {
graphComponent.setPageFormat(format);
graphComponent.zoomAndCenter();
}
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class PrintAction extends AbstractAction {
/**
*
*/
public void actionPerformed(ActionEvent e) {
if (e.getSource() instanceof mxGraphComponent) {
mxGraphComponent graphComponent = (mxGraphComponent) e
.getSource();
PrinterJob pj = PrinterJob.getPrinterJob();
if (pj.printDialog()) {
PageFormat pf = graphComponent.getPageFormat();
Paper paper = new Paper();
double margin = 36;
paper.setImageableArea(margin, margin, paper.getWidth()
- margin * 2, paper.getHeight() - margin * 2);
pf.setPaper(paper);
pj.setPrintable(graphComponent, pf);
try {
pj.print();
} catch (PrinterException e2) {
System.out.println(e2);
}
}
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class SaveAction extends AbstractAction {
/**
*
*/
protected boolean showDialog;
/**
*
*/
protected String lastDir = null;
/**
*
*/
public SaveAction(boolean showDialog) {
this.showDialog = showDialog;
}
/**
* Saves XML+PNG format.
*/
protected void saveXmlPng(BasicGraphEditor editor, String filename,
Color bg) throws IOException {
mxGraphComponent graphComponent = editor.getGraphComponent();
mxGraph graph = graphComponent.getGraph();
// Creates the image for the PNG file
BufferedImage image = mxCellRenderer.createBufferedImage(graph,
null, 1, bg, graphComponent.isAntiAlias(), null,
graphComponent.getCanvas());
// Creates the URL-encoded XML data
mxCodec codec = new mxCodec();
String xml = URLEncoder.encode(
mxXmlUtils.getXml(codec.encode(graph.getModel())), "UTF-8");
mxPngEncodeParam param = mxPngEncodeParam
.getDefaultEncodeParam(image);
param.setCompressedText(new String[] { "mxGraphModel", xml });
// Saves as a PNG file
FileOutputStream outputStream = new FileOutputStream(new File(
filename));
try {
mxPngImageEncoder encoder = new mxPngImageEncoder(outputStream,
param);
if (image != null) {
encoder.encode(image);
editor.setModified(false);
editor.setCurrentFile(new File(filename));
} else {
JOptionPane.showMessageDialog(graphComponent,
mxResources.get("noImageData"));
}
} finally {
outputStream.close();
}
}
/**
*
*/
public void actionPerformed(ActionEvent e) {
VariamosGraphEditor editor = (VariamosGraphEditor) getEditor(e);
if (editor != null) {
((MainFrame) editor.getFrame()).waitingCursor(true);
mxGraphComponent graphComponent = editor.getGraphComponent();
mxGraph graph = graphComponent.getGraph();
FileFilter selectedFilter = null;
DefaultFileFilter xmlPngFilter = new DefaultFileFilter(".png",
"PNG+XML " + mxResources.get("file") + " (.png)");
FileFilter vmlFileFilter = new DefaultFileFilter(".html",
"VML " + mxResources.get("file") + " (.html)");
String filename = null;
boolean dialogShown = false;
if (showDialog || editor.getCurrentFile() == null) {
String wd;
if (lastDir != null) {
wd = lastDir;
} else if (editor.getCurrentFile() != null) {
wd = editor.getCurrentFile().getParent();
} else {
wd = System.getProperty("user.dir");
}
JFileChooser fc = new JFileChooser(wd);
// Adds the default file format
FileFilter defaultFilter = xmlPngFilter;
fc.addChoosableFileFilter(defaultFilter);
// Adds special vector graphics formats and HTML
fc.addChoosableFileFilter(new DefaultFileFilter(".mxe",
"mxGraph Editor " + mxResources.get("file")
+ " (.mxe)"));
fc.addChoosableFileFilter(new DefaultFileFilter(".txt",
"Graph Drawing " + mxResources.get("file")
+ " (.txt)"));
fc.addChoosableFileFilter(new DefaultFileFilter(".svg",
"SVG " + mxResources.get("file") + " (.svg)"));
fc.addChoosableFileFilter(vmlFileFilter);
fc.addChoosableFileFilter(new DefaultFileFilter(".html",
"HTML " + mxResources.get("file") + " (.html)"));
// Adds a filter for each supported image format
Object[] imageFormats = ImageIO.getReaderFormatNames();
// Finds all distinct extensions
HashSet<String> formats = new HashSet<String>();
for (int i = 0; i < imageFormats.length; i++) {
String ext = imageFormats[i].toString().toLowerCase();
formats.add(ext);
}
imageFormats = formats.toArray();
for (int i = 0; i < imageFormats.length; i++) {
String ext = imageFormats[i].toString();
fc.addChoosableFileFilter(new DefaultFileFilter("."
+ ext, ext.toUpperCase() + " "
+ mxResources.get("file") + " (." + ext + ")"));
}
// Adds filter that accepts all supported image formats
fc.addChoosableFileFilter(new DefaultFileFilter.ImageFileFilter(
mxResources.get("allImages")));
fc.setFileFilter(defaultFilter);
int rc = fc.showDialog(null, mxResources.get("save"));
dialogShown = true;
if (rc != JFileChooser.APPROVE_OPTION) {
return;
} else {
lastDir = fc.getSelectedFile().getParent();
}
filename = fc.getSelectedFile().getAbsolutePath();
selectedFilter = fc.getFileFilter();
if (selectedFilter instanceof DefaultFileFilter) {
String ext = ((DefaultFileFilter) selectedFilter)
.getExtension();
if (!filename.toLowerCase().endsWith(ext)) {
filename += ext;
}
}
if (new File(filename).exists()
&& JOptionPane.showConfirmDialog(graphComponent,
mxResources.get("overwriteExistingFile")) != JOptionPane.YES_OPTION) {
return;
}
} else {
filename = editor.getCurrentFile().getAbsolutePath();
}
try {
String ext = filename
.substring(filename.lastIndexOf('.') + 1);
if (ext.equalsIgnoreCase("svg")) {
mxSvgCanvas canvas = (mxSvgCanvas) mxCellRenderer
.drawCells(graph, null, 1, null,
new CanvasFactory() {
public mxICanvas createCanvas(
int width, int height) {
mxSvgCanvas canvas = new mxSvgCanvas(
mxDomUtils
.createSvgDocument(
width,
height));
canvas.setEmbedded(true);
return canvas;
}
});
mxUtils.writeFile(
mxXmlUtils.getXml(canvas.getDocument()),
filename);
} else if (selectedFilter == vmlFileFilter) {
mxUtils.writeFile(mxXmlUtils.getXml(mxCellRenderer
.createVmlDocument(graph, null, 1, null, null)
.getDocumentElement()), filename);
} else if (ext.equalsIgnoreCase("sxfm")) {
SXFMWriter writer = new SXFMWriter();
ProductLineGraph plGraph = (ProductLineGraph) graph;
mxUtils.writeFile(
writer.getSXFMContent(plGraph.getProductLine()),
filename);
} else if (ext.equalsIgnoreCase("html")) {
mxUtils.writeFile(mxXmlUtils.getXml(mxCellRenderer
.createHtmlDocument(graph, null, 1, null, null)
.getDocumentElement()), filename);
} else if (ext.equalsIgnoreCase("mxe")
|| ext.equalsIgnoreCase("plg")
|| ext.equalsIgnoreCase("xml")) {
mxCodec codec = new mxCodec();
SharedActions.beforeSaveGraph(graph);
String xml = mxXmlUtils.getXml(codec.encode(graph
.getModel()));
SharedActions.afterSaveGraph(graph, editor);
mxUtils.writeFile(xml, filename);
editor.setModified(false);
editor.setCurrentFile(new File(filename));
} else if (ext.equalsIgnoreCase("txt")) {
String content = mxGdCodec.encode(graph);
mxUtils.writeFile(content, filename);
} else {
Color bg = null;
if ((!ext.equalsIgnoreCase("gif") && !ext
.equalsIgnoreCase("png"))
|| JOptionPane.showConfirmDialog(
graphComponent, mxResources
.get("transparentBackground")) != JOptionPane.YES_OPTION) {
bg = graphComponent.getBackground();
}
if (selectedFilter == xmlPngFilter
|| (editor.getCurrentFile() != null
&& ext.equalsIgnoreCase("png") && !dialogShown)) {
saveXmlPng(editor, filename, bg);
} else {
BufferedImage image = mxCellRenderer
.createBufferedImage(graph, null, 1, bg,
graphComponent.isAntiAlias(), null,
graphComponent.getCanvas());
if (image != null) {
ImageIO.write(image, ext, new File(filename));
} else {
JOptionPane.showMessageDialog(graphComponent,
mxResources.get("noImageData"));
}
}
}
} catch (Throwable ex) {
ex.printStackTrace();
JOptionPane.showMessageDialog(graphComponent,
ex.toString(), mxResources.get("error"),
JOptionPane.ERROR_MESSAGE);
}
((MainFrame) editor.getFrame()).waitingCursor(true);
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class SelectShortestPathAction extends AbstractAction {
/**
*
*/
protected boolean directed;
/**
*
*/
public SelectShortestPathAction(boolean directed) {
this.directed = directed;
}
/**
*
*/
public void actionPerformed(ActionEvent e) {
if (e.getSource() instanceof mxGraphComponent) {
mxGraphComponent graphComponent = (mxGraphComponent) e
.getSource();
mxGraph graph = graphComponent.getGraph();
mxIGraphModel model = graph.getModel();
Object source = null;
Object target = null;
Object[] cells = graph.getSelectionCells();
for (int i = 0; i < cells.length; i++) {
if (model.isVertex(cells[i])) {
if (source == null) {
source = cells[i];
} else if (target == null) {
target = cells[i];
}
}
if (source != null && target != null) {
break;
}
}
if (source != null && target != null) {
int steps = graph.getChildEdges(graph.getDefaultParent()).length;
Object[] path = mxGraphAnalysis.getInstance()
.getShortestPath(graph, source, target,
new mxDistanceCostFunction(), steps,
directed);
graph.setSelectionCells(path);
} else {
JOptionPane.showMessageDialog(graphComponent,
mxResources.get("noSourceAndTargetSelected"));
}
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class SelectSpanningTreeAction extends AbstractAction {
/**
*
*/
protected boolean directed;
/**
*
*/
public SelectSpanningTreeAction(boolean directed) {
this.directed = directed;
}
/**
*
*/
public void actionPerformed(ActionEvent e) {
if (e.getSource() instanceof mxGraphComponent) {
mxGraphComponent graphComponent = (mxGraphComponent) e
.getSource();
mxGraph graph = graphComponent.getGraph();
mxIGraphModel model = graph.getModel();
Object parent = graph.getDefaultParent();
Object[] cells = graph.getSelectionCells();
for (int i = 0; i < cells.length; i++) {
if (model.getChildCount(cells[i]) > 0) {
parent = cells[i];
break;
}
}
Object[] v = graph.getChildVertices(parent);
Object[] mst = mxGraphAnalysis.getInstance()
.getMinimumSpanningTree(graph, v,
new mxDistanceCostFunction(), directed);
graph.setSelectionCells(mst);
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class ToggleDirtyAction extends AbstractAction {
/**
*
*/
public void actionPerformed(ActionEvent e) {
if (e.getSource() instanceof mxGraphComponent) {
mxGraphComponent graphComponent = (mxGraphComponent) e
.getSource();
graphComponent.showDirtyRectangle = !graphComponent.showDirtyRectangle;
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class ToggleConnectModeAction extends AbstractAction {
/**
*
*/
public void actionPerformed(ActionEvent e) {
if (e.getSource() instanceof mxGraphComponent) {
mxGraphComponent graphComponent = (mxGraphComponent) e
.getSource();
mxConnectionHandler handler = graphComponent
.getConnectionHandler();
handler.setHandleEnabled(!handler.isHandleEnabled());
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class ToggleCreateTargetItem extends JCheckBoxMenuItem {
/**
*
*/
public ToggleCreateTargetItem(final BasicGraphEditor editor, String name) {
super(name);
setSelected(true);
addActionListener(new ActionListener() {
/**
*
*/
public void actionPerformed(ActionEvent e) {
mxGraphComponent graphComponent = editor
.getGraphComponent();
if (graphComponent != null) {
mxConnectionHandler handler = graphComponent
.getConnectionHandler();
handler.setCreateTarget(!handler.isCreateTarget());
setSelected(handler.isCreateTarget());
}
}
});
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class PromptPropertyAction extends AbstractAction {
/**
*
*/
protected Object target;
/**
*
*/
protected String fieldname, message;
/**
*
*/
public PromptPropertyAction(Object target, String message) {
this(target, message, message);
}
/**
*
*/
public PromptPropertyAction(Object target, String message,
String fieldname) {
this.target = target;
this.message = message;
this.fieldname = fieldname;
}
/**
*
*/
public void actionPerformed(ActionEvent e) {
if (e.getSource() instanceof Component) {
try {
Method getter = target.getClass().getMethod(
"get" + fieldname);
Object current = getter.invoke(target);
// TODO: Support other atomic types
if (current instanceof Integer) {
Method setter = target.getClass().getMethod(
"set" + fieldname, new Class[] { int.class });
String value = (String) JOptionPane.showInputDialog(
(Component) e.getSource(), "Value", message,
JOptionPane.PLAIN_MESSAGE, null, null, current);
if (value != null) {
setter.invoke(target, Integer.parseInt(value));
}
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
// Repaints the graph component
if (e.getSource() instanceof mxGraphComponent) {
mxGraphComponent graphComponent = (mxGraphComponent) e
.getSource();
graphComponent.repaint();
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class TogglePropertyItem extends JCheckBoxMenuItem {
/**
*
*/
public TogglePropertyItem(Object target, String name, String fieldname) {
this(target, name, fieldname, false);
}
/**
*
*/
public TogglePropertyItem(Object target, String name, String fieldname,
boolean refresh) {
this(target, name, fieldname, refresh, null);
}
/**
*
*/
public TogglePropertyItem(final Object target, String name,
final String fieldname, final boolean refresh,
ActionListener listener) {
super(name);
// Since action listeners are processed last to first we add the
// given
// listener here which means it will be processed after the one
// below
if (listener != null) {
addActionListener(listener);
}
addActionListener(new ActionListener() {
/**
*
*/
public void actionPerformed(ActionEvent e) {
execute(target, fieldname, refresh);
}
});
PropertyChangeListener propertyChangeListener = new PropertyChangeListener() {
/*
* (non-Javadoc)
*
* @see
* java.beans.PropertyChangeListener#propertyChange(java.beans
* .PropertyChangeEvent)
*/
public void propertyChange(PropertyChangeEvent evt) {
if (evt.getPropertyName().equalsIgnoreCase(fieldname)) {
update(target, fieldname);
}
}
};
if (target instanceof mxGraphComponent) {
((mxGraphComponent) target)
.addPropertyChangeListener(propertyChangeListener);
} else if (target instanceof mxGraph) {
((mxGraph) target)
.addPropertyChangeListener(propertyChangeListener);
}
update(target, fieldname);
}
/**
*
*/
public void update(Object target, String fieldname) {
if (target != null && fieldname != null) {
try {
Method getter = target.getClass().getMethod(
"is" + fieldname);
if (getter != null) {
Object current = getter.invoke(target);
if (current instanceof Boolean) {
setSelected(((Boolean) current).booleanValue());
}
}
} catch (Exception e) {
// ignore
}
}
}
/**
*
*/
public void execute(Object target, String fieldname, boolean refresh) {
if (target != null && fieldname != null) {
try {
Method getter = target.getClass().getMethod(
"is" + fieldname);
Method setter = target.getClass().getMethod(
"set" + fieldname, new Class[] { boolean.class });
Object current = getter.invoke(target);
if (current instanceof Boolean) {
boolean value = !((Boolean) current).booleanValue();
setter.invoke(target, value);
setSelected(value);
}
if (refresh) {
mxGraph graph = null;
if (target instanceof mxGraph) {
graph = (mxGraph) target;
} else if (target instanceof mxGraphComponent) {
graph = ((mxGraphComponent) target).getGraph();
}
graph.refresh();
}
} catch (Exception e) {
// ignore
}
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class HistoryAction extends AbstractAction {
/**
*
*/
protected boolean undo;
/**
*
*/
public HistoryAction(boolean undo) {
this.undo = undo;
}
/**
*
*/
public void actionPerformed(ActionEvent e) {
BasicGraphEditor editor = getEditor(e);
if (editor != null) {
if (undo) {
editor.getUndoManager().undo();
} else {
editor.getUndoManager().redo();
}
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class FontStyleAction extends AbstractAction {
/**
*
*/
protected boolean bold;
/**
*
*/
public FontStyleAction(boolean bold) {
this.bold = bold;
}
/**
*
*/
public void actionPerformed(ActionEvent e) {
if (e.getSource() instanceof mxGraphComponent) {
mxGraphComponent graphComponent = (mxGraphComponent) e
.getSource();
Component editorComponent = null;
if (graphComponent.getCellEditor() instanceof mxCellEditor) {
editorComponent = ((mxCellEditor) graphComponent
.getCellEditor()).getEditor();
}
if (editorComponent instanceof JEditorPane) {
JEditorPane editorPane = (JEditorPane) editorComponent;
int start = editorPane.getSelectionStart();
int ende = editorPane.getSelectionEnd();
String text = editorPane.getSelectedText();
if (text == null) {
text = "";
}
try {
HTMLEditorKit editorKit = new HTMLEditorKit();
HTMLDocument document = (HTMLDocument) editorPane
.getDocument();
document.remove(start, (ende - start));
editorKit.insertHTML(document, start, ((bold) ? "<b>"
: "<i>") + text + ((bold) ? "</b>" : "</i>"),
0, 0, (bold) ? HTML.Tag.B : HTML.Tag.I);
} catch (Exception ex) {
ex.printStackTrace();
}
editorPane.requestFocus();
editorPane.select(start, ende);
} else {
mxIGraphModel model = graphComponent.getGraph().getModel();
model.beginUpdate();
try {
graphComponent.stopEditing(false);
graphComponent.getGraph().toggleCellStyleFlags(
mxConstants.STYLE_FONTSTYLE,
(bold) ? mxConstants.FONT_BOLD
: mxConstants.FONT_ITALIC);
} finally {
model.endUpdate();
}
}
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class WarningAction extends AbstractAction {
/**
*
*/
public void actionPerformed(ActionEvent e) {
if (e.getSource() instanceof mxGraphComponent) {
mxGraphComponent graphComponent = (mxGraphComponent) e
.getSource();
Object[] cells = graphComponent.getGraph().getSelectionCells();
if (cells != null && cells.length > 0) {
String warning = JOptionPane.showInputDialog(mxResources
.get("enterWarningMessage"));
for (int i = 0; i < cells.length; i++) {
graphComponent.setCellWarning(cells[i], warning);
}
} else {
JOptionPane.showMessageDialog(graphComponent,
mxResources.get("noCellSelected"));
}
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class NewAction extends AbstractAction {
/**
*
*/
public void actionPerformed(ActionEvent e) {
BasicGraphEditor editor = getEditor(e);
if (editor != null) {
if (!editor.isModified()
|| JOptionPane.showConfirmDialog(editor,
mxResources.get("loseChanges")) == JOptionPane.YES_OPTION) {
((VariamosGraphEditor) editor).resetView();
}
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class ImportAction extends AbstractAction {
/**
*
*/
protected String lastDir;
/**
* Loads and registers the shape as a new shape in mxGraphics2DCanvas
* and adds a new entry to use that shape in the specified palette
*
* @param palette
* The palette to add the shape to.
* @param nodeXml
* The raw XML of the shape
* @param path
* The path to the directory the shape exists in
* @return the string name of the shape
*/
public static String addStencilShape(EditorPalette palette,
String nodeXml, String path) {
// Some editors place a 3 byte BOM at the start of files
// Ensure the first char is a "<"
int lessthanIndex = nodeXml.indexOf("<");
nodeXml = nodeXml.substring(lessthanIndex);
mxStencilShape newShape = new mxStencilShape(nodeXml);
String name = newShape.getName();
ImageIcon icon = null;
if (path != null) {
String iconPath = path + newShape.getIconPath();
icon = new ImageIcon(iconPath);
}
// Registers the shape in the canvas shape registry
mxGraphics2DCanvas.putShape(name, newShape);
if (palette != null && icon != null) {
palette.addTemplate(name, icon, "shape=" + name, 80, 80, "");
}
return name;
}
/**
*
*/
public void actionPerformed(ActionEvent e) {
BasicGraphEditor editor = getEditor(e);
if (editor != null) {
String wd = (lastDir != null) ? lastDir : System
.getProperty("user.dir");
JFileChooser fc = new JFileChooser(wd);
fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
// Adds file filter for Dia shape import
fc.addChoosableFileFilter(new DefaultFileFilter(".shape",
"Dia Shape " + mxResources.get("file") + " (.shape)"));
int rc = fc.showDialog(null, mxResources.get("importStencil"));
if (rc == JFileChooser.APPROVE_OPTION) {
lastDir = fc.getSelectedFile().getParent();
try {
if (fc.getSelectedFile().isDirectory()) {
EditorPalette palette = editor.insertPalette(fc
.getSelectedFile().getName());
for (File f : fc.getSelectedFile().listFiles(
new FilenameFilter() {
public boolean accept(File dir,
String name) {
return name.toLowerCase().endsWith(
".shape");
}
})) {
String nodeXml = mxUtils.readFile(f
.getAbsolutePath());
addStencilShape(palette, nodeXml, f.getParent()
+ File.separator);
}
JComponent scrollPane = (JComponent) palette
.getParent().getParent();
editor.getLibraryPane().setSelectedComponent(
scrollPane);
// FIXME: Need to update the size of the palette to
// force a layout
// update. Re/in/validate of palette or parent does
// not work.
// editor.getLibraryPane().revalidate();
} else {
String nodeXml = mxUtils.readFile(fc
.getSelectedFile().getAbsolutePath());
String name = addStencilShape(null, nodeXml, null);
JOptionPane.showMessageDialog(editor, mxResources
.get("stencilImported",
new String[] { name }));
}
} catch (IOException e1) {
e1.printStackTrace();
}
}
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class OpenAction extends AbstractAction {
/**
*
*/
protected String lastDir;
/**
*
*/
protected void resetEditor(VariamosGraphEditor editor) {
editor.setVisibleModel(0, -1);
editor.setDefaultButton();
editor.updateView();
editor.setModified(false);
editor.getUndoManager().clear();
editor.getGraphComponent().zoomAndCenter();
}
/**
* Reads XML+PNG format.
*/
protected void openXmlPng(VariamosGraphEditor editor, File file)
throws IOException {
Map<String, String> text = mxPngTextDecoder
.decodeCompressedText(new FileInputStream(file));
if (text != null) {
String value = text.get("mxGraphModel");
if (value != null) {
Document document = mxXmlUtils.parseXml(URLDecoder.decode(
value, "UTF-8"));
mxCodec codec = new mxCodec(document);
codec.decode(document.getDocumentElement(), editor
.getGraphComponent().getGraph().getModel());
editor.setCurrentFile(file);
resetEditor(editor);
return;
}
}
JOptionPane.showMessageDialog(editor,
mxResources.get("imageContainsNoDiagramData"));
}
/**
* @throws IOException
*
*/
protected void openGD(BasicGraphEditor editor, File file, String gdText) {
mxGraph graph = editor.getGraphComponent().getGraph();
// Replaces file extension with .mxe
String filename = file.getName();
filename = filename.substring(0, filename.length() - 4) + ".mxe";
if (new File(filename).exists()
&& JOptionPane.showConfirmDialog(editor,
mxResources.get("overwriteExistingFile")) != JOptionPane.YES_OPTION) {
return;
}
((mxGraphModel) graph.getModel()).clear();
mxGdCodec.decode(gdText, graph);
editor.getGraphComponent().zoomAndCenter();
editor.setCurrentFile(new File(lastDir + "/" + filename));
}
/**
*
*/
public void actionPerformed(ActionEvent e) {
BasicGraphEditor editor = getEditor(e);
if (editor != null) {
((MainFrame)editor.getFrame()).waitingCursor(true);
if (!editor.isModified()
|| JOptionPane.showConfirmDialog(editor,
mxResources.get("loseChanges")) == JOptionPane.YES_OPTION) {
mxGraph graph = editor.getGraphComponent().getGraph();
if (graph != null) {
String wd = (lastDir != null) ? lastDir : System
.getProperty("user.dir");
JFileChooser fc = new JFileChooser(wd);
// Adds file filter for supported file format
DefaultFileFilter defaultFilter = new DefaultFileFilter(
".mxe", mxResources.get("allSupportedFormats")
+ " (.mxe, .png, .vdx)") {
public boolean accept(File file) {
String lcase = file.getName().toLowerCase();
return super.accept(file)
|| lcase.endsWith(".png")
|| lcase.endsWith(".vdx");
}
};
fc.addChoosableFileFilter(defaultFilter);
fc.addChoosableFileFilter(new DefaultFileFilter(".mxe",
"mxGraph Editor " + mxResources.get("file")
+ " (.mxe)"));
fc.addChoosableFileFilter(new DefaultFileFilter(".png",
"PNG+XML " + mxResources.get("file")
+ " (.png)"));
// Adds file filter for VDX import
fc.addChoosableFileFilter(new DefaultFileFilter(".vdx",
"XML Drawing " + mxResources.get("file")
+ " (.vdx)"));
// Adds file filter for GD import
fc.addChoosableFileFilter(new DefaultFileFilter(".txt",
"Graph Drawing " + mxResources.get("file")
+ " (.txt)"));
fc.setFileFilter(defaultFilter);
int rc = fc.showDialog(null,
mxResources.get("openFile"));
if (rc == JFileChooser.APPROVE_OPTION) {
lastDir = fc.getSelectedFile().getParent();
try {
if (fc.getSelectedFile().getAbsolutePath()
.toLowerCase().endsWith(".png")) {
openXmlPng((VariamosGraphEditor) editor,
fc.getSelectedFile());
} else if (fc.getSelectedFile()
.getAbsolutePath().toLowerCase()
.endsWith(".txt")) {
openGD(editor, fc.getSelectedFile(),
mxUtils.readFile(fc
.getSelectedFile()
.getAbsolutePath()));
} else {
Document document = mxXmlUtils
.parseXml(mxUtils.readFile(fc
.getSelectedFile()
.getAbsolutePath()));
mxCodec codec = new mxCodec(document);
codec.decode(document.getDocumentElement(),
graph.getModel());
editor.setCurrentFile(fc.getSelectedFile());
VariamosGraphEditor variamosEditor = (VariamosGraphEditor) editor;
SharedActions.afterSaveGraph(graph,
variamosEditor);
resetEditor((VariamosGraphEditor) editor);
}
} catch (IOException ex) {
ex.printStackTrace();
JOptionPane.showMessageDialog(
editor.getGraphComponent(),
ex.toString(),
mxResources.get("error"),
JOptionPane.ERROR_MESSAGE);
}
}
}
}
((MainFrame)editor.getFrame()).waitingCursor(false);
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class ToggleAction extends AbstractAction {
/**
*
*/
protected String key;
/**
*
*/
protected boolean defaultValue;
/**
*
* @param key
*/
public ToggleAction(String key) {
this(key, false);
}
/**
*
* @param key
*/
public ToggleAction(String key, boolean defaultValue) {
this.key = key;
this.defaultValue = defaultValue;
}
/**
*
*/
public void actionPerformed(ActionEvent e) {
mxGraph graph = mxGraphActions.getGraph(e);
if (graph != null) {
graph.toggleCellStyles(key, defaultValue);
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class SetLabelPositionAction extends AbstractAction {
/**
*
*/
protected String labelPosition, alignment;
/**
*
* @param key
*/
public SetLabelPositionAction(String labelPosition, String alignment) {
this.labelPosition = labelPosition;
this.alignment = alignment;
}
/**
*
*/
public void actionPerformed(ActionEvent e) {
mxGraph graph = mxGraphActions.getGraph(e);
if (graph != null && !graph.isSelectionEmpty()) {
graph.getModel().beginUpdate();
try {
// Checks the orientation of the alignment to use the
// correct constants
if (labelPosition.equals(mxConstants.ALIGN_LEFT)
|| labelPosition.equals(mxConstants.ALIGN_CENTER)
|| labelPosition.equals(mxConstants.ALIGN_RIGHT)) {
graph.setCellStyles(mxConstants.STYLE_LABEL_POSITION,
labelPosition);
graph.setCellStyles(mxConstants.STYLE_ALIGN, alignment);
} else {
graph.setCellStyles(
mxConstants.STYLE_VERTICAL_LABEL_POSITION,
labelPosition);
graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,
alignment);
}
} finally {
graph.getModel().endUpdate();
}
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class SetStyleAction extends AbstractAction {
/**
*
*/
protected String value;
/**
*
* @param key
*/
public SetStyleAction(String value) {
this.value = value;
}
/**
*
*/
public void actionPerformed(ActionEvent e) {
mxGraph graph = mxGraphActions.getGraph(e);
if (graph != null && !graph.isSelectionEmpty()) {
graph.setCellStyle(value);
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class KeyValueAction extends AbstractAction {
/**
*
*/
protected String key, value;
/**
*
* @param key
*/
public KeyValueAction(String key) {
this(key, null);
}
/**
*
* @param key
*/
public KeyValueAction(String key, String value) {
this.key = key;
this.value = value;
}
/**
*
*/
public void actionPerformed(ActionEvent e) {
mxGraph graph = mxGraphActions.getGraph(e);
if (graph != null && !graph.isSelectionEmpty()) {
graph.setCellStyles(key, value);
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class PromptValueAction extends AbstractAction {
/**
*
*/
protected String key, message;
/**
*
* @param key
*/
public PromptValueAction(String key, String message) {
this.key = key;
this.message = message;
}
/**
*
*/
public void actionPerformed(ActionEvent e) {
if (e.getSource() instanceof Component) {
mxGraph graph = mxGraphActions.getGraph(e);
if (graph != null && !graph.isSelectionEmpty()) {
String value = (String) JOptionPane.showInputDialog(
(Component) e.getSource(),
mxResources.get("value"), message,
JOptionPane.PLAIN_MESSAGE, null, null, "");
if (value != null) {
if (value.equals(mxConstants.NONE)) {
value = null;
}
graph.setCellStyles(key, value);
}
}
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class AlignCellsAction extends AbstractAction {
/**
*
*/
protected String align;
/**
*
* @param key
*/
public AlignCellsAction(String align) {
this.align = align;
}
/**
*
*/
public void actionPerformed(ActionEvent e) {
mxGraph graph = mxGraphActions.getGraph(e);
if (graph != null && !graph.isSelectionEmpty()) {
graph.alignCells(align);
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class AutosizeAction extends AbstractAction {
/**
*
*/
public void actionPerformed(ActionEvent e) {
mxGraph graph = mxGraphActions.getGraph(e);
if (graph != null && !graph.isSelectionEmpty()) {
Object[] cells = graph.getSelectionCells();
mxIGraphModel model = graph.getModel();
model.beginUpdate();
try {
for (int i = 0; i < cells.length; i++) {
graph.updateCellSize(cells[i]);
}
} finally {
model.endUpdate();
}
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class ColorAction extends AbstractAction {
/**
*
*/
protected String name, key;
/**
*
* @param key
*/
public ColorAction(String name, String key) {
this.name = name;
this.key = key;
}
/**
*
*/
public void actionPerformed(ActionEvent e) {
if (e.getSource() instanceof mxGraphComponent) {
mxGraphComponent graphComponent = (mxGraphComponent) e
.getSource();
mxGraph graph = graphComponent.getGraph();
if (!graph.isSelectionEmpty()) {
Color newColor = JColorChooser.showDialog(graphComponent,
name, null);
if (newColor != null) {
graph.setCellStyles(key, mxUtils.hexString(newColor));
}
}
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class BackgroundImageAction extends AbstractAction {
/**
*
*/
public void actionPerformed(ActionEvent e) {
if (e.getSource() instanceof mxGraphComponent) {
mxGraphComponent graphComponent = (mxGraphComponent) e
.getSource();
String value = (String) JOptionPane.showInputDialog(
graphComponent, mxResources.get("backgroundImage"),
"URL", JOptionPane.PLAIN_MESSAGE, null, null,
"http://www.callatecs.com/images/background2.JPG");
if (value != null) {
if (value.length() == 0) {
graphComponent.setBackgroundImage(null);
} else {
Image background = mxUtils.loadImage(value);
// Incorrect URLs will result in no image.
// TODO provide feedback that the URL is not correct
if (background != null) {
graphComponent.setBackgroundImage(new ImageIcon(
background));
}
}
// Forces a repaint of the outline
graphComponent.getGraph().repaint();
}
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class BackgroundAction extends AbstractAction {
/**
*
*/
public void actionPerformed(ActionEvent e) {
if (e.getSource() instanceof mxGraphComponent) {
mxGraphComponent graphComponent = (mxGraphComponent) e
.getSource();
Color newColor = JColorChooser.showDialog(graphComponent,
mxResources.get("background"), null);
if (newColor != null) {
graphComponent.getViewport().setOpaque(true);
graphComponent.getViewport().setBackground(newColor);
}
// Forces a repaint of the outline
graphComponent.getGraph().repaint();
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class PageBackgroundAction extends AbstractAction {
/**
*
*/
public void actionPerformed(ActionEvent e) {
if (e.getSource() instanceof mxGraphComponent) {
mxGraphComponent graphComponent = (mxGraphComponent) e
.getSource();
Color newColor = JColorChooser.showDialog(graphComponent,
mxResources.get("pageBackground"), null);
if (newColor != null) {
graphComponent.setPageBackgroundColor(newColor);
}
// Forces a repaint of the component
graphComponent.repaint();
}
}
}
/**
*
*/
@SuppressWarnings("serial")
public static class StyleAction extends AbstractAction {
/**
*
*/
public void actionPerformed(ActionEvent e) {
if (e.getSource() instanceof mxGraphComponent) {
mxGraphComponent graphComponent = (mxGraphComponent) e
.getSource();
mxGraph graph = graphComponent.getGraph();
String initial = graph.getModel().getStyle(
graph.getSelectionCell());
String value = (String) JOptionPane.showInputDialog(
graphComponent, mxResources.get("style"),
mxResources.get("style"), JOptionPane.PLAIN_MESSAGE,
null, null, initial);
if (value != null) {
graph.setCellStyle(value);
}
}
}
}
}
| gpl-2.0 |
superwow/hell.core | src/game/PetitionsHandler.cpp | 34383 | /*
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
* Copyright (C) 2008 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 Hellground <http://hellground.net/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "Common.h"
#include "Language.h"
#include "WorldPacket.h"
#include "WorldSession.h"
#include "World.h"
#include "ObjectMgr.h"
#include "Log.h"
#include "Opcodes.h"
#include "Guild.h"
#include "ArenaTeam.h"
#include "MapManager.h"
#include "GossipDef.h"
#include "SocialMgr.h"
#include "GuildMgr.h"
/*enum PetitionType // dbc data
{
PETITION_TYPE_GUILD = 1,
PETITION_TYPE_ARENA_TEAM = 3
};*/
// Charters ID in item_template
#define GUILD_CHARTER 5863
#define GUILD_CHARTER_COST 1000 // 10 S
#define ARENA_TEAM_CHARTER_2v2 23560
#define ARENA_TEAM_CHARTER_2v2_COST 800000 // 80 G
#define ARENA_TEAM_CHARTER_3v3 23561
#define ARENA_TEAM_CHARTER_3v3_COST 1200000 // 120 G
#define ARENA_TEAM_CHARTER_5v5 23562
#define ARENA_TEAM_CHARTER_5v5_COST 2000000 // 200 G
void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data)
{
CHECK_PACKET_SIZE(recv_data, 8+8+4+1+5*8+2+1+4+4);
sLog.outDebug("Received opcode CMSG_PETITION_BUY");
//recv_data.hexlike();
uint64 guidNPC;
uint64 unk1, unk3, unk4, unk5, unk6, unk7;
uint32 unk2;
std::string name;
uint16 unk8;
uint8 unk9;
uint32 unk10; // selected index
uint32 unk11;
recv_data >> guidNPC; // NPC GUID
recv_data >> unk1; // 0
recv_data >> unk2; // 0
recv_data >> name; // name
// recheck
CHECK_PACKET_SIZE(recv_data, 8+8+4+(name.size()+1)+5*8+2+1+4+4);
recv_data >> unk3; // 0
recv_data >> unk4; // 0
recv_data >> unk5; // 0
recv_data >> unk6; // 0
recv_data >> unk7; // 0
recv_data >> unk8; // 0
recv_data >> unk9; // 0
recv_data >> unk10; // index
recv_data >> unk11; // 0
sLog.outDebug("Petitioner with GUID %u tried sell petition: name %s", GUID_LOPART(guidNPC), name.c_str());
// prevent cheating
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guidNPC, UNIT_NPC_FLAG_PETITIONER);
if (!pCreature)
{
sLog.outDebug("WORLD: HandlePetitionBuyOpcode - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(guidNPC));
return;
}
// remove fake death
if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);
uint32 charterid = 0;
uint32 cost = 0;
uint32 type = 0;
if (pCreature->isTabardDesigner())
{
// if tabard designer, then trying to buy a guild charter.
// do not let if already in guild.
if (_player->GetGuildId())
return;
charterid = GUILD_CHARTER;
cost = GUILD_CHARTER_COST;
type = 9;
}
else
{
// TODO: find correct opcode
if (_player->getLevel() < sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL))
{
SendNotification(LANG_ARENA_ONE_TOOLOW, sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL));
return;
}
switch (unk10)
{
case 1:
charterid = ARENA_TEAM_CHARTER_2v2;
cost = ARENA_TEAM_CHARTER_2v2_COST;
type = 2; // 2v2
break;
case 2:
charterid = ARENA_TEAM_CHARTER_3v3;
cost = ARENA_TEAM_CHARTER_3v3_COST;
type = 3; // 3v3
break;
case 3:
charterid = ARENA_TEAM_CHARTER_5v5;
cost = ARENA_TEAM_CHARTER_5v5_COST;
type = 5; // 5v5
break;
default:
sLog.outDebug("unknown selection at buy petition: %u", unk10);
return;
}
if (_player->GetArenaTeamId(unk10-1))
{
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, name, "", ERR_ALREADY_IN_ARENA_TEAM);
return;
}
}
if (type == 9)
{
if (sGuildMgr.GetGuildByName(name))
{
SendGuildCommandResult(GUILD_CREATE_S, name, GUILD_NAME_EXISTS);
return;
}
if (sObjectMgr.IsReservedName(name) || !ObjectMgr::IsValidCharterName(name))
{
SendGuildCommandResult(GUILD_CREATE_S, name, GUILD_NAME_INVALID);
return;
}
}
else
{
if (sObjectMgr.GetArenaTeamByName(name))
{
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, name, "", ERR_ARENA_TEAM_NAME_EXISTS_S);
return;
}
if (sObjectMgr.IsReservedName(name) || !ObjectMgr::IsValidCharterName(name))
{
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, name, "", ERR_ARENA_TEAM_NAME_INVALID);
return;
}
}
ItemPrototype const *pProto = ObjectMgr::GetItemPrototype(charterid);
if (!pProto)
{
_player->SendBuyError(BUY_ERR_CANT_FIND_ITEM, NULL, charterid, 0);
return;
}
if (_player->GetMoney() < cost)
{ //player hasn't got enough money
_player->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, charterid, 0);
return;
}
ItemPosCountVec dest;
uint8 msg = _player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, charterid, pProto->BuyCount);
if (msg != EQUIP_ERR_OK)
{
_player->SendBuyError(msg, pCreature, charterid, 0);
return;
}
_player->ModifyMoney(-(int32)cost);
Item *charter = _player->StoreNewItem(dest, charterid, true);
if (!charter)
return;
charter->SetUInt32Value(ITEM_FIELD_ENCHANTMENT_1_1, charter->GetGUIDLow());
// ITEM_FIELD_ENCHANTMENT_1_1 is guild/arenateam id
// ITEM_FIELD_ENCHANTMENT_1_1+1 is current signatures count (showed on item)
charter->SetState(ITEM_CHANGED, _player);
_player->SendNewItem(charter, 1, true, false);
// a petition is invalid, if both the owner and the type matches
// we checked above, if this player is in an arenateam, so this must be
// datacorruption
QueryResultAutoPtr result = RealmDataDatabase.PQuery("SELECT petitionguid FROM petition WHERE ownerguid = '%u' AND type = '%u'", _player->GetGUIDLow(), type);
std::ostringstream ssInvalidPetitionGUIDs;
if (result)
{
do
{
Field *fields = result->Fetch();
ssInvalidPetitionGUIDs << "'" << fields[0].GetUInt32() << "' , ";
}
while (result->NextRow());
}
// delete petitions with the same guid as this one
ssInvalidPetitionGUIDs << "'" << charter->GetGUIDLow() << "'";
sLog.outDebug("Invalid petition GUIDs: %s", ssInvalidPetitionGUIDs.str().c_str());
RealmDataDatabase.escape_string(name);
RealmDataDatabase.BeginTransaction();
RealmDataDatabase.PExecute("DELETE FROM petition WHERE petitionguid IN (%s)", ssInvalidPetitionGUIDs.str().c_str());
RealmDataDatabase.PExecute("DELETE FROM petition_sign WHERE petitionguid IN (%s)", ssInvalidPetitionGUIDs.str().c_str());
RealmDataDatabase.PExecute("INSERT INTO petition (ownerguid, petitionguid, name, type) VALUES ('%u', '%u', '%s', '%u')",
_player->GetGUIDLow(), charter->GetGUIDLow(), name.c_str(), type);
RealmDataDatabase.CommitTransaction();
}
void WorldSession::HandlePetitionShowSignOpcode(WorldPacket & recv_data)
{
CHECK_PACKET_SIZE(recv_data, 8);
// ok
sLog.outDebug("Received opcode CMSG_PETITION_SHOW_SIGNATURES");
//recv_data.hexlike();
uint8 signs = 0;
uint64 petitionguid;
recv_data >> petitionguid; // petition guid
// solve (possible) some strange compile problems with explicit use GUID_LOPART(petitionguid) at some GCC versions (wrong code optimization in compiler?)
uint32 petitionguid_low = GUID_LOPART(petitionguid);
QueryResultAutoPtr result = RealmDataDatabase.PQuery("SELECT type FROM petition WHERE petitionguid = '%u'", petitionguid_low);
if (!result)
{
sLog.outLog(LOG_DEFAULT, "ERROR: any petition on server...");
return;
}
Field *fields = result->Fetch();
uint32 type = fields[0].GetUInt32();
// if guild petition and has guild => error, return;
if (type==9 && _player->GetGuildId())
return;
result = RealmDataDatabase.PQuery("SELECT playerguid FROM petition_sign WHERE petitionguid = '%u'", petitionguid_low);
// result==NULL also correct in case no sign yet
if (result)
signs = result->GetRowCount();
sLog.outDebug("CMSG_PETITION_SHOW_SIGNATURES petition entry: '%u'", petitionguid_low);
WorldPacket data(SMSG_PETITION_SHOW_SIGNATURES, (8+8+4+1+signs*12));
data << petitionguid; // petition guid
data << _player->GetGUID(); // owner guid
data << petitionguid_low; // guild guid (in Trinity always same as GUID_LOPART(petitionguid)
data << signs; // sign's count
for (uint8 i = 1; i <= signs; i++)
{
Field *fields2 = result->Fetch();
uint64 plguid = fields2[0].GetUInt64();
data << plguid; // Player GUID
data << (uint32)0; // there 0 ...
result->NextRow();
}
SendPacket(&data);
}
void WorldSession::HandlePetitionQueryOpcode(WorldPacket & recv_data)
{
CHECK_PACKET_SIZE(recv_data, 4+8);
sLog.outDebug("Received opcode CMSG_PETITION_QUERY"); // ok
//recv_data.hexlike();
uint32 guildguid;
uint64 petitionguid;
recv_data >> guildguid; // in Trinity always same as GUID_LOPART(petitionguid)
recv_data >> petitionguid; // petition guid
sLog.outDebug("CMSG_PETITION_QUERY Petition GUID %u Guild GUID %u", GUID_LOPART(petitionguid), guildguid);
SendPetitionQueryOpcode(petitionguid);
}
void WorldSession::SendPetitionQueryOpcode(uint64 petitionguid)
{
uint64 ownerguid = 0;
uint32 type;
std::string name = "NO_NAME_FOR_GUID";
uint8 signs = 0;
QueryResultAutoPtr result = RealmDataDatabase.PQuery(
"SELECT ownerguid, name, "
" (SELECT COUNT(playerguid) FROM petition_sign WHERE petition_sign.petitionguid = '%u') AS signs, "
" type "
"FROM petition WHERE petitionguid = '%u'", GUID_LOPART(petitionguid), GUID_LOPART(petitionguid));
if (result)
{
Field* fields = result->Fetch();
ownerguid = MAKE_NEW_GUID(fields[0].GetUInt32(), 0, HIGHGUID_PLAYER);
name = fields[1].GetCppString();
signs = fields[2].GetUInt8();
type = fields[3].GetUInt32();
}
else
{
sLog.outDebug("CMSG_PETITION_QUERY failed for petition (GUID: %u)", GUID_LOPART(petitionguid));
return;
}
WorldPacket data(SMSG_PETITION_QUERY_RESPONSE, (4+8+name.size()+1+1+4*13));
data << GUID_LOPART(petitionguid); // guild/team guid (in Trinity always same as GUID_LOPART(petition guid)
data << ownerguid; // charter owner guid
data << name; // name (guild/arena team)
data << uint8(0); // 1
if (type == 9)
{
data << uint32(9);
data << uint32(9);
data << uint32(0); // bypass client - side limitation, a different value is needed here for each petition
}
else
{
data << type-1;
data << type-1;
data << type; // bypass client - side limitation, a different value is needed here for each petition
}
data << uint32(0); // 5
data << uint32(0); // 6
data << uint32(0); // 7
data << uint32(0); // 8
data << uint16(0); // 9 2 bytes field
data << uint32(0); // 10
data << uint32(0); // 11
data << uint32(0); // 13 count of next strings?
data << uint32(0); // 14
if (type == 9)
data << uint32(0); // 15 0 - guild, 1 - arena team
else
data << uint32(1);
SendPacket(&data);
}
void WorldSession::HandlePetitionRenameOpcode(WorldPacket & recv_data)
{
CHECK_PACKET_SIZE(recv_data, 8+1);
sLog.outDebug("Received opcode MSG_PETITION_RENAME"); // ok
//recv_data.hexlike();
uint64 petitionguid;
uint32 type;
std::string newname;
recv_data >> petitionguid; // guid
recv_data >> newname; // new name
Item *item = _player->GetItemByGuid(petitionguid);
if (!item)
return;
QueryResultAutoPtr result = RealmDataDatabase.PQuery("SELECT type FROM petition WHERE petitionguid = '%u'", GUID_LOPART(petitionguid));
if (result)
{
Field* fields = result->Fetch();
type = fields[0].GetUInt32();
}
else
{
sLog.outDebug("CMSG_PETITION_QUERY failed for petition (GUID: %u)", GUID_LOPART(petitionguid));
return;
}
if (type == 9)
{
if (sGuildMgr.GetGuildByName(newname))
{
SendGuildCommandResult(GUILD_CREATE_S, newname, GUILD_NAME_EXISTS);
return;
}
if (sObjectMgr.IsReservedName(newname) || !ObjectMgr::IsValidCharterName(newname))
{
SendGuildCommandResult(GUILD_CREATE_S, newname, GUILD_NAME_INVALID);
return;
}
}
else
{
if (sObjectMgr.GetArenaTeamByName(newname))
{
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, newname, "", ERR_ARENA_TEAM_NAME_EXISTS_S);
return;
}
if (sObjectMgr.IsReservedName(newname) || !ObjectMgr::IsValidCharterName(newname))
{
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, newname, "", ERR_ARENA_TEAM_NAME_INVALID);
return;
}
}
std::string db_newname = newname;
RealmDataDatabase.escape_string(db_newname);
RealmDataDatabase.PExecute("UPDATE petition SET name = '%s' WHERE petitionguid = '%u'",
db_newname.c_str(), GUID_LOPART(petitionguid));
sLog.outDebug("Petition (GUID: %u) renamed to '%s'", GUID_LOPART(petitionguid), newname.c_str());
WorldPacket data(MSG_PETITION_RENAME, (8+newname.size()+1));
data << petitionguid;
data << newname;
SendPacket(&data);
}
void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data)
{
CHECK_PACKET_SIZE(recv_data, 8+1);
sLog.outDebug("Received opcode CMSG_PETITION_SIGN"); // ok
//recv_data.hexlike();
Field *fields;
uint64 petitionguid;
uint8 unk;
recv_data >> petitionguid; // petition guid
recv_data >> unk;
QueryResultAutoPtr result = RealmDataDatabase.PQuery(
"SELECT ownerguid, "
" (SELECT COUNT(playerguid) FROM petition_sign WHERE petition_sign.petitionguid = '%u') AS signs, "
" type "
"FROM petition WHERE petitionguid = '%u'", GUID_LOPART(petitionguid), GUID_LOPART(petitionguid));
if (!result)
{
sLog.outLog(LOG_DEFAULT, "ERROR: any petition on server...");
return;
}
fields = result->Fetch();
uint64 ownerguid = MAKE_NEW_GUID(fields[0].GetUInt32(), 0, HIGHGUID_PLAYER);
uint8 signs = fields[1].GetUInt8();
uint32 type = fields[2].GetUInt32();
uint32 plguidlo = _player->GetGUIDLow();
if (GUID_LOPART(ownerguid) == plguidlo)
return;
// not let enemies sign guild charter
if (!sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && GetPlayer()->GetTeam() != sObjectMgr.GetPlayerTeamByGUID(ownerguid))
{
if (type != 9)
SendArenaTeamCommandResult(ERR_ARENA_TEAM_INVITE_SS, "", "", ERR_ARENA_TEAM_NOT_ALLIED);
else
SendGuildCommandResult(GUILD_CREATE_S, "", GUILD_NOT_ALLIED);
return;
}
if (type != 9)
{
if (_player->getLevel() < sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL))
{
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, "", _player->GetName(), ERR_ARENA_TEAM_PLAYER_TO_LOW);
return;
}
uint8 slot = ArenaTeam::GetSlotByType(type);
if (slot >= MAX_ARENA_SLOT)
return;
if (_player->GetArenaTeamId(slot))
{
SendArenaTeamCommandResult(ERR_ARENA_TEAM_INVITE_SS, "", _player->GetName(), ERR_ALREADY_IN_ARENA_TEAM_S);
return;
}
if (_player->GetArenaTeamIdInvited())
{
SendArenaTeamCommandResult(ERR_ARENA_TEAM_INVITE_SS, "", _player->GetName(), ERR_ALREADY_INVITED_TO_ARENA_TEAM_S);
return;
}
}
else
{
if (_player->GetGuildId())
{
SendGuildCommandResult(GUILD_INVITE_S, _player->GetName(), ALREADY_IN_GUILD);
return;
}
if (_player->GetGuildIdInvited())
{
SendGuildCommandResult(GUILD_INVITE_S, _player->GetName(), ALREADY_INVITED_TO_GUILD);
return;
}
}
if (++signs > type) // client signs maximum
return;
//client doesn't allow to sign petition two times by one character, but not check sign by another character from same account
//not allow sign another player from already sign player account
result = RealmDataDatabase.PQuery("SELECT playerguid FROM petition_sign WHERE player_account = '%u' AND petitionguid = '%u'", GetAccountId(), GUID_LOPART(petitionguid));
if (result)
{
WorldPacket data(SMSG_PETITION_SIGN_RESULTS, (8+8+4));
data << petitionguid;
data << _player->GetGUID();
data << (uint32)PETITION_SIGN_ALREADY_SIGNED;
// close at signer side
SendPacket(&data);
// update for owner if online
if (Player *owner = sObjectMgr.GetPlayer(ownerguid))
owner->SendPacketToSelf(&data);
return;
}
RealmDataDatabase.PExecute("INSERT INTO petition_sign (ownerguid,petitionguid, playerguid, player_account) VALUES ('%u', '%u', '%u','%u')", GUID_LOPART(ownerguid),GUID_LOPART(petitionguid), plguidlo,GetAccountId());
sLog.outDebug("PETITION SIGN: GUID %u by player: %s (GUID: %u Account: %u)", GUID_LOPART(petitionguid), _player->GetName(),plguidlo,GetAccountId());
WorldPacket data(SMSG_PETITION_SIGN_RESULTS, (8+8+4));
data << petitionguid;
data << _player->GetGUID();
data << (uint32)PETITION_SIGN_OK;
// close at signer side
SendPacket(&data);
// update signs count on charter, required testing...
//Item *item = _player->GetItemByGuid(petitionguid));
//if(item)
// item->SetUInt32Value(ITEM_FIELD_ENCHANTMENT_1_1+1, signs);
// update for owner if online
if (Player *owner = sObjectMgr.GetPlayer(ownerguid))
owner->SendPacketToSelf(&data);
}
void WorldSession::HandlePetitionDeclineOpcode(WorldPacket & recv_data)
{
CHECK_PACKET_SIZE(recv_data, 8);
sLog.outDebug("Received opcode MSG_PETITION_DECLINE"); // ok
//recv_data.hexlike();
uint64 petitionguid;
uint64 ownerguid;
recv_data >> petitionguid; // petition guid
sLog.outDebug("Petition %u declined by %u", GUID_LOPART(petitionguid), _player->GetGUIDLow());
QueryResultAutoPtr result = RealmDataDatabase.PQuery("SELECT ownerguid FROM petition WHERE petitionguid = '%u'", GUID_LOPART(petitionguid));
if (!result)
return;
Field *fields = result->Fetch();
ownerguid = MAKE_NEW_GUID(fields[0].GetUInt32(), 0, HIGHGUID_PLAYER);
Player *owner = sObjectMgr.GetPlayer(ownerguid);
if (owner) // petition owner online
{
WorldPacket data(MSG_PETITION_DECLINE, 8);
data << _player->GetGUID();
owner->SendPacketToSelf(&data);
}
}
void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recv_data)
{
CHECK_PACKET_SIZE(recv_data, 4+8+8);
sLog.outDebug("Received opcode CMSG_OFFER_PETITION"); // ok
//recv_data.hexlike();
uint8 signs = 0;
uint64 petitionguid, plguid;
uint32 type, junk;
Player *player;
recv_data >> junk; // this is not petition type!
recv_data >> petitionguid; // petition guid
recv_data >> plguid; // player guid
player = ObjectAccessor::FindPlayer(plguid);
if (!player)
return;
QueryResultAutoPtr result = RealmDataDatabase.PQuery("SELECT type FROM petition WHERE petitionguid = '%u'", GUID_LOPART(petitionguid));
if (!result)
return;
Field *fields = result->Fetch();
type = fields[0].GetUInt32();
sLog.outDebug("OFFER PETITION: type %u, GUID1 %u, to player id: %u", type, GUID_LOPART(petitionguid), GUID_LOPART(plguid));
if (!sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && GetPlayer()->GetTeam() != player->GetTeam())
{
if (type != 9)
SendArenaTeamCommandResult(ERR_ARENA_TEAM_INVITE_SS, "", "", ERR_ARENA_TEAM_NOT_ALLIED);
else
SendGuildCommandResult(GUILD_CREATE_S, "", GUILD_NOT_ALLIED);
return;
}
if (type != 9)
{
if (player->getLevel() < sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL))
{
// player is too low level to join an arena team
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, player->GetName(), "", ERR_ARENA_TEAM_PLAYER_TO_LOW);
return;
}
uint8 slot = ArenaTeam::GetSlotByType(type);
if (slot >= MAX_ARENA_SLOT)
return;
if (player->GetArenaTeamId(slot))
{
// player is already in an arena team
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, player->GetName(), "", ERR_ALREADY_IN_ARENA_TEAM_S);
return;
}
if (player->GetArenaTeamIdInvited())
{
SendArenaTeamCommandResult(ERR_ARENA_TEAM_INVITE_SS, "", _player->GetName(), ERR_ALREADY_INVITED_TO_ARENA_TEAM_S);
return;
}
}
else
{
if (player->GetGuildId())
{
SendGuildCommandResult(GUILD_INVITE_S, _player->GetName(), ALREADY_IN_GUILD);
return;
}
if (player->GetGuildIdInvited())
{
SendGuildCommandResult(GUILD_INVITE_S, _player->GetName(), ALREADY_INVITED_TO_GUILD);
return;
}
}
result = RealmDataDatabase.PQuery("SELECT playerguid FROM petition_sign WHERE petitionguid = '%u'", GUID_LOPART(petitionguid));
// result==NULL also correct charter without signs
if (result)
signs = result->GetRowCount();
WorldPacket data(SMSG_PETITION_SHOW_SIGNATURES, (8+8+4+signs+signs*12));
data << petitionguid; // petition guid
data << _player->GetGUID(); // owner guid
data << GUID_LOPART(petitionguid); // guild guid (in Trinity always same as GUID_LOPART(petition guid)
data << signs; // sign's count
for (uint8 i = 1; i <= signs; i++)
{
Field *fields2 = result->Fetch();
uint64 plguid = fields2[0].GetUInt64();
data << plguid; // Player GUID
data << (uint32)0; // there 0 ...
result->NextRow();
}
player->SendPacketToSelf(&data);
}
void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
{
CHECK_PACKET_SIZE(recv_data, 8);
sLog.outDebug("Received opcode CMSG_TURN_IN_PETITION"); // ok
//recv_data.hexlike();
WorldPacket data;
uint64 petitionguid;
uint32 ownerguidlo;
uint32 type;
std::string name;
recv_data >> petitionguid;
sLog.outDebug("Petition %u turned in by %u", GUID_LOPART(petitionguid), _player->GetGUIDLow());
// data
QueryResultAutoPtr result = RealmDataDatabase.PQuery("SELECT ownerguid, name, type FROM petition WHERE petitionguid = '%u'", GUID_LOPART(petitionguid));
if (result)
{
Field *fields = result->Fetch();
ownerguidlo = fields[0].GetUInt32();
name = fields[1].GetCppString();
type = fields[2].GetUInt32();
}
else
{
sLog.outLog(LOG_DEFAULT, "ERROR: petition table has broken data!");
return;
}
if (type == 9)
{
if (_player->GetGuildId())
{
data.Initialize(SMSG_TURN_IN_PETITION_RESULTS, 4);
data << (uint32)PETITION_TURN_ALREADY_IN_GUILD; // already in guild
_player->SendPacketToSelf(&data);
return;
}
}
else
{
uint8 slot = ArenaTeam::GetSlotByType(type);
if (slot >= MAX_ARENA_SLOT)
return;
if (_player->GetArenaTeamId(slot))
{
//data.Initialize(SMSG_TURN_IN_PETITION_RESULTS, 4);
//data << (uint32)PETITION_TURN_ALREADY_IN_GUILD; // already in guild
//_player->BroadcastPacketToSelf(&data);
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, name, "", ERR_ALREADY_IN_ARENA_TEAM);
return;
}
}
if (_player->GetGUIDLow() != ownerguidlo)
return;
// signs
uint8 signs;
result = RealmDataDatabase.PQuery("SELECT playerguid FROM petition_sign WHERE petitionguid = '%u'", GUID_LOPART(petitionguid));
if (result)
signs = result->GetRowCount();
else
signs = 0;
uint32 count;
//if(signs < sWorld.getConfig(CONFIG_MIN_PETITION_SIGNS))
if (type == 9)
count = sWorld.getConfig(CONFIG_MIN_PETITION_SIGNS);
else
count = type-1;
if (signs < count)
{
data.Initialize(SMSG_TURN_IN_PETITION_RESULTS, 4);
data << (uint32)PETITION_TURN_NEED_MORE_SIGNATURES; // need more signatures...
SendPacket(&data);
return;
}
if (type == 9)
{
if (sGuildMgr.GetGuildByName(name))
{
SendGuildCommandResult(GUILD_CREATE_S, name, GUILD_NAME_EXISTS);
return;
}
}
else
{
if (sObjectMgr.GetArenaTeamByName(name))
{
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, name, "", ERR_ARENA_TEAM_NAME_EXISTS_S);
return;
}
}
// and at last charter item check
Item *item = _player->GetItemByGuid(petitionguid);
if (!item)
return;
// OK!
// delete charter item
_player->DestroyItem(item->GetBagSlot(),item->GetSlot(), true);
if (type == 9) // create guild
{
Guild* guild = new Guild;
if (!guild->create(_player->GetGUID(), name))
{
delete guild;
return;
}
// register guild and add guildmaster
sGuildMgr.AddGuild(guild);
// add members
for (uint8 i = 0; i < signs; ++i)
{
Field* fields = result->Fetch();
guild->AddMember(fields[0].GetUInt64(), guild->GetLowestRank());
result->NextRow();
}
}
else // or arena team
{
ArenaTeam* at = new ArenaTeam;
if (!at->Create(_player->GetGUID(), type, name))
{
sLog.outLog(LOG_DEFAULT, "ERROR: PetitionsHandler: arena team create failed.");
delete at;
return;
}
CHECK_PACKET_SIZE(recv_data, 8+5*4);
uint32 icon, iconcolor, border, bordercolor, backgroud;
recv_data >> backgroud >> icon >> iconcolor >> border >> bordercolor;
at->SetEmblem(backgroud, icon, iconcolor, border, bordercolor);
// register team and add captain
sObjectMgr.AddArenaTeam(at);
sLog.outDebug("PetitonsHandler: arena team added to objmrg");
// add members
for (uint8 i = 0; i < signs; ++i)
{
Field* fields = result->Fetch();
uint64 memberGUID = fields[0].GetUInt64();
sLog.outDebug("PetitionsHandler: adding arena member %u", GUID_LOPART(memberGUID));
at->AddMember(memberGUID);
result->NextRow();
}
}
RealmDataDatabase.BeginTransaction();
RealmDataDatabase.PExecute("DELETE FROM petition WHERE petitionguid = '%u'", GUID_LOPART(petitionguid));
RealmDataDatabase.PExecute("DELETE FROM petition_sign WHERE petitionguid = '%u'", GUID_LOPART(petitionguid));
RealmDataDatabase.CommitTransaction();
// created
sLog.outDebug("TURN IN PETITION GUID %u", GUID_LOPART(petitionguid));
data.Initialize(SMSG_TURN_IN_PETITION_RESULTS, 4);
data << (uint32)PETITION_TURN_OK;
SendPacket(&data);
}
void WorldSession::HandlePetitionShowListOpcode(WorldPacket & recv_data)
{
CHECK_PACKET_SIZE(recv_data, 8);
sLog.outDebug("Received CMSG_PETITION_SHOWLIST"); // ok
//recv_data.hexlike();
uint64 guid;
recv_data >> guid;
SendPetitionShowList(guid);
}
void WorldSession::SendPetitionShowList(uint64 guid)
{
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_PETITIONER);
if (!pCreature)
{
sLog.outDebug("WORLD: HandlePetitionShowListOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
return;
}
// remove fake death
if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);
uint8 count = 0;
if (pCreature->isTabardDesigner())
count = 1;
else
count = 3;
WorldPacket data(SMSG_PETITION_SHOWLIST, 8+1+4*6);
data << guid; // npc guid
data << count; // count
if (count == 1)
{
data << uint32(1); // index
data << uint32(GUILD_CHARTER); // charter entry
data << uint32(16161); // charter display id
data << uint32(GUILD_CHARTER_COST); // charter cost
data << uint32(0); // unknown
data << uint32(9); // required signs?
}
else
{
// 2v2
data << uint32(1); // index
data << uint32(ARENA_TEAM_CHARTER_2v2); // charter entry
data << uint32(16161); // charter display id
data << uint32(ARENA_TEAM_CHARTER_2v2_COST); // charter cost
data << uint32(2); // unknown
data << uint32(2); // required signs?
// 3v3
data << uint32(2); // index
data << uint32(ARENA_TEAM_CHARTER_3v3); // charter entry
data << uint32(16161); // charter display id
data << uint32(ARENA_TEAM_CHARTER_3v3_COST); // charter cost
data << uint32(3); // unknown
data << uint32(3); // required signs?
// 5v5
data << uint32(3); // index
data << uint32(ARENA_TEAM_CHARTER_5v5); // charter entry
data << uint32(16161); // charter display id
data << uint32(ARENA_TEAM_CHARTER_5v5_COST); // charter cost
data << uint32(5); // unknown
data << uint32(5); // required signs?
}
//for (uint8 i = 0; i < count; i++)
//{
// data << uint32(i); // index
// data << uint32(GUILD_CHARTER); // charter entry
// data << uint32(16161); // charter display id
// data << uint32(GUILD_CHARTER_COST+i); // charter cost
// data << uint32(0); // unknown
// data << uint32(9); // required signs?
//}
SendPacket(&data);
sLog.outDebug("Sent SMSG_PETITION_SHOWLIST");
}
| gpl-2.0 |
voltagex/kernel-sprdb2g_gonk4.0_6821 | arch/arm/mach-sc8825/devices.c | 25819 | /*
* Copyright (C) 2012 Spreadtrum Communications Inc.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <linux/fs.h>
#include <linux/android_pmem.h>
#include <linux/ion.h>
#include <linux/input.h>
#include <linux/input/matrix_keypad.h>
#include <linux/mmc/sdhci.h>
#include <linux/sprd_cproc.h>
#include <linux/sipc.h>
#include <linux/spipe.h>
#include <linux/seth.h>
#include <asm/pmu.h>
#include <mach/hardware.h>
#include <mach/regs_ahb.h>
#include <mach/regs_glb.h>
#include <mach/irqs.h>
#include <mach/dma.h>
#include <mach/board.h>
#include <mach/kpd.h>
#include "devices.h"
static struct resource sprd_serial_resources0[] = {
[0] = {
.start = SPRD_UART0_BASE,
.end = SPRD_UART0_BASE + SPRD_UART0_SIZE-1,
.name = "serial_res",
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_SER0_INT,
.end = IRQ_SER0_INT,
.flags = IORESOURCE_IRQ,
},
};
struct platform_device sprd_serial_device0 = {
.name = "serial_sprd",
.id = 0,
.num_resources = ARRAY_SIZE(sprd_serial_resources0),
.resource = sprd_serial_resources0,
};
static struct resource sprd_serial_resources1[] = {
[0] = {
.start = SPRD_UART1_BASE,
.end = SPRD_UART1_BASE + SPRD_UART1_SIZE-1,
.name = "serial_res",
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_SER1_INT,
.end = IRQ_SER1_INT,
.flags = IORESOURCE_IRQ,
},
};
struct platform_device sprd_serial_device1 = {
.name = "serial_sprd",
.id = 1,
.num_resources = ARRAY_SIZE(sprd_serial_resources1),
.resource = sprd_serial_resources1,
};
static struct resource sprd_serial_resources2[] = {
[0] = {
.start = SPRD_UART2_BASE,
.end = SPRD_UART2_BASE + SPRD_UART2_SIZE - 1,
.name = "serial_res",
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_SER2_INT,
.end = IRQ_SER2_INT,
.flags = IORESOURCE_IRQ,
}
};
struct platform_device sprd_serial_device2 = {
.name = "serial_sprd",
.id = 2,
.num_resources = ARRAY_SIZE(sprd_serial_resources2),
.resource = sprd_serial_resources2,
};
static struct resource resources_rtc[] = {
[0] = {
.start = IRQ_ANA_RTC_INT,
.end = IRQ_ANA_RTC_INT,
.flags = IORESOURCE_IRQ,
},
};
struct platform_device sprd_device_rtc= {
.name = "sprd_rtc",
.id = -1,
.num_resources = ARRAY_SIZE(resources_rtc),
.resource = resources_rtc,
};
static struct resource sprd_nand_resources[] = {
[0] = {
.start = 7,
.end = 7,
.flags = IORESOURCE_DMA,
},
[1] = {
.start = SPRD_NFC_BASE,
.end = SPRD_NFC_BASE + SPRD_NFC_SIZE - 1,
.flags = IORESOURCE_MEM,
},
};
struct platform_device sprd_nand_device = {
.name = "sprd-nand",
.id = -1,
.num_resources = ARRAY_SIZE(sprd_nand_resources),
.resource = sprd_nand_resources,
};
static struct resource sprd_hwspinlock_resources[] = {
[0] = {
.start = SPRD_HWLOCK_BASE,
.end = SPRD_HWLOCK_BASE + SPRD_HWLOCK_SIZE - 1,
.flags = IORESOURCE_MEM,
},
};
struct platform_device sprd_hwspinlock_device0 = {
.name = "sprd_hwspinlock",
.id = -1,
.num_resources = ARRAY_SIZE(sprd_hwspinlock_resources),
.resource = sprd_hwspinlock_resources,
};
static struct resource sprd_lcd_resources[] = {
[0] = {
.start = SPRD_LCDC_BASE,
.end = SPRD_LCDC_BASE + SPRD_LCDC_SIZE - 1,
.name = "lcd_res",
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_LCDC_INT,
.end = IRQ_LCDC_INT,
.flags = IORESOURCE_IRQ,
}
};
struct platform_device sprd_lcd_device0 = {
.name = "sprd_fb",
.id = 0,
.num_resources = ARRAY_SIZE(sprd_lcd_resources),
.resource = sprd_lcd_resources,
};
struct platform_device sprd_lcd_device1 = {
.name = "sprd_fb",
.id = 1,
.num_resources = ARRAY_SIZE(sprd_lcd_resources),
.resource = sprd_lcd_resources,
};
static struct resource sprd_otg_resource[] = {
[0] = {
.start = SPRD_USB_BASE,
.end = SPRD_USB_BASE + SPRD_USB_SIZE - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_USBD_INT,
.end = IRQ_USBD_INT,
.flags = IORESOURCE_IRQ,
}
};
struct platform_device sprd_otg_device = {
.name = "dwc_otg",
.id = 0,
.num_resources = ARRAY_SIZE(sprd_otg_resource),
.resource = sprd_otg_resource,
};
struct platform_device sprd_backlight_device = {
.name = "sprd_backlight",
.id = -1,
};
static struct resource sprd_i2c_resources0[] = {
[0] = {
.start = SPRD_I2C0_BASE,
.end = SPRD_I2C0_BASE + SPRD_I2C0_SIZE -1,
.name = "i2c0_res",
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_I2C0_INT,
.end = IRQ_I2C0_INT,
.flags = IORESOURCE_IRQ,
}
};
struct platform_device sprd_i2c_device0 = {
.name = "sprd-i2c",
.id = 0,
.num_resources = ARRAY_SIZE(sprd_i2c_resources0),
.resource = sprd_i2c_resources0,
};
static struct resource sprd_i2c_resources1[] = {
[0] = {
.start = SPRD_I2C1_BASE,
.end = SPRD_I2C1_BASE + SZ_4K -1,
.name = "i2c1_res",
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_I2C1_INT,
.end = IRQ_I2C1_INT,
.flags = IORESOURCE_IRQ,
}
};
struct platform_device sprd_i2c_device1 = {
.name = "sprd-i2c",
.id = 1,
.num_resources = ARRAY_SIZE(sprd_i2c_resources1),
.resource = sprd_i2c_resources1,
};
static struct resource sprd_i2c_resources2[] = {
[0] = {
.start = SPRD_I2C2_BASE,
.end = SPRD_I2C2_BASE + SZ_4K -1,
.name = "i2c2_res",
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_I2C2_INT,
.end = IRQ_I2C2_INT,
.flags = IORESOURCE_IRQ,
}
};
struct platform_device sprd_i2c_device2 = {
.name = "sprd-i2c",
.id = 2,
.num_resources = ARRAY_SIZE(sprd_i2c_resources2),
.resource = sprd_i2c_resources2,
};
static struct resource sprd_i2c_resources3[] = {
[0] = {
.start = SPRD_I2C3_BASE,
.end = SPRD_I2C3_BASE + SZ_4K -1,
.name = "i2c3_res",
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_I2C3_INT,
.end = IRQ_I2C3_INT,
.flags = IORESOURCE_IRQ,
}
};
struct platform_device sprd_i2c_device3 = {
.name = "sprd-i2c",
.id = 3,
.num_resources = ARRAY_SIZE(sprd_i2c_resources3),
.resource = sprd_i2c_resources3,
};
/* 8810 SPI devices. */
static struct resource spi0_resources[] = {
[0] = {
.start = SPRD_SPI0_BASE,
.end = SPRD_SPI0_BASE + SPRD_SPI0_SIZE - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_SPI0_INT,
.end = IRQ_SPI0_INT,
.flags = IORESOURCE_IRQ,
},
};
static struct resource spi1_resources[] = {
[0] = {
.start = SPRD_SPI1_BASE,
.end = SPRD_SPI1_BASE + SPRD_SPI1_SIZE - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_SPI1_INT,
.end = IRQ_SPI1_INT,
.flags = IORESOURCE_IRQ,
},
};
static struct resource spi2_resources[] = {
[0] = {
.start = SPRD_SPI2_BASE,
.end = SPRD_SPI2_BASE + SPRD_SPI2_SIZE - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_SPI2_INT,
.end = IRQ_SPI2_INT,
.flags = IORESOURCE_IRQ,
},
};
struct platform_device sprd_spi0_device = {
.name = "sprd_spi",
.id = 0,
.resource = spi0_resources,
.num_resources = ARRAY_SIZE(spi0_resources),
};
struct platform_device sprd_spi1_device = {
.name = "sprd_spi",
.id = 1,
.resource = spi1_resources,
.num_resources = ARRAY_SIZE(spi1_resources),
};
struct platform_device sprd_spi2_device = {
.name = "sprd_spi",
.id = 2,
.resource = spi2_resources,
.num_resources = ARRAY_SIZE(spi2_resources),
};
static struct resource sprd_ahb_bm0_res[] = {
[0] = {
.start = SPRD_BM0_BASE,
.end = SPRD_BM0_BASE + SPRD_BM0_SIZE - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_BM_INT,
.end = IRQ_BM_INT,
.flags = IORESOURCE_IRQ,
},
};
static struct resource sprd_ahb_bm1_res[] = {
[0] = {
.start = SPRD_BM1_BASE,
.end = SPRD_BM1_BASE + SPRD_BM1_SIZE - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_BM_INT,
.end = IRQ_BM_INT,
.flags = IORESOURCE_IRQ,
},
};
static struct resource sprd_ahb_bm2_res[] = {
[0] = {
.start = SPRD_BM2_BASE,
.end = SPRD_BM2_BASE + SPRD_BM2_SIZE - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_BM_INT,
.end = IRQ_BM_INT,
.flags = IORESOURCE_IRQ,
},
};
static struct resource sprd_ahb_bm3_res[] = {
[0] = {
.start = SPRD_BM3_BASE,
.end = SPRD_BM3_BASE + SPRD_BM3_SIZE - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_BM_INT,
.end = IRQ_BM_INT,
.flags = IORESOURCE_IRQ,
},
};
static struct resource sprd_ahb_bm4_res[] = {
[0] = {
.start = SPRD_BM4_BASE,
.end = SPRD_BM4_BASE + SPRD_BM4_SIZE - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_BM_INT,
.end = IRQ_BM_INT,
.flags = IORESOURCE_IRQ,
},
};
static struct resource sprd_axi_bm0_res[] = {
[0] = {
.start =SPRD_AXIBM0_BASE,
.end = SPRD_AXIBM0_BASE + SPRD_AXIBM0_SIZE - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_AXIBM_INT,
.end = IRQ_AXIBM_INT,
.flags = IORESOURCE_IRQ,
},
};
static struct resource sprd_axi_bm1_res[] = {
[0] = {
.start =SPRD_AXIBM1_BASE,
.end = SPRD_AXIBM1_BASE + SZ_4K - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_AXIBM_INT,
.end = IRQ_AXIBM_INT,
.flags = IORESOURCE_IRQ,
},
};
static struct resource sprd_axi_bm2_res[] = {
[0] = {
.start =SPRD_AXIBM2_BASE,
.end = SPRD_AXIBM2_BASE + SZ_4K - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_AXIBM_INT,
.end = IRQ_AXIBM_INT,
.flags = IORESOURCE_IRQ,
},
};
struct platform_device sprd_ahb_bm0_device = {
.name = "sprd_ahb_busmonitor",
.id = 0,
.resource = sprd_ahb_bm0_res,
.num_resources = ARRAY_SIZE(sprd_ahb_bm0_res),
};
struct platform_device sprd_ahb_bm1_device = {
.name = "sprd_ahb_busmonitor",
.id = 1,
.resource = sprd_ahb_bm1_res,
.num_resources = ARRAY_SIZE(sprd_ahb_bm1_res),
};
struct platform_device sprd_ahb_bm2_device = {
.name = "sprd_ahb_busmonitor",
.id = 2,
.resource = sprd_ahb_bm2_res,
.num_resources = ARRAY_SIZE(sprd_ahb_bm2_res),
};
struct platform_device sprd_ahb_bm3_device = {
.name = "sprd_ahb_busmonitor",
.id = 3,
.resource = sprd_ahb_bm3_res,
.num_resources = ARRAY_SIZE(sprd_ahb_bm3_res),
};
struct platform_device sprd_ahb_bm4_device = {
.name = "sprd_ahb_busmonitor",
.id = 4,
.resource = sprd_ahb_bm4_res,
.num_resources = ARRAY_SIZE(sprd_ahb_bm4_res),
};
struct platform_device sprd_axi_bm0_device = {
.name = "sprd_axi_busmonitor",
.id = 0,
.resource = sprd_axi_bm0_res,
.num_resources = ARRAY_SIZE(sprd_axi_bm0_res),
};
struct platform_device sprd_axi_bm1_device = {
.name = "sprd_axi_busmonitor",
.id = 1,
.resource = sprd_axi_bm1_res,
.num_resources = ARRAY_SIZE(sprd_axi_bm1_res),
};
struct platform_device sprd_axi_bm2_device = {
.name = "sprd_axi_busmonitor",
.id = 2,
.resource = sprd_axi_bm2_res,
.num_resources = ARRAY_SIZE(sprd_axi_bm2_res),
};
//keypad
/*
#if defined(CONFIG_MACH_SP8825EB) || defined(CONFIG_MACH_SP8825EA)
*/
#if defined(CONFIG_MACH_SP8825EB) || defined(CONFIG_MACH_SP8825EA) || defined(CONFIG_MACH_SP6825GA) || defined(CONFIG_MACH_SP6825GB)
#define CUSTOM_KEYPAD_ROWS (SCI_ROW2)
#define CUSTOM_KEYPAD_COLS (SCI_COL2)
#define ROWS (2)
#define COLS (2)
static const unsigned int test_keymap[] = {
KEY(1, 0, KEY_VOLUMEUP),
KEY(0, 0, KEY_VOLUMEDOWN),
KEY(0, 1, KEY_CAMERA),
};
#elif defined(CONFIG_MACH_GARDA)
#define CUSTOM_KEYPAD_ROWS (SCI_ROW3)
#define CUSTOM_KEYPAD_COLS (SCI_COL2)
#define ROWS (3)
#define COLS (2)
static const unsigned int test_keymap[] = {
KEY(0, 0, KEY_VOLUMEUP),
KEY(0, 1, KEY_VOLUMEDOWN),
KEY(1, 2, KEY_HOMEPAGE),
};
#else
#define CUSTOM_KEYPAD_ROWS (SCI_ROW7 | SCI_ROW6 | SCI_ROW5 | SCI_ROW4 | SCI_ROW3 |SCI_ROW2)
#define CUSTOM_KEYPAD_COLS (SCI_COL7 | SCI_COL6 | SCI_COL5 | SCI_COL4 | SCI_COL3 |SCI_COL2)
#define ROWS (8)
#define COLS (8)
static const unsigned int test_keymap[] = {
KEY(0, 0, KEY_F1),
KEY(0, 3, KEY_COFFEE),
KEY(0, 2, KEY_QUESTION),
KEY(2, 3, KEY_CONNECT),
KEY(1, 2, KEY_SHOP),
KEY(1, 1, KEY_PHONE),
KEY(0, 1, KEY_DELETE),
KEY(2, 2, KEY_PLAY),
KEY(1, 0, KEY_PAGEUP),
KEY(1, 3, KEY_PAGEDOWN),
KEY(2, 0, KEY_EMAIL),
KEY(2, 1, KEY_STOP),
KEY(0, 7, KEY_KP1),
KEY(0, 6, KEY_KP2),
KEY(0, 5, KEY_KP3),
KEY(1, 7, KEY_KP4),
KEY(1, 6, KEY_KP5),
KEY(1, 5, KEY_KP6),
KEY(2, 7, KEY_KP7),
KEY(2, 6, KEY_KP8),
KEY(2, 5, KEY_KP9),
KEY(3, 6, KEY_KP0),
KEY(3, 7, KEY_KPASTERISK),
KEY(3, 5, KEY_KPDOT),
KEY(7, 2, KEY_NUMLOCK),
KEY(7, 1, KEY_KPMINUS),
KEY(6, 1, KEY_KPPLUS),
KEY(7, 6, KEY_KPSLASH),
KEY(6, 0, KEY_ENTER),
KEY(7, 4, KEY_CAMERA),
KEY(0, 4, KEY_F2),
KEY(1, 4, KEY_F3),
KEY(2, 4, KEY_F4),
KEY(7, 7, KEY_F5),
KEY(7, 5, KEY_F6),
KEY(3, 4, KEY_Q),
KEY(3, 3, KEY_W),
KEY(3, 2, KEY_E),
KEY(3, 1, KEY_R),
KEY(3, 0, KEY_T),
KEY(4, 7, KEY_Y),
KEY(4, 6, KEY_U),
KEY(4, 5, KEY_I),
KEY(4, 4, KEY_O),
KEY(4, 3, KEY_P),
KEY(4, 2, KEY_A),
KEY(4, 1, KEY_S),
KEY(4, 0, KEY_D),
KEY(5, 7, KEY_F),
KEY(5, 6, KEY_G),
KEY(5, 5, KEY_H),
KEY(5, 4, KEY_J),
KEY(5, 3, KEY_K),
KEY(5, 2, KEY_L),
KEY(5, 1, KEY_Z),
KEY(5, 0, KEY_X),
KEY(6, 7, KEY_C),
KEY(6, 6, KEY_V),
KEY(6, 5, KEY_B),
KEY(6, 4, KEY_N),
KEY(6, 3, KEY_M),
KEY(6, 2, KEY_SPACE),
KEY(7, 0, KEY_LEFTSHIFT),
KEY(7, 3, KEY_LEFTCTRL),
};
#endif
static const struct matrix_keymap_data test_keymap_data = {
.keymap = test_keymap,
.keymap_size = ARRAY_SIZE(test_keymap),
};
struct sci_keypad_platform_data sci_keypad_data = {
.rows_choose_hw = CUSTOM_KEYPAD_ROWS,
.cols_choose_hw = CUSTOM_KEYPAD_COLS,
.rows = ROWS,
.cols = COLS,
.keymap_data = &test_keymap_data,
.support_long_key = 1,
.repeat = 0,
.debounce_time = 5000,
.keyup_test_interval = 50,
};
static struct resource sci_keypad_resources[] = {
{
.start = IRQ_KPD_INT,
.end = IRQ_KPD_INT,
.flags = IORESOURCE_IRQ,
},
};
struct platform_device sprd_keypad_device = {
.name = "sci-keypad",
.id = -1,
.dev = {
.platform_data = &sci_keypad_data,
},
.num_resources = ARRAY_SIZE(sci_keypad_resources),
.resource = sci_keypad_resources,
};
struct platform_device sprd_audio_platform_pcm_device = {
.name = "sprd-pcm-audio",
.id = -1,
};
struct platform_device sprd_audio_cpu_dai_vaudio_device = {
.name = "vaudio",
.id = -1,
};
struct platform_device sprd_audio_cpu_dai_vbc_device = {
.name = "vbc",
.id = -1,
};
struct platform_device sprd_audio_codec_sprd_codec_device = {
.name = "sprd-codec",
.id = -1,
};
static struct resource sprd_i2s_resources0[] = {
[0] = {
.start = SPRD_IIS0_BASE,
.end = SPRD_IIS0_BASE + SZ_4K -1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = SPRD_IIS0_PHYS,
.end = SPRD_IIS0_PHYS + SZ_4K -1,
.flags = IORESOURCE_MEM,
},
[2] = {
.start = DMA_IIS_TX,
.end = DMA_IIS_RX,
.flags = IORESOURCE_DMA,
}
};
struct platform_device sprd_audio_cpu_dai_i2s_device = {
.name = "i2s",
.id = 0,
.num_resources = ARRAY_SIZE(sprd_i2s_resources0),
.resource = sprd_i2s_resources0,
};
static struct resource sprd_i2s_resources1[] = {
[0] = {
.start = SPRD_IIS1_BASE,
.end = SPRD_IIS1_BASE + SZ_4K -1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = SPRD_IIS1_PHYS,
.end = SPRD_IIS1_PHYS + SZ_4K -1,
.flags = IORESOURCE_MEM,
},
[2] = {
.start = DMA_IIS1_TX,
.end = DMA_IIS1_RX,
.flags = IORESOURCE_DMA,
}
};
struct platform_device sprd_audio_cpu_dai_i2s_device1 = {
.name = "i2s",
.id = 1,
.num_resources = ARRAY_SIZE(sprd_i2s_resources1),
.resource = sprd_i2s_resources1,
};
struct platform_device sprd_audio_codec_null_codec_device = {
.name = "null-codec",
.id = -1,
};
static struct resource sprd_battery_resources[] = {
[0] = {
.start = EIC_CHARGER_DETECT,
.end = EIC_CHARGER_DETECT,
.flags = IORESOURCE_IO,
}
};
struct platform_device sprd_battery_device = {
.name = "sprd-battery",
.id = 0,
.num_resources = ARRAY_SIZE(sprd_battery_resources),
.resource = sprd_battery_resources,
};
struct platform_device sprd_vsp_device = {
.name = "sprd_vsp",
.id = -1,
};
#ifdef CONFIG_ANDROID_PMEM
static struct android_pmem_platform_data sprd_pmem_pdata = {
.name = "pmem",
.start = SPRD_PMEM_BASE,
.size = SPRD_PMEM_SIZE,
.no_allocator = 0,
.cached = 1,
};
static struct android_pmem_platform_data sprd_pmem_adsp_pdata = {
.name = "pmem_adsp",
.start = SPRD_PMEM_ADSP_BASE,
.size = SPRD_PMEM_ADSP_SIZE,
.no_allocator = 0,
.cached = 1,
};
struct platform_device sprd_pmem_device = {
.name = "android_pmem",
.id = 0,
.dev = {.platform_data = &sprd_pmem_pdata},
};
struct platform_device sprd_pmem_adsp_device = {
.name = "android_pmem",
.id = 1,
.dev = {.platform_data = &sprd_pmem_adsp_pdata},
};
#endif
#ifdef CONFIG_ION
static struct ion_platform_data ion_pdata = {
#if CONFIG_SPRD_ION_OVERLAY_SIZE
.nr = 2,
#else
.nr = 1,
#endif
.heaps = {
{
.id = ION_HEAP_TYPE_CARVEOUT,
.type = ION_HEAP_TYPE_CARVEOUT,
.name = "ion_carveout_heap",
.base = SPRD_ION_BASE,
.size = SPRD_ION_SIZE,
},
#if CONFIG_SPRD_ION_OVERLAY_SIZE
{
.id = ION_HEAP_TYPE_CARVEOUT + 1,
.type = ION_HEAP_TYPE_CARVEOUT,
.name = "ion_carveout_heap_overlay",
.base = SPRD_ION_OVERLAY_BASE,
.size = SPRD_ION_OVERLAY_SIZE,
},
#endif
}
};
struct platform_device sprd_ion_dev = {
.name = "ion-sprd",
.id = -1,
.dev = { .platform_data = &ion_pdata },
};
#endif
static struct resource sprd_dcam_resources[] = {
{
.start = SPRD_ISP_BASE,
.end = SPRD_ISP_BASE + SPRD_ISP_SIZE - 1,
.flags = IORESOURCE_MEM,
},
{
.start = IRQ_ISP_INT,
.end = IRQ_ISP_INT,
.flags = IORESOURCE_IRQ,
},
};
struct platform_device sprd_dcam_device = {
.name = "sprd_dcam",
.id = 0,
.num_resources = ARRAY_SIZE(sprd_dcam_resources),
.resource = sprd_dcam_resources,
};
struct platform_device sprd_scale_device = {
.name = "sprd_scale",
.id = -1,
};
struct platform_device sprd_rotation_device = {
.name = "sprd_rotation",
.id = -1,
};
struct platform_device sprd_sensor_device = {
.name = "sprd_sensor",
.id = -1,
};
struct platform_device sprd_isp_device = {
.name = "sprd_isp",
.id = -1,
};
static struct resource sprd_sdio0_resources[] = {
[0] = {
.start = SPRD_SDIO0_BASE,
.end = SPRD_SDIO0_BASE + SPRD_SDIO0_SIZE-1,
.name = "sdio0_res",
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_SDIO0_INT,
.end = IRQ_SDIO0_INT,
.flags = IORESOURCE_IRQ,
}
};
static struct sprd_host_platdata sprd_sdio0_pdata = {
.hw_name = "sprd-sdcard",
.detect_gpio = 140,
.vdd_name = "vddsd0",
.clk_name = "clk_sdio0",
.clk_parent = "clk_sdio_src",
.max_clock = 90000000,
.enb_bit = BIT_SDIO0_EB,
.rst_bit = BIT_SD0_SOFT_RST,
};
struct platform_device sprd_sdio0_device = {
.name = "sprd-sdhci",
.id = SDC_SLAVE_SD,
.num_resources = ARRAY_SIZE(sprd_sdio0_resources),
.resource = sprd_sdio0_resources,
.dev = { .platform_data = &sprd_sdio0_pdata },
};
static struct resource sprd_sdio1_resources[] = {
[0] = {
.start = SPRD_SDIO1_BASE,
.end = SPRD_SDIO1_BASE + SPRD_SDIO1_SIZE-1,
.name = "sdio1_res",
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_SDIO1_INT,
.end = IRQ_SDIO1_INT,
.flags = IORESOURCE_IRQ,
}
};
static struct sprd_host_platdata sprd_sdio1_pdata = {
.hw_name = "sprd-sdio1",
.vdd_name = "vddsd1",
.clk_name = "clk_sdio1",
.clk_parent = "clk_sdio_src",
.max_clock = 90000000,
.enb_bit = BIT_SDIO1_EB,
.rst_bit = BIT_SD1_SOFT_RST,
.regs.is_valid = 1,
};
struct platform_device sprd_sdio1_device = {
.name = "sprd-sdhci",
.id = SDC_SLAVE_WIFI,
.num_resources = ARRAY_SIZE(sprd_sdio1_resources),
.resource = sprd_sdio1_resources,
.dev = { .platform_data = &sprd_sdio1_pdata },
};
static struct resource sprd_sdio2_resources[] = {
[0] = {
.start = SPRD_SDIO2_BASE,
.end = SPRD_SDIO2_BASE + SPRD_SDIO2_SIZE - 1,
.name = "sdio2_res",
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_SDIO2_INT,
.end = IRQ_SDIO2_INT,
.flags = IORESOURCE_IRQ,
}
};
static struct sprd_host_platdata sprd_sdio2_pdata = {
.hw_name = "sprd-sdio2",
.clk_name = "clk_sdio2",
.clk_parent = "clk_192m",
.enb_bit = BIT_SDIO2_EB,
.rst_bit = BIT_SD2_SOFT_RST,
};
struct platform_device sprd_sdio2_device = {
.name = "sprd-sdhci",
.id = SDC_SLAVE_CP,
.num_resources = ARRAY_SIZE(sprd_sdio2_resources),
.resource = sprd_sdio2_resources,
.dev = { .platform_data = &sprd_sdio2_pdata },
};
static struct resource sprd_emmc_resources[] = {
[0] = {
.start = SPRD_EMMC_BASE,
.end = SPRD_EMMC_BASE + SPRD_EMMC_SIZE - 1,
.name = "sdio3_res",
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_EMMC_INT,
.end = IRQ_EMMC_INT,
.flags = IORESOURCE_IRQ,
}
};
static struct sprd_host_platdata sprd_emmc_pdata = {
.hw_name = "sprd-emmc",
.vdd_name = "vddsd3",
.vdd_ext_name = "vdd3v",
.clk_name = "clk_emmc",
.clk_parent = "clk_384m",
.max_clock = 384000000,
.enb_bit = BIT_EMMC_EB,
.rst_bit = BIT_EMMC_SOFT_RST,
.regs.is_valid = 1,
};
struct platform_device sprd_emmc_device = {
.name = "sprd-sdhci",
.id = SDC_SLAVE_EMMC,
.num_resources = ARRAY_SIZE(sprd_emmc_resources),
.resource = sprd_emmc_resources,
.dev = { .platform_data = &sprd_emmc_pdata },
};
#define TD_REG_CLK_ADDR (SPRD_AHB_BASE + 0x250)
#define TD_REG_RESET_ADDR (SPRD_AHB_BASE + 0x254)
#define TD_CTL_ENABLE (0x01)
#define TD_CTL_DISENABLE (0x00)
#define TD_CTL_CLK_VAL (0x0F)
static int native_tdmodem_start(void *arg)
{
#if defined(CONFIG_SIPC)
u32 cpdata[3] = {0xe59f0000, 0xe12fff10, 0x80500000};
/*disbale cp clock */
__raw_writel(TD_CTL_DISENABLE, TD_REG_CLK_ADDR);
/* hold stop cp */
__raw_writel(TD_CTL_DISENABLE, TD_REG_RESET_ADDR);
/*cp iram select to ap */
memcpy((volatile u32*)SPRD_TDPROC_BASE, cpdata, sizeof(cpdata));
/*enbale cp clock */
__raw_writel(TD_CTL_CLK_VAL, TD_REG_CLK_ADDR);
/* reset cp */
__raw_writel(TD_CTL_ENABLE, TD_REG_RESET_ADDR);
#endif
return 0;
}
static struct cproc_init_data sprd_cproc_td_pdata = {
.devname = "cproc_td",
.base = 0x80000000,
.maxsz = 0x02000000,
.start = native_tdmodem_start,
.segnr = 2,
.segs = {
{
.name = "modem",
.base = 0x80500000,
.maxsz = 0x00800000,
},
{
.name = "dsp",
.base = 0x80020000,
.maxsz = 0x003E0000,
},
},
};
struct platform_device sprd_cproc_td_device = {
.name = "sprd_cproc",
.id = 0,
.dev = {.platform_data = &sprd_cproc_td_pdata},
};
static struct spipe_init_data sprd_spipe_td_pdata = {
.name = "spipe_td",
.dst = SIPC_ID_CPT,
.channel = SMSG_CH_PIPE,
.ringnr = 8,
.txbuf_size = 4096,
.rxbuf_size = 4096,
};
struct platform_device sprd_spipe_td_device = {
.name = "spipe",
.id = 0,
.dev = {.platform_data = &sprd_spipe_td_pdata},
};
static struct spipe_init_data sprd_slog_td_pdata = {
.name = "slog_td",
.dst = SIPC_ID_CPT,
.channel = SMSG_CH_PLOG,
.ringnr = 1,
.txbuf_size = 16,
.rxbuf_size = 256 * 1024,
};
struct platform_device sprd_slog_td_device = {
.name = "spipe",
.id = 1,
.dev = {.platform_data = &sprd_slog_td_pdata},
};
static struct spipe_init_data sprd_stty_td_pdata = {
/* to be compatible with vlx mux dev nodes */
.name = "ts0710mux",
.dst = SIPC_ID_CPT,
.channel = SMSG_CH_TTY,
.ringnr = 32,
.txbuf_size = 1024,
.rxbuf_size = 1024,
};
struct platform_device sprd_stty_td_device = {
.name = "spipe",
.id = 2,
.dev = {.platform_data = &sprd_stty_td_pdata},
};
#ifdef CONFIG_ARCH_SC8825
static struct resource sprd_pmu_resource[] = {
[0] = {
.start = IRQ_CA5PMU_NCT_INT0,
.end = IRQ_CA5PMU_NCT_INT0,
.flags = IORESOURCE_IRQ,
},
[1] = {
.start = IRQ_CA5PMU_NCT_INT1,
.end = IRQ_CA5PMU_NCT_INT1,
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device sprd_pmu_device = {
.name = "arm-pmu",
.id = ARM_PMU_DEVICE_CPU,
.resource = sprd_pmu_resource,
.num_resources = ARRAY_SIZE(sprd_pmu_resource),
};
static int __init sprd_init_pmu(void)
{
return platform_device_register(&sprd_pmu_device);
}
arch_initcall(sprd_init_pmu);
#endif /* CONFIG_ARCH_SC8825 */
static struct seth_init_data sprd_seth_td_pdata = {
.name = "veth0",
.dst = SIPC_ID_CPT,
.channel = SMSG_CH_DATA,
};
struct platform_device sprd_seth_td_device = {
.name = "seth",
.id = 0,
.dev = {.platform_data = &sprd_seth_td_pdata},
};
struct platform_device sprd_peer_state_device = {
.name = "peer_state",
.id = -1,
};
| gpl-2.0 |
the-wilhelm/chicagostorage | wp-content/plugins/wp-postratings/postratings-manager.php | 27209 | <?php
/*
+----------------------------------------------------------------+
| |
| WordPress Plugin: WP-PostRatings |
| Copyright (c) 2012 Lester "GaMerZ" Chan |
| |
| File Written By: |
| - Lester "GaMerZ" Chan |
| - http://lesterchan.net |
| |
| File Information: |
| - Manage Post Ratings Logs |
| - wp-content/plugins/wp-postratings/postratings-manager.php |
| |
+----------------------------------------------------------------+
*/
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) exit;
// Check Whether User Can Manage Ratings
if ( ! current_user_can( 'manage_ratings' ) )
die( 'Access Denied' );
$base_name = plugin_basename( 'wp-postratings/postratings-manager.php' );
$base_page = admin_url( 'admin.php?page=' . urlencode( $base_name ) );
$postratings_sort_url = '';
$postratings_sortby_text = '';
$postratings_sortorder_text = '';
$ratings_image = get_option( 'postratings_image' );
$ratings_max = intval( get_option( 'postratings_max' ) );
// Handle $_GET values
$postratings_filterid = isset( $_GET['id'] ) ? intval( $_GET['id'] ) : 0;
$postratings_filterrating = isset( $_GET['rating'] ) ? intval( $_GET['rating'] ) : 0;
$postratings_filteruser = isset( $_GET['user'] ) ? sanitize_text_field( $_GET['user'] ) : '';
$postratings_log_perpage = isset( $_GET['perpage'] ) ? intval( $_GET['perpage'] ) : 20;
$postratings_page = ! empty( $_GET['ratingpage'] ) ? intval( $_GET['ratingpage'] ) : 1;
$postratings_sortby = 'rating_timestamp';
$postratings_sortorder = 'DESC';
// For BY and ORDER, only accept data from a finite list of known and trusted values.
if ( isset( $_GET['by'] ) && in_array( $_GET['by'], array( 'date', 'host', 'id', 'ip', 'postid', 'posttitle', 'rating', 'username', ) ) )
$postratings_sortby = $_GET['by'];
if ( isset( $_GET['order'] ) && in_array( $_GET['order'], array( 'asc', 'desc', ) ) )
$postratings_sortorder = $_GET['order'];
### Form Processing
if ( ! empty( $_POST['do'] ) ) {
check_admin_referer('wp-postratings_logs');
$delete_datalog = isset( $_POST['delete_datalog'] ) ? (int) $_POST['delete_datalog'] : 1;
$post_ids = '';
$post_ids_list = array();
$ratings_postmeta = array( 'ratings_users', 'ratings_score', 'ratings_average', );
// delete_postid is either a comma-separated list of integers, or "all".
if ( ! empty( $_POST['delete_postid'] ) ) {
// "all" is the only string value accepted
if ( $_POST['delete_postid'] != 'all' ) {
$post_ids_list = wp_parse_id_list( $_POST['delete_postid'] );
$post_ids = implode( ',', $post_ids_list );
}
else {
$post_ids = 'all';
}
}
switch($delete_datalog) {
case 1:
if($post_ids == 'all') {
$delete_logs = $wpdb->query("DELETE FROM $wpdb->ratings");
if($delete_logs) {
$text = '<font color="green">'.__('All Post Ratings Logs Have Been Deleted.', 'wp-postratings').'</font>';
} else {
$text = '<font color="red">'.__('An Error Has Occured While Deleting All Post Ratings Logs.', 'wp-postratings').'</font>';
}
} else {
$delete_logs = $wpdb->query( "DELETE FROM {$wpdb->ratings} WHERE rating_postid IN (" . $post_ids . ')' );
if($delete_logs) {
$text = '<font color="green">'.sprintf(__('All Post Ratings Logs For Post ID(s) %s Have Been Deleted.', 'wp-postratings'), $post_ids).'</font>';
} else {
$text = '<font color="red">'.sprintf(__('An Error Has Occured While Deleting All Post Ratings Logs For Post ID(s) %s.', 'wp-postratings'), $post_ids).'</font>';
}
}
break;
case 2:
// @todo Deleting meta records like will not clear the post's object cache
if($post_ids == 'all') {
foreach($ratings_postmeta as $postmeta) {
$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->postmeta} WHERE meta_key = %s", $postmeta ) );
$text .= '<font color="green">'.sprintf(__('Rating Data "%s" Has Been Deleted.', 'wp-postratings'), "<strong><em>$postmeta</em></strong>").'</font><br />';
}
} else {
foreach ( $post_ids_list as $the_post_id ) {
foreach( $ratings_postmeta as $meta_key ) {
delete_post_meta( $the_post_id, $meta_key );
$text .= '<font color="green">'.sprintf(__('Rating Data "%s" For Post ID(s) %s Has Been Deleted.', 'wp-postratings'), "<strong><em>$meta_key</em></strong>", $post_ids).'</font><br />';
}
}
}
break;
case 3:
if($post_ids == 'all') {
$delete_logs = $wpdb->query("DELETE FROM $wpdb->ratings");
if($delete_logs) {
$text = '<font color="green">'.__('All Post Ratings Logs Have Been Deleted.', 'wp-postratings').'</font><br />';
} else {
$text = '<font color="red">'.__('An Error Has Occured While Deleting All Post Ratings Logs.', 'wp-postratings').'</font><br />';
}
// @todo Deleting meta records like will not clear the post's object cache
foreach($ratings_postmeta as $postmeta) {
$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->postmeta} WHERE meta_key = %s", $postmeta ) );
$text .= '<font color="green">'.sprintf(__('Rating Data "%s" Has Been Deleted.', 'wp-postratings'), "<strong><em>$postmeta</em></strong>").'</font><br />';
}
} else {
$delete_logs = $wpdb->query( "DELETE FROM {$wpdb->ratings} WHERE rating_postid IN (" . $post_ids . ')' );
if($delete_logs) {
$text = '<font color="green">'.sprintf(__('All Post Ratings Logs For Post ID(s) %s Have Been Deleted.', 'wp-postratings'), $post_ids).'</font><br />';
} else {
$text = '<font color="red">'.sprintf(__('An Error Has Occured While Deleting All Post Ratings Logs For Post ID(s) %s.', 'wp-postratings'), $post_ids).'</font><br />';
}
foreach ( $post_ids_list as $the_post_id ) {
foreach( $ratings_postmeta as $meta_key ) {
delete_post_meta( $the_post_id, $meta_key );
$text .= '<font color="green">'.sprintf(__('Rating Data "%s" For Post ID(s) %s Has Been Deleted.', 'wp-postratings'), "<strong><em>$meta_key</em></strong>", $post_ids).'</font><br />';
}
}
}
break;
}
} // if ( ! empty( $_POST['do'] ) )
### Form Sorting URL
// @todo Use add_query_arg() for these
if(!empty($postratings_filterid)) {
$postratings_sort_url .= '&id='.$postratings_filterid;
}
if(!empty($postratings_filteruser)) {
$postratings_sort_url .= '&user='.urlencode( $postratings_filteruser );
}
if ( ! empty( $postratings_filterrating ) ) {
$postratings_sort_url .= '&rating='.$postratings_filterrating;
}
if(!empty($postratings_sortby)) {
$postratings_sort_url .= '&by='.urlencode( $postratings_sortby );
}
if(!empty($postratings_sortorder)) {
$postratings_sort_url .= '&order='.urlencode( $postratings_sortorder );
}
if(!empty($postratings_log_perpage)) {
$postratings_sort_url .= '&perpage='.$postratings_log_perpage;
}
### Get Order By
switch($postratings_sortby) {
case 'id':
$postratings_sortby = 'rating_id';
$postratings_sortby_text = __('ID', 'wp-postratings');
break;
case 'username':
$postratings_sortby = 'rating_username';
$postratings_sortby_text = __('Username', 'wp-postratings');
break;
case 'rating':
$postratings_sortby = 'rating_rating';
$postratings_sortby_text = __('Rating', 'wp-postratings');
break;
case 'postid':
$postratings_sortby = 'rating_postid';
$postratings_sortby_text = __('Post ID', 'wp-postratings');
break;
case 'posttitle':
$postratings_sortby = 'rating_posttitle';
$postratings_sortby_text = __('Post Title', 'wp-postratings');
break;
case 'ip':
$postratings_sortby = 'rating_ip';
$postratings_sortby_text = __('IP', 'wp-postratings');
break;
case 'host':
$postratings_sortby = 'rating_host';
$postratings_sortby_text = __('Host', 'wp-postratings');
break;
case 'date':
default:
$postratings_sortby = 'rating_timestamp';
$postratings_sortby_text = __('Date', 'wp-postratings');
}
### Get Sort Order
if ( $postratings_sortorder == 'ASC' )
$postratings_sortorder_text = __('Ascending', 'wp-postratings');
else
$postratings_sortorder_text = __('Descending', 'wp-postratings');
// Where
$postratings_where = '';
if ( $postratings_filterid )
$postratings_where = $wpdb->prepare( "AND rating_postid = %d", $postratings_filterid );;
if ( ! empty( $postratings_filteruser ) )
$postratings_where .= $wpdb->prepare( " AND rating_username = %s", $postratings_filteruser );
if ( ! empty( $postratings_filterrating ) )
$postratings_where .= $wpdb->prepare( " AND rating_rating = %d", $postratings_filterrating );
// Get Post Ratings Logs Data
$total_ratings = $wpdb->get_var("SELECT COUNT(rating_id) FROM $wpdb->ratings WHERE 1=1 $postratings_where");
$total_users = $wpdb->get_var("SELECT SUM(meta_value) FROM $wpdb->postmeta WHERE meta_key = 'ratings_users'");
$total_score = $wpdb->get_var("SELECT SUM((meta_value+0.00)) FROM $wpdb->postmeta WHERE meta_key = 'ratings_score'");
$ratings_custom = intval(get_option('postratings_customrating'));
if($total_users == 0) {
$total_average = 0;
} else {
$total_average = $total_score/$total_users;
}
// Determin $offset
$offset = ($postratings_page-1) * $postratings_log_perpage;
// Determine Max Number Of Ratings To Display On Page
if(($offset + $postratings_log_perpage) > $total_ratings) {
$max_on_page = $total_ratings;
} else {
$max_on_page = ($offset + $postratings_log_perpage);
}
// Determine Number Of Ratings To Display On Page
if (($offset + 1) > ($total_ratings)) {
$display_on_page = $total_ratings;
} else {
$display_on_page = ($offset + 1);
}
// Determing Total Amount Of Pages
$total_pages = ceil($total_ratings / $postratings_log_perpage);
// Get The Logs
$postratings_logs = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->ratings} WHERE 1=1 {$postratings_where} ORDER BY {$postratings_sortby} {$postratings_sortorder} LIMIT %d, %d", $offset, $postratings_log_perpage ) );
?>
<?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
<!-- Manage Post Ratings -->
<div class="wrap">
<h2><?php _e('Manage Ratings', 'wp-postratings'); ?></h2>
<h3><?php _e('Post Ratings Logs', 'wp-postratings'); ?></h3>
<p><?php printf(__('Displaying <strong>%s</strong> to <strong>%s</strong> of <strong>%s</strong> Post Ratings log entries.', 'wp-postratings'), number_format_i18n($display_on_page), number_format_i18n($max_on_page), number_format_i18n($total_ratings)); ?></p>
<p><?php printf(__('Sorted by <strong>%s</strong> in <strong>%s</strong> order.', 'wp-postratings'), $postratings_sortby_text, $postratings_sortorder_text); ?></p>
<table class="widefat">
<thead>
<tr>
<th width="2%"><?php _e('ID', 'wp-postratings'); ?></th>
<th width="10%"><?php _e('Username', 'wp-postratings'); ?></th>
<th width="10%"><?php _e('Rating', 'wp-postratings'); ?></th>
<th width="8%"><?php _e('Post ID', 'wp-postratings'); ?></th>
<th width="25%"><?php _e('Post Title', 'wp-postratings'); ?></th>
<th width="20%"><?php _e('Date / Time', 'wp-postratings'); ?></th>
<th width="25%"><?php _e('IP / Host', 'wp-postratings'); ?></th>
</tr>
</thead>
<tbody>
<?php
if($postratings_logs) {
$i = 0;
foreach($postratings_logs as $postratings_log) {
if($i%2 == 0) {
$style = 'class="alternate"';
} else {
$style = '';
}
$postratings_id = intval($postratings_log->rating_id);
$postratings_username = stripslashes($postratings_log->rating_username);
$postratings_rating = intval($postratings_log->rating_rating);
$postratings_postid = intval($postratings_log->rating_postid);
$postratings_posttitle = stripslashes($postratings_log->rating_posttitle);
$postratings_date = mysql2date(sprintf(__('%s @ %s', 'wp-postratings'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $postratings_log->rating_timestamp));
$postratings_ip = $postratings_log->rating_ip;
$postratings_host = $postratings_log->rating_host;
echo "<tr $style>\n";
echo '<td>'.$postratings_id.'</td>'."\n";
echo "<td>$postratings_username</td>\n";
echo '<td nowrap="nowrap">';
if($ratings_custom && $ratings_max == 2) {
if($postratings_rating > 0) {
$postratings_rating = '+'.$postratings_rating;
}
echo $postratings_rating;
} else {
if('rtl' == $text_direction && file_exists(WP_PLUGIN_DIR.'/wp-postratings/images/'.$ratings_image.'/rating_start-rtl.'.RATINGS_IMG_EXT)) {
echo '<img src="'.plugins_url('wp-postratings/images/'.$ratings_image.'/rating_start-rtl.'.RATINGS_IMG_EXT).'" alt="" class="post-ratings-image" />';
} elseif(file_exists(WP_PLUGIN_DIR.'/wp-postratings/images/'.$ratings_image.'/rating_start.'.RATINGS_IMG_EXT)) {
echo '<img src="'.plugins_url('wp-postratings/images/'.$ratings_image.'/rating_start.'.RATINGS_IMG_EXT).'" alt="" class="post-ratings-image" />';
}
if($ratings_custom) {
for($j=1; $j <= $ratings_max; $j++) {
if($j <= $postratings_rating) {
echo '<img src="'.plugins_url('wp-postratings/images/'.$ratings_image.'/rating_'.$j.'_on.'.RATINGS_IMG_EXT).'" alt="'.sprintf(_n('User Rate This Post %s Star', 'User Rate This Post %s Stars', $postratings_rating, 'wp-postratings'), $postratings_rating).__(' Out Of ', 'wp-postratings').$ratings_max.'" title="'.sprintf(_n('User Rate This Post %s Star', 'User Rate This Post %s Stars', $postratings_rating, 'wp-postratings'), $postratings_rating).__(' Out Of ', 'wp-postratings').$ratings_max.'" class="post-ratings-image" />';
} else {
echo '<img src="'.plugins_url('wp-postratings/images/'.$ratings_image.'/rating_'.$j.'_off.'.RATINGS_IMG_EXT).'" alt="'.sprintf(_n('User Rate This Post %s Star', 'User Rate This Post %s Stars', $postratings_rating, 'wp-postratings'), $postratings_rating).__(' Out Of ', 'wp-postratings').$ratings_max.'" title="'.sprintf(_n('User Rate This Post %s Star', 'User Rate This Post %s Stars', $postratings_rating, 'wp-postratings'), $postratings_rating).__(' Out Of ', 'wp-postratings').$ratings_max.'" class="post-ratings-image" />';
}
}
} else {
for($j=1; $j <= $ratings_max; $j++) {
if($j <= $postratings_rating) {
echo '<img src="'.plugins_url('wp-postratings/images/'.$ratings_image.'/rating_on.'.RATINGS_IMG_EXT).'" alt="'.sprintf(_n('User Rate This Post %s Star', 'User Rate This Post %s Stars', $postratings_rating, 'wp-postratings'), $postratings_rating).__(' Out Of ', 'wp-postratings').$ratings_max.'" title="'.sprintf(_n('User Rate This Post %s Star', 'User Rate This Post %s Stars', $postratings_rating, 'wp-postratings'), $postratings_rating).__(' Out Of ', 'wp-postratings').$ratings_max.'" class="post-ratings-image" />';
} else {
echo '<img src="'.plugins_url('wp-postratings/images/'.$ratings_image.'/rating_off.'.RATINGS_IMG_EXT).'" alt="'.sprintf(_n('User Rate This Post %s Star', 'User Rate This Post %s Stars', $postratings_rating, 'wp-postratings'), $postratings_rating).__(' Out Of ', 'wp-postratings').$ratings_max.'" title="'.sprintf(_n('User Rate This Post %s Star', 'User Rate This Post %s Stars', $postratings_rating, 'wp-postratings'), $postratings_rating).__(' Out Of ', 'wp-postratings').$ratings_max.'" class="post-ratings-image" />';
}
}
}
if('rtl' == $text_direction && file_exists(WP_PLUGIN_DIR.'/wp-postratings/images/'.$ratings_image.'/rating_end-rtl.'.RATINGS_IMG_EXT)) {
echo '<img src="'.plugins_url('wp-postratings/images/'.$ratings_image.'/rating_end-rtl.'.RATINGS_IMG_EXT).'" alt="" class="post-ratings-image" />';
} elseif(file_exists(WP_PLUGIN_DIR.'/wp-postratings/images/'.$ratings_image.'/rating_end.'.RATINGS_IMG_EXT)) {
echo '<img src="'.plugins_url('wp-postratings/images/'.$ratings_image.'/rating_end.'.RATINGS_IMG_EXT).'" alt="" class="post-ratings-image" />';
}
}
echo '</td>'."\n";
echo '<td>'.number_format_i18n($postratings_postid).'</td>'."\n";
echo "<td>$postratings_posttitle</td>\n";
echo "<td>$postratings_date</td>\n";
echo "<td>$postratings_ip / $postratings_host</td>\n";
echo '</tr>';
$i++;
}
} else {
echo '<tr><td colspan="7" align="center"><strong>'.__('No Post Ratings Logs Found', 'wp-postratings').'</strong></td></tr>';
}
?>
</tbody>
</table>
<!-- <Paging> -->
<?php
if($total_pages > 1) {
?>
<br />
<table class="widefat">
<tr>
<td align="<?php echo ('rtl' == $text_direction) ? 'right' : 'left'; ?>" width="50%">
<?php
if($postratings_page > 1 && ((($postratings_page*$postratings_log_perpage)-($postratings_log_perpage-1)) <= $total_ratings)) {
echo '<strong>«</strong> <a href="'.$base_page.'&ratingpage='.($postratings_page-1).$postratings_sort_url.'" title="« '.__('Previous Page', 'wp-postratings').'">'.__('Previous Page', 'wp-postratings').'</a>';
} else {
echo ' ';
}
?>
</td>
<td align="<?php echo ('rtl' == $text_direction) ? 'left' : 'right'; ?>" width="50%">
<?php
if($postratings_page >= 1 && ((($postratings_page*$postratings_log_perpage)+1) <= $total_ratings)) {
echo '<a href="'.$base_page.'&ratingpage='.($postratings_page+1).$postratings_sort_url.'" title="'.__('Next Page', 'wp-postratings').' »">'.__('Next Page', 'wp-postratings').'</a> <strong>»</strong>';
} else {
echo ' ';
}
?>
</td>
</tr>
<tr class="alternate">
<td colspan="2" align="center">
<?php printf(__('Pages (%s): ', 'wp-postratings'), number_format_i18n($total_pages)); ?>
<?php
if ($postratings_page >= 4) {
echo '<strong><a href="'.$base_page.'&ratingpage=1'.$postratings_sort_url.$postratings_sort_url.'" title="'.__('Go to First Page', 'wp-postratings').'">« '.__('First', 'wp-postratings').'</a></strong> ... ';
}
if($postratings_page > 1) {
echo ' <strong><a href="'.$base_page.'&ratingpage='.($postratings_page-1).$postratings_sort_url.'" title="« '.__('Go to Page', 'wp-postratings').' '.number_format_i18n($postratings_page-1).'">«</a></strong> ';
}
for($i = $postratings_page - 2 ; $i <= $postratings_page +2; $i++) {
if ($i >= 1 && $i <= $total_pages) {
if($i == $postratings_page) {
echo '<strong>['.number_format_i18n($i).']</strong> ';
} else {
echo '<a href="'.$base_page.'&ratingpage='.($i).$postratings_sort_url.'" title="'.__('Page', 'wp-postratings').' '.number_format_i18n($i).'">'.number_format_i18n($i).'</a> ';
}
}
}
if($postratings_page < $total_pages) {
echo ' <strong><a href="'.$base_page.'&ratingpage='.($postratings_page+1).$postratings_sort_url.'" title="'.__('Go to Page', 'wp-postratings').' '.number_format_i18n($postratings_page+1).' »">»</a></strong> ';
}
if (($postratings_page+2) < $total_pages) {
echo ' ... <strong><a href="'.$base_page.'&ratingpage='.($total_pages).$postratings_sort_url.'" title="'.__('Go to Last Page', 'wp-postratings').'">'.__('Last', 'wp-postratings').' »</a></strong>';
}
?>
</td>
</tr>
</table>
<!-- </Paging> -->
<?php
}
?>
<br />
<form action="<?php echo esc_url( $base_page ); ?>" method="get">
<input type="hidden" name="page" value="<?php echo $base_name; ?>" />
<table class="widefat">
<tr>
<th><?php _e('Filter Options:', 'wp-postratings'); ?></th>
<td>
<?php _e('Post ID:', 'wp-postratings'); ?> <input type="text" name="id" value="<?php echo $postratings_filterid; ?>" size="5" maxlength="5" />
<select name="user" size="1">
<option value=""></option>
<?php
$filter_users = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT rating_username, rating_userid FROM {$wpdb->ratings} WHERE rating_username != %s ORDER BY rating_userid ASC, rating_username ASC", __(' Guest', 'wp-postratings' ) ) );
if($filter_users) {
foreach($filter_users as $filter_user) {
$rating_username = stripslashes($filter_user->rating_username);
$rating_userid = intval($filter_user->rating_userid);
if($rating_userid > 0) {
$prefix = __('Registered User: ', 'wp-postratings');
} else {
$prefix = __('Comment Author: ', 'wp-postratings');
}
if($rating_username == $postratings_filteruser) {
echo '<option value="'.esc_attr($rating_username).'" selected="selected">'.$prefix.' '.$rating_username.'</option>'."\n";
} else {
echo '<option value="'.esc_attr($rating_username).'">'.$prefix.' '.$rating_username.'</option>'."\n";
}
}
}
?>
</select>
<select name="rating" size="1">
<option value=""></option>
<?php
$filter_ratings = $wpdb->get_results("SELECT DISTINCT rating_rating FROM $wpdb->ratings ORDER BY rating_rating ASC");
if($filter_ratings) {
foreach($filter_ratings as $filter_rating) {
$rating_rating = $filter_rating->rating_rating;
$prefix = __('Rating: ', 'wp-postratings');
if($rating_rating == $postratings_filterrating) {
echo '<option value="'.$rating_rating.'" selected="selected">'.$prefix.' '.number_format_i18n($rating_rating).'</option>'."\n";
} else {
echo '<option value="'.$rating_rating.'">'.$prefix.' '.number_format_i18n($rating_rating).'</option>'."\n";
}
}
}
?>
</select>
</td>
</tr>
<tr class="alternate">
<th><?php _e('Sort Options:', 'wp-postratings'); ?></th>
<td>
<select name="by" size="1">
<option value="id"<?php if($postratings_sortby == 'rating_id') { echo ' selected="selected"'; }?>><?php _e('ID', 'wp-postratings'); ?></option>
<option value="username"<?php if($postratings_sortby == 'rating_username') { echo ' selected="selected"'; }?>><?php _e('UserName', 'wp-postratings'); ?></option>
<option value="rating"<?php if($postratings_sortby == 'rating_rating') { echo ' selected="selected"'; }?>><?php _e('Rating', 'wp-postratings'); ?></option>
<option value="postid"<?php if($postratings_sortby == 'rating_postid') { echo ' selected="selected"'; }?>><?php _e('Post ID', 'wp-postratings'); ?></option>
<option value="posttitle"<?php if($postratings_sortby == 'rating_posttitle') { echo ' selected="selected"'; }?>><?php _e('Post Title', 'wp-postratings'); ?></option>
<option value="date"<?php if($postratings_sortby == 'rating_timestamp') { echo ' selected="selected"'; }?>><?php _e('Date', 'wp-postratings'); ?></option>
<option value="ip"<?php if($postratings_sortby == 'rating_ip') { echo ' selected="selected"'; }?>><?php _e('IP', 'wp-postratings'); ?></option>
<option value="host"<?php if($postratings_sortby == 'rating_host') { echo ' selected="selected"'; }?>><?php _e('Host', 'wp-postratings'); ?></option>
</select>
<select name="order" size="1">
<option value="asc"<?php if($postratings_sortorder == 'asc') { echo ' selected="selected"'; }?>><?php _e('Ascending', 'wp-postratings'); ?></option>
<option value="desc"<?php if($postratings_sortorder == 'desc') { echo ' selected="selected"'; } ?>><?php _e('Descending', 'wp-postratings'); ?></option>
</select>
<select name="perpage" size="1">
<?php
for($i=10; $i <= 100; $i+=10) {
if($postratings_log_perpage == $i) {
echo "<option value=\"$i\" selected=\"selected\">".__('Per Page', 'wp-postratings').": ".number_format_i18n($i)."</option>\n";
} else {
echo "<option value=\"$i\">".__('Per Page', 'wp-postratings').": ".number_format_i18n($i)."</option>\n";
}
}
?>
</select>
</td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" value="<?php _e('Go', 'wp-postratings'); ?>" class="button" /></td>
</tr>
</table>
</form>
</div>
<p> </p>
<!-- Post Ratings Stats -->
<div class="wrap">
<h3><?php _e('Post Ratings Logs Stats', 'wp-postratings'); ?></h3>
<br style="clear" />
<table class="widefat">
<tr>
<th><?php _e('Total Users Voted:', 'wp-postratings'); ?></th>
<td><?php echo number_format_i18n($total_users); ?></td>
</tr>
<tr class="alternate">
<th><?php _e('Total Score:', 'wp-postratings'); ?></th>
<td><?php echo number_format_i18n($total_score); ?></td>
</tr>
<tr>
<th><?php _e('Total Average:', 'wp-postratings'); ?></th>
<td><?php echo number_format_i18n($total_average, 2); ?></td>
</tr>
</table>
</div>
<p> </p>
<!-- Delete Post Ratings Logs -->
<div class="wrap">
<h3><?php _e('Delete Post Ratings Data/Logs', 'wp-postratings'); ?></h3>
<br style="clear" />
<div align="center">
<form method="post" action="<?php echo esc_url( $base_page ); ?>">
<?php wp_nonce_field('wp-postratings_logs'); ?>
<table class="widefat">
<tr>
<td valign="top"><b><?php _e('Delete Type: ', 'wp-postratings'); ?></b></td>
<td valign="top">
<select size="1" name="delete_datalog">
<option value="1"><?php _e('Logs Only', 'wp-postratings'); ?></option>
<option value="2"><?php _e('Data Only', 'wp-postratings'); ?></option>
<option value="3"><?php _e('Logs And Data', 'wp-postratings'); ?></option>
</select>
</td>
</tr>
<tr>
<td valign="top"><b><?php _e('Post ID(s):', 'wp-postratings'); ?></b></td>
<td valign="top">
<input type="text" name="delete_postid" size="20" dir="ltr" />
<p><?php _e('Seperate each Post ID with a comma.', 'wp-postratings'); ?></p>
<p><?php _e('To delete ratings data/logs from Post ID 2, 3 and 4. Just type in: <b>2,3,4</b>', 'wp-postratings'); ?></p>
<p><?php _e('To delete ratings data/logs for all posts. Just type in: <b>all</b>', 'wp-postratings'); ?></p>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" name="do" value="<?php _e('Delete Data/Logs', 'wp-postratings'); ?>" class="button" onclick="return confirm('<?php _e('You Are About To Delete Post Ratings Data/Logs.\nThis Action Is Not Reversible.\n\n Choose \\\'Cancel\\\' to stop, \\\'OK\\\' to delete.', 'wp-postratings'); ?>')" />
</td>
</tr>
</table>
</form>
</div>
<h3><?php _e('Note:', 'wp-postratings'); ?></h3>
<ul>
<li><?php _e('\'Logs Only\' means the logs generated when a user rates a post.', 'wp-postratings'); ?></li>
<li><?php _e('\'Data Only\' means the rating data for the post.', 'wp-postratings'); ?></li>
<li><?php _e('\'Logs And Data\' means both the logs generated and the rating data for the post.', 'wp-postratings'); ?></li>
<li><?php _e('If your logging method is by IP and Cookie or by Cookie, users may still be unable to rate if they have voted before as the cookie is still stored in their computer.', 'wp-postratings'); ?></li>
</ul>
</div> | gpl-2.0 |
sensysnetworks/uClinux | user/microwin/src/mwin/wingdi.c | 33505 | /*
* Copyright (c) 1999, 2000 Greg Haerr <[email protected]>
*
* Win32 API upper level graphics drawing routines
*/
#include "windows.h"
#include "wintern.h"
#include "device.h"
#include <stdlib.h>
#include <string.h>
#define MAXSYSCOLORS 29 /* # of COLOR_* system colors*/
#define MAXSTOCKOBJECTS 18 /* # of stock objects*/
#if ERASEMOVE
BOOL mwERASEMOVE = TRUE; /* default XORMOVE repaint algorithm*/
#else
BOOL mwERASEMOVE = FALSE; /* default ERASEMOVE repaint algorithm*/
#endif
/* cast a pointer to an integer*/
#if DOS_TURBOC
#define PTRTOINT unsigned long
#else
#define PTRTOINT unsigned int
#endif
static HDC cliphdc; /* current window cliprects*/
/* default bitmap for new DCs*/
static MWBITMAPOBJ default_bitmap = {
{OBJ_BITMAP, TRUE}, 1, 1, 1, 1, 1, 1
};
static BOOL MwExtTextOut(HDC hdc, int x, int y, UINT fuOptions,
CONST RECT *lprc, LPCVOID lpszString, UINT cbCount,
CONST INT *lpDx, int flags);
static int MwDrawText(HDC hdc, LPCVOID lpString, int nCount, LPRECT lpRect,
UINT uFormat, int flags);
HDC WINAPI
GetDCEx(HWND hwnd,HRGN hrgnClip,DWORD flags)
{
HDC hdc;
if(!hwnd) /* handle NULL hwnd => desktop*/
hwnd = rootwp;
/* handle private DC's*/
if(hwnd->owndc && !(flags & DCX_WINDOW))
return hwnd->owndc;
/* add caching?*/
hdc = GdItemNew(struct hdc);
if(!hdc)
return NULL;
hdc->psd = &scrdev;
hdc->hwnd = hwnd;
if(flags & DCX_DEFAULTCLIP) {
flags &= ~DCX_DEFAULTCLIP;
if(hwnd->style & WS_CLIPSIBLINGS)
flags |= DCX_CLIPSIBLINGS;
if(hwnd->style & WS_CLIPCHILDREN)
flags |= DCX_CLIPCHILDREN;
}
hdc->flags = flags;
hdc->bkmode = OPAQUE;
hdc->textalign = TA_LEFT | TA_TOP | TA_NOUPDATECP;
hdc->bkcolor = RGB(255, 255, 255); /* WHITE*/
hdc->textcolor = RGB(0, 0, 0); /* BLACK*/
hdc->brush = (MWBRUSHOBJ *)GetStockObject(WHITE_BRUSH);
hdc->pen = (MWPENOBJ *)GetStockObject(BLACK_PEN);
hdc->font = (MWFONTOBJ *)GetStockObject(SYSTEM_FONT);
#if UPDATEREGIONS
if(hrgnClip) {
/* make a copy of passed region*/
hdc->region = (MWRGNOBJ *)CreateRectRgn(0, 0, 0, 0);
CombineRgn((HRGN)hdc->region, hrgnClip, NULL, RGN_COPY);
}
#endif
/* make default bitmap compatible with scrdev
* otherwise problems occur later because selecting
* in the default bitmap overwrite planes and bpp
* in a memory dc, and thus it becomes incompatible
* with scrdev.
*/
default_bitmap.planes = scrdev.planes;
default_bitmap.bpp = scrdev.bpp;
hdc->bitmap = &default_bitmap;
hdc->drawmode = R2_COPYPEN;
hdc->pt.x = 0;
hdc->pt.y = 0;
/* assign private DC if CS_OWNDC and not WindowDC*/
if((hwnd->pClass->style & CS_OWNDC) && !(flags & DCX_WINDOW)) {
/* must exclude update region due to BeginPaint GetDCEx call*/
hdc->flags |= DCX_EXCLUDEUPDATE;
hwnd->owndc = hdc;
}
return hdc;
}
HDC WINAPI
GetDC(HWND hwnd)
{
/*
* Exclude update regions when drawing with GetDC.
* This is required because some programs use GetDC
* when painting outside of BeginPaint/EndPaint, and
* the update region is empty then.
*/
return GetDCEx(hwnd, NULL, DCX_DEFAULTCLIP|DCX_EXCLUDEUPDATE);
}
HDC WINAPI
GetWindowDC(HWND hwnd)
{
/*
* Exclude update region for now, since we
* don't keep track of non-client update regions yet
*/
return GetDCEx(hwnd, NULL,DCX_WINDOW|DCX_DEFAULTCLIP|DCX_EXCLUDEUPDATE);
}
/* free a DC allocated from GetDC*/
int WINAPI
ReleaseDC(HWND hwnd, HDC hdc)
{
/* don't delete a memory dc on release*/
if(!hdc || (hdc->psd->flags&PSF_MEMORY))
return 0;
if(hdc == cliphdc)
cliphdc = NULL;
/* handle private DC's*/
if(hdc->hwnd->owndc && !(hdc->flags & DCX_WINDOW))
return 1;
DeleteObject((HBRUSH)hdc->brush);
DeleteObject((HPEN)hdc->pen);
#if 0 /* don't delete font resources on ReleaseDC... use DeleteObject instead*/
DeleteObject((HFONT)hdc->font);
#endif
DeleteObject((HRGN)hdc->region);
/*
* We can only select a bitmap in a memory DC,
* so bitmaps aren't released except through DeleteDC.
*/
DeleteObject((HBITMAP)hdc->bitmap);
GdItemFree(hdc);
return 1;
}
/* free a dc allocated from CreateCompatibleDC*/
BOOL WINAPI
DeleteDC(HDC hdc)
{
/* don't delete a normal dc, only memory dc's*/
if(!hdc || !(hdc->psd->flags&PSF_MEMORY))
return 0;
/* free allocated memory screen device*/
hdc->psd->FreeMemGC(hdc->psd);
/* make it look like a GetDC dc, and free it*/
hdc->psd = &scrdev;
return ReleaseDC(NULL, hdc);
}
void
MwPaintNCArea(HWND hwnd)
{
SendMessage(hwnd, WM_NCPAINT, 0, 0L);
/* for now, we always paint NC scrollbar areas*/
MwPaintNCScrollbars(hwnd, NULL);
}
HDC WINAPI
BeginPaint(HWND hwnd, LPPAINTSTRUCT lpPaint)
{
HDC hdc;
/* first update non-client area*/
if(mwforceNCpaint || hwnd->paintNC != mwpaintNC) {
MwPaintNCArea(hwnd);
hwnd->paintNC = mwpaintNC;
}
/* If ERASEMOVE:
* Don't allow windows to repaint while user is moving
* a window. Instead, just erase backgrounds
* and indicate delayed painting required, which
* will occur after user completes window move.
*/
if(mwERASEMOVE && dragwp) {
hdc = NULL;
lpPaint->fErase = !DefWindowProc(hwnd, WM_ERASEBKGND, 0, 0L);
hwnd->gotPaintMsg = PAINT_DELAYPAINT;
} else {
HideCaret(hwnd);
/* FIXME: mdemo requires update excluded or draw errors occur*/
hdc = GetDCEx(hwnd, NULL, DCX_DEFAULTCLIP
|DCX_EXCLUDEUPDATE); /* FIXME - bug*/
/* erase client background*/
lpPaint->fErase = !SendMessage(hwnd, WM_ERASEBKGND, (WPARAM)hdc,
0L);
}
lpPaint->hdc = hdc;
GetUpdateRect(hwnd, &lpPaint->rcPaint, FALSE);
return hdc;
}
BOOL WINAPI
EndPaint(HWND hwnd, CONST PAINTSTRUCT *lpPaint)
{
ReleaseDC(hwnd, lpPaint->hdc);
#if UPDATEREGIONS
/* don't clear update region until done dragging*/
if(mwERASEMOVE && !dragwp)
GdSetRectRegion(hwnd->update, 0, 0, 0, 0);
#endif
ShowCaret(hwnd);
return TRUE;
}
COLORREF WINAPI
SetTextColor(HDC hdc, COLORREF crColor)
{
COLORREF oldtextcolor;
if (!hdc)
return CLR_INVALID;
oldtextcolor = hdc->textcolor;
hdc->textcolor = (MWCOLORVAL)crColor;
return oldtextcolor;
}
COLORREF WINAPI
SetBkColor(HDC hdc, COLORREF crColor)
{
COLORREF oldbkcolor;
if (!hdc)
return CLR_INVALID;
oldbkcolor = hdc->bkcolor;
hdc->bkcolor = crColor;
return oldbkcolor;
}
int WINAPI
SetBkMode(HDC hdc, int iBkMode)
{
int oldbkmode;
if(!hdc)
return 0;
oldbkmode = hdc->bkmode;
hdc->bkmode = iBkMode;
return oldbkmode;
}
UINT WINAPI
SetTextAlign(HDC hdc, UINT fMode)
{
UINT oldfMode;
if(!hdc)
return GDI_ERROR;
oldfMode = hdc->textalign;
hdc->textalign = fMode;
return oldfMode;
}
/* FIXME: releasing a DC does NOT change back the drawing mode!*/
int WINAPI
SetROP2(HDC hdc, int fnDrawMode)
{
int newmode, oldmode;
if(!hdc)
return 0;
oldmode = hdc->drawmode;
switch(fnDrawMode) {
case R2_XORPEN:
newmode = MWMODE_XOR;
break;
case R2_COPYPEN:
default:
newmode = MWMODE_SET;
}
hdc->drawmode = newmode;
GdSetMode(newmode);
return oldmode;
}
/*
* Setup clip region from device context's associated window or bitmap.
* Memory DC's are always associated with the desktop window, and are
* always visible. Return the DC's hwnd if window is visible.
*/
HWND
MwPrepareDC(HDC hdc)
{
HWND hwnd;
if(!hdc || !hdc->hwnd)
return NULL;
hwnd = hdc->hwnd;
if (hwnd->unmapcount)
return NULL;
/*
* If the window is not the currently clipped one, then
* make it the current one and define its clip rectangles.
*/
if(hdc != cliphdc) {
/* clip memory dc's to the bitmap size*/
if(hdc->psd->flags&PSF_MEMORY) {
#if DYNAMICREGIONS
GdSetClipRegion(hdc->psd,
GdAllocRectRegion(0, 0, hdc->psd->xvirtres,
hdc->psd->yvirtres));
#else
static MWCLIPRECT crc = {0, 0, 0, 0};
crc.width = hdc->psd->xvirtres;
crc.height = hdc->psd->yvirtres;
GdSetClipRects(hdc->psd, 1, &crc);
#endif
} else MwSetClipWindow(hdc);
cliphdc = hdc;
}
return hwnd;
}
/* return RGB value at specified coordinates*/
COLORREF WINAPI
GetPixel(HDC hdc, int x, int y)
{
HWND hwnd;
POINT pt;
MWPIXELVAL pixel;
MWPALENTRY rgb;
hwnd = MwPrepareDC(hdc);
if(!hwnd)
return CLR_INVALID;
pt.x = x;
pt.y = y;
if(MwIsClientDC(hdc))
ClientToScreen(hwnd, &pt);
/* read pixel value*/
GdReadArea(hdc->psd, pt.x, pt.y, 1, 1, &pixel);
switch(hdc->psd->pixtype) {
case MWPF_TRUECOLOR0888:
case MWPF_TRUECOLOR888:
/* create RGB colorval from 8/8/8 pixel*/
return PIXEL888TOCOLORVAL(pixel);
case MWPF_TRUECOLOR565:
/* create RGB colorval from 5/6/5 pixel*/
return PIXEL565TOCOLORVAL(pixel);
case MWPF_TRUECOLOR555:
/* create RGB colorval from 5/5/5 pixel*/
return PIXEL555TOCOLORVAL(pixel);
case MWPF_TRUECOLOR332:
/* create RGB colorval from 3/3/2 pixel*/
return PIXEL332TOCOLORVAL(pixel);
case MWPF_PALETTE:
if(GdGetPalette(hdc->psd, pixel, 1, &rgb))
return RGB(rgb.r, rgb.g, rgb.b);
}
return CLR_INVALID;
}
COLORREF WINAPI
SetPixel(HDC hdc, int x, int y, COLORREF crColor)
{
HWND hwnd;
POINT pt;
hwnd = MwPrepareDC(hdc);
if(!hwnd)
return 0; /* doesn't return previous color*/
pt.x = x;
pt.y = y;
if(MwIsClientDC(hdc))
ClientToScreen(hwnd, &pt);
/* draw point in passed color*/
GdSetForeground(GdFindColor(crColor));
GdPoint(hdc->psd, pt.x, pt.y);
return 0; /* doesn't return previous color*/
}
BOOL WINAPI
MoveToEx(HDC hdc, int x, int y, LPPOINT lpPoint)
{
if(!hdc)
return FALSE;
if(lpPoint)
*lpPoint = hdc->pt;
hdc->pt.x = x;
hdc->pt.y = y;
return TRUE;
}
BOOL WINAPI
LineTo(HDC hdc, int x, int y)
{
HWND hwnd;
POINT beg, end;
hwnd = MwPrepareDC(hdc);
if(!hwnd)
return FALSE;
beg.x = hdc->pt.x;
beg.y = hdc->pt.y;
end.x = x;
end.y = y;
if(MwIsClientDC(hdc)) {
ClientToScreen(hwnd, &beg);
ClientToScreen(hwnd, &end);
}
/* draw line in current pen color*/
if(hdc->pen->style != PS_NULL) {
GdSetForeground(GdFindColor(hdc->pen->color));
/* don't draw last point*/
GdLine(hdc->psd, beg.x, beg.y, end.x, end.y, FALSE);
}
hdc->pt.x = x;
hdc->pt.y = y;
return TRUE;
}
/* draw line segments by connecting passed points*/
BOOL WINAPI
Polyline(HDC hdc, CONST POINT *lppt, int cPoints)
{
HWND hwnd;
POINT beg, end;
if(cPoints <= 1)
return FALSE;
hwnd = MwPrepareDC(hdc);
if(!hwnd)
return FALSE;
if(hdc->pen->style == PS_NULL)
return TRUE;
/* draw line in current pen color*/
GdSetForeground(GdFindColor(hdc->pen->color));
beg = *lppt++;
if(MwIsClientDC(hdc))
ClientToScreen(hwnd, &beg);
while(--cPoints > 0) {
end = *lppt++;
if(MwIsClientDC(hdc))
ClientToScreen(hwnd, &end);
/* don't draw last point*/
GdLine(hdc->psd, beg.x, beg.y, end.x, end.y, FALSE);
beg = end;
}
return TRUE;
}
BOOL WINAPI
Rectangle(HDC hdc, int nLeft, int nTop, int nRight, int nBottom)
{
HWND hwnd;
RECT rc;
hwnd = MwPrepareDC(hdc);
if(!hwnd)
return FALSE;
SetRect(&rc, nLeft, nTop, nRight, nBottom);
if(MwIsClientDC(hdc))
MapWindowPoints(hwnd, NULL, (LPPOINT)&rc, 2);
/* draw rectangle in current pen color*/
if(hdc->pen->style != PS_NULL) {
GdSetForeground(GdFindColor(hdc->pen->color));
GdRect(hdc->psd, rc.left, rc.top,
rc.right - rc.left, rc.bottom - rc.top);
}
/* fill rectangle in current brush color*/
if(hdc->brush->style != BS_NULL) {
InflateRect(&rc, -1, -1);
GdSetForeground(GdFindColor(hdc->brush->color));
GdFillRect(hdc->psd, rc.left, rc.top, rc.right - rc.left,
rc.bottom - rc.top);
}
return TRUE;
}
BOOL WINAPI
Ellipse(HDC hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect)
{
HWND hwnd;
int rx, ry;
RECT rc;
hwnd = MwPrepareDC(hdc);
if(!hwnd)
return FALSE;
SetRect(&rc, nLeftRect, nTopRect, nRightRect, nBottomRect);
if(MwIsClientDC(hdc))
MapWindowPoints(hwnd, NULL, (LPPOINT)&rc, 2);
rx = (rc.right - rc.left)/2 - 1;
ry = (rc.bottom - rc.top)/2 - 1;
rc.left += rx;
rc.top += ry;
/* fill ellipse in current brush color*/
if(hdc->brush->style != BS_NULL) {
InflateRect(&rc, -1, -1);
GdSetForeground(GdFindColor(hdc->brush->color));
GdEllipse(hdc->psd, rc.left, rc.top, rx, ry, TRUE);
}
/* draw ellipse outline in current pen color*/
if(hdc->pen->style != PS_NULL) {
GdSetForeground(GdFindColor(hdc->pen->color));
GdEllipse(hdc->psd, rc.left, rc.top, rx, ry, FALSE);
}
return TRUE;
}
static void
dopiearc(HDC hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect,
int ax, int ay, int bx, int by, int type)
{
HWND hwnd;
int rx, ry;
RECT rc, rc2;
hwnd = MwPrepareDC(hdc);
if(!hwnd)
return;
SetRect(&rc, nLeftRect, nTopRect, nRightRect, nBottomRect);
SetRect(&rc2, ax, ay, bx, by);
if(MwIsClientDC(hdc)) {
MapWindowPoints(hwnd, NULL, (LPPOINT)&rc, 2);
MapWindowPoints(hwnd, NULL, (LPPOINT)&rc2, 2);
}
rx = (rc.right - rc.left)/2 - 1;
ry = (rc.bottom - rc.top)/2 - 1;
rc.left += rx;
rc.top += ry;
/* fill ellipse in current brush color*/
if(hdc->brush->style != BS_NULL && type == MWPIE) {
GdSetForeground(GdFindColor(hdc->brush->color));
GdArc(hdc->psd, rc.left, rc.top, rx, ry,
rc2.left, rc2.top, rc2.right, rc2.bottom, MWPIE);
}
/* draw ellipse outline in current pen color*/
if(hdc->pen->style != PS_NULL) {
GdSetForeground(GdFindColor(hdc->pen->color));
if(type == MWPIE)
type = MWARC; /* MWARCOUTLINE?*/
GdArc(hdc->psd, rc.left, rc.top, rx, ry,
rc2.left, rc2.top, rc2.right, rc2.bottom, type);
}
}
BOOL WINAPI
Arc(HDC hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect,
int nXStartArc, int nYStartArc, int nXEndArc, int nYEndArc)
{
dopiearc(hdc, nLeftRect, nTopRect, nRightRect, nBottomRect,
nXStartArc, nYStartArc, nXEndArc, nYEndArc, MWARC);
return TRUE;
}
BOOL WINAPI
Pie(HDC hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect,
int nXRadial1, int nYRadial1, int nXRadial2, int nYRadial2)
{
dopiearc(hdc, nLeftRect, nTopRect, nRightRect, nBottomRect,
nXRadial1, nYRadial1, nXRadial2, nYRadial2, MWPIE);
return TRUE;
}
BOOL WINAPI
Polygon(HDC hdc, CONST POINT *lpPoints, int nCount)
{
HWND hwnd;
int i;
LPPOINT pp, ppAlloc = NULL;
hwnd = MwPrepareDC(hdc);
if(!hwnd)
return FALSE;
if(MwIsClientDC(hdc)) {
/* convert points to client coords*/
ppAlloc = (LPPOINT)malloc(nCount * sizeof(POINT));
if(!ppAlloc)
return FALSE;
memcpy(ppAlloc, lpPoints, nCount*sizeof(POINT));
pp = ppAlloc;
for(i=0; i<nCount; ++i)
ClientToScreen(hwnd, pp++);
pp = ppAlloc;
} else pp = (LPPOINT)lpPoints;
/* fill polygon in current brush color*/
if(hdc->brush->style != BS_NULL) {
GdSetForeground(GdFindColor(hdc->brush->color));
GdFillPoly(hdc->psd, nCount, pp);
}
/* draw polygon outline in current pen color*/
if(hdc->pen->style != PS_NULL) {
GdSetForeground(GdFindColor(hdc->pen->color));
GdPoly(hdc->psd, nCount, pp);
}
if(ppAlloc)
free(ppAlloc);
return TRUE;
}
/* draw nCount polygons*/
BOOL WINAPI
PolyPolygon(HDC hdc, CONST POINT *lpPoints, LPINT lpPolyCounts, int nCount)
{
while(--nCount >= 0) {
if (!Polygon(hdc, lpPoints, *lpPolyCounts))
return FALSE;
lpPoints += *lpPolyCounts++;
}
return TRUE;
}
int WINAPI
FillRect(HDC hdc, CONST RECT *lprc, HBRUSH hbr)
{
HWND hwnd;
RECT rc;
MWBRUSHOBJ * obr = (MWBRUSHOBJ *)hbr;
COLORREF crFill;
hwnd = MwPrepareDC(hdc);
if(!hwnd || !obr)
return FALSE;
if(!lprc) {
if(MwIsClientDC(hdc))
GetClientRect(hwnd, &rc);
else
GetWindowRect(hwnd, &rc);
lprc = &rc;
} else
rc = *lprc;
if(MwIsClientDC(hdc))
MapWindowPoints(hwnd, NULL, (LPPOINT)&rc, 2);
/* handle COLOR_xxx + 1 passed as HBRUSH*/
if((PTRTOINT)obr <= MAXSYSCOLORS)
crFill = GetSysColor((int)obr-1);
else {
/* get color from passed HBRUSH*/
if(obr->style == BS_NULL)
return TRUE;
crFill = obr->color;
}
/* fill rectangle in passed brush color*/
GdSetForeground(GdFindColor(crFill));
GdFillRect(hdc->psd, rc.left, rc.top,
rc.right - rc.left, rc.bottom - rc.top);
return TRUE;
}
/* ascii*/
BOOL WINAPI
TextOut(HDC hdc, int x, int y, LPCSTR lpszString, int cbString)
{
/* kaffe port wants MWTF_UTF8 here...*/
return MwExtTextOut(hdc, x, y, 0, NULL, lpszString, cbString, NULL,
MWTF_ASCII);
}
/* ascii*/
BOOL WINAPI
ExtTextOut(HDC hdc, int x, int y, UINT fuOptions, CONST RECT *lprc,
LPCSTR lpszString, UINT cbCount, CONST INT *lpDx)
{
return MwExtTextOut(hdc, x, y, fuOptions, lprc, lpszString,
cbCount, lpDx, MWTF_ASCII);
}
/* unicode*/
BOOL WINAPI
ExtTextOutW(HDC hdc, int x, int y, UINT fuOptions, CONST RECT *lprc,
LPCWSTR lpszString, UINT cbCount, CONST INT *lpDx)
{
return MwExtTextOut(hdc, x, y, fuOptions, lprc, lpszString,
cbCount, lpDx, MWTF_UC16);
}
/* internal version of ExtTextOut, passed flags for text data type*/
static BOOL
MwExtTextOut(HDC hdc, int x, int y, UINT fuOptions, CONST RECT *lprc,
LPCVOID lpszString, UINT cbCount, CONST INT *lpDx, int flags)
{
HWND hwnd;
POINT pt;
RECT rc;
hwnd = MwPrepareDC(hdc);
if(!hwnd)
return FALSE;
pt.x = x;
pt.y = y;
if(MwIsClientDC(hdc))
ClientToScreen(hwnd, &pt);
/* optionally fill passed rectangle*/
if(lprc && (fuOptions&ETO_OPAQUE)) {
rc = *lprc;
if(MwIsClientDC(hdc))
MapWindowPoints(hwnd, NULL, (LPPOINT)&rc, 2);
/* fill rectangle with current background color*/
GdSetForeground(GdFindColor(hdc->bkcolor));
GdFillRect(hdc->psd, rc.left, rc.top, rc.right - rc.left,
rc.bottom - rc.top);
GdSetUseBackground(FALSE);
} else {
/* use current background mode for text background draw*/
GdSetUseBackground(hdc->bkmode == OPAQUE? TRUE: FALSE);
/* always set background color in case GdArea is
* used to draw, which compares gr_foreground != gr_background
* if gr_usebg is false...
*/
/*if(hdc->bkmode == OPAQUE)*/
GdSetBackground(GdFindColor(hdc->bkcolor));
}
/* nyi: lpDx*/
/* draw text in current text foreground and background color*/
GdSetForeground(GdFindColor(hdc->textcolor));
GdSetFont(hdc->font->pfont);
/* this whole text alignment thing needs rewriting*/
if((hdc->textalign & TA_BASELINE) == TA_BASELINE) {
/* this is not right... changed for kaffe port
flags |= MWTF_TOP;
*/
flags |= MWTF_BASELINE;
} else if(hdc->textalign & TA_BOTTOM) {
MWCOORD ph, pw, pb;
if(lprc)
pt.y += lprc->bottom - lprc->top;
else {
GdGetTextSize(hdc->font->pfont, lpszString, cbCount,
&pw, &ph, &pb, flags);
pt.y += ph;
}
flags |= MWTF_BOTTOM;
} else
flags |= MWTF_TOP;
GdText(hdc->psd, pt.x, pt.y, lpszString, cbCount, flags);
return TRUE;
}
/* ascii*/
int WINAPI
DrawTextA(HDC hdc, LPCSTR lpString, int nCount, LPRECT lpRect, UINT uFormat)
{
return MwDrawText(hdc, lpString, nCount, lpRect, uFormat, MWTF_ASCII);
}
/* unicode*/
int WINAPI
DrawTextW(HDC hdc, LPCWSTR lpString, int nCount, LPRECT lpRect, UINT uFormat)
{
return MwDrawText(hdc, lpString, nCount, lpRect, uFormat, MWTF_UC16);
}
/* note: many DT_x aren't implemented in this function*/
/* internal version of DrawText, passed flags for text data type*/
static int
MwDrawText(HDC hdc, LPCVOID lpString, int nCount, LPRECT lpRect, UINT uFormat,
int flags)
{
MWCOORD x, y, width, height, baseline;
if(nCount == -1)
nCount = strlen(lpString);
if(uFormat & (DT_CALCRECT|DT_CENTER|DT_RIGHT)) {
if(!hdc)
return 0;
GdGetTextSize(hdc->font->pfont, lpString, nCount,
&width, &height, &baseline, MWTF_ASCII);
}
x = lpRect->left;
y = lpRect->top;
if(uFormat & DT_CALCRECT) {
lpRect->right = x + width;
lpRect->bottom = y + height;
return height;
}
if(uFormat & DT_CENTER)
x = (lpRect->left + lpRect->right - width) / 2;
else if(uFormat & DT_RIGHT)
x += lpRect->right - width;
/* draw text at DT_TOP using current fg, bg and bkmode*/
MwExtTextOut(hdc, x, y, 0, NULL, lpString, nCount, NULL, flags);
return height;
}
/* Microwindows only*/
BOOL WINAPI
DrawDIB(HDC hdc,int x,int y,PMWIMAGEHDR pimage)
{
HWND hwnd;
POINT pt;
hwnd = MwPrepareDC(hdc);
if(!hwnd || !pimage)
return FALSE;
pt.x = x;
pt.y = y;
if(MwIsClientDC(hdc))
ClientToScreen(hwnd, &pt);
GdDrawImage(hdc->psd, pt.x, pt.y, pimage);
return TRUE;
}
/* define color scheme: A (tan), B (winstd) or C (old)*/
#if ELKS
#define B
#else
#define A
#endif
#define A_RGB(r,g,b)
#define B_RGB(r,g,b)
#define C_RGB(r,g,b)
#ifdef A
#undef A_RGB
#define A_RGB(r,g,b) RGB(r,g,b),
#endif
#ifdef B
#undef B_RGB
#define B_RGB(r,g,b) RGB(r,g,b),
#endif
#ifdef C
#undef C_RGB
#define C_RGB(r,g,b) RGB(r,g,b),
#endif
static COLORREF sysColors[MAXSYSCOLORS] = {
RGB(192, 192, 192), /* COLOR_SCROLLBAR 0*/
RGB( 0, 128, 128), /* COLOR_BACKGROUND */
A_RGB(128, 0, 0) /* COLOR_ACTIVECAPTION */
B_RGB(128, 0, 128) /* COLOR_ACTIVECAPTION */
C_RGB(128, 0, 128) /* COLOR_ACTIVECAPTION */
A_RGB(162, 141, 104) /* COLOR_INACTIVECAPTION */
B_RGB(128, 128, 128) /* COLOR_INACTIVECAPTION */
C_RGB( 0, 64, 128) /* COLOR_INACTIVECAPTION */
RGB(192, 192, 192), /* COLOR_MENU */
RGB(255, 255, 255), /* COLOR_WINDOW 5*/
RGB( 0, 0, 0), /* COLOR_WINDOWFRAME */
RGB( 0, 0, 0), /* COLOR_MENUTEXT */
RGB( 0, 0, 0), /* COLOR_WINDOWTEXT */
RGB(255, 255, 255), /* COLOR_CAPTIONTEXT */
RGB(192, 192, 192), /* COLOR_ACTIVEBORDER 10*/
RGB(192, 192, 192), /* COLOR_INACTIVEBORDER */
RGB(128, 128, 128), /* COLOR_APPWORKSPACE */
RGB(128, 0, 0), /* COLOR_HIGHLIGHT */
RGB(255, 255, 255), /* COLOR_HIGHLIGHTTEXT */
A_RGB(213, 204, 187) /* COLOR_BTNFACE 15*/
B_RGB(192, 192, 192) /* COLOR_BTNFACE 15*/
C_RGB(160, 160, 160) /* COLOR_BTNFACE 15*/
A_RGB(162, 141, 104) /* COLOR_BTNSHADOW */
B_RGB(128, 128, 128) /* COLOR_BTNSHADOW */
C_RGB(128, 128, 128) /* COLOR_BTNSHADOW */
RGB( 64, 64, 64), /* COLOR_GRAYTEXT */
RGB( 0, 0, 0), /* COLOR_BTNTEXT */
RGB(192, 192, 192), /* COLOR_INACTIVECAPTIONTEXT */
A_RGB(234, 230, 221) /* COLOR_BTNHIGHLIGHT 20*/
B_RGB(255, 255, 255) /* COLOR_BTNHIGHLIGHT 20*/
C_RGB(223, 223, 223) /* COLOR_BTNHIGHLIGHT 20*/
RGB( 0, 0, 0), /* COLOR_3DDKSHADOW */
A_RGB(213, 204, 187) /* COLOR_3DLIGHT */
B_RGB(223, 223, 223) /* COLOR_3DLIGHT */
C_RGB(192, 192, 192) /* COLOR_3DLIGHT */
RGB( 0, 0, 0), /* COLOR_INFOTEXT */
RGB(225, 255, 255), /* COLOR_INFOBK */
RGB(184, 180, 184), /* COLOR_ALTERNATEBTNFACE 25*/
RGB( 0, 0, 255), /* COLOR_HOTLIGHT */
RGB( 16, 132, 208), /* COLOR_GRADIENTACTIVECAPTION */
RGB(184, 180, 184) /* COLOR_GRADIENTINACTIVECAPTION 28*/
};
DWORD WINAPI
GetSysColor(int nIndex)
{
if(nIndex >= 0 && nIndex < MAXSYSCOLORS)
return sysColors[nIndex];
return 0;
}
COLORREF WINAPI
SetSysColor(int nIndex, COLORREF crColor) /* Microwindows only*/
{
COLORREF oldColor;
if(nIndex >= 0 && nIndex < MAXSYSCOLORS) {
oldColor = sysColors[nIndex];
sysColors[nIndex] = crColor;
return oldColor;
}
return 0;
}
static MWBRUSHOBJ OBJ_WHITE_BRUSH = {
{OBJ_BRUSH, TRUE}, BS_SOLID, RGB(255, 255, 255)
};
static MWBRUSHOBJ OBJ_LTGRAY_BRUSH = {
{OBJ_BRUSH, TRUE}, BS_SOLID, RGB(192, 192, 192)
};
static MWBRUSHOBJ OBJ_GRAY_BRUSH = {
{OBJ_BRUSH, TRUE}, BS_SOLID, RGB(128, 128, 128)
};
static MWBRUSHOBJ OBJ_DKGRAY_BRUSH = {
{OBJ_BRUSH, TRUE}, BS_SOLID, RGB(32, 32, 32)
};
static MWBRUSHOBJ OBJ_BLACK_BRUSH = {
{OBJ_BRUSH, TRUE}, BS_SOLID, RGB(0, 0, 0)
};
static MWBRUSHOBJ OBJ_NULL_BRUSH = {
{OBJ_BRUSH, TRUE}, BS_NULL, RGB(0, 0, 0)
};
static MWPENOBJ OBJ_WHITE_PEN = {
{OBJ_PEN, TRUE}, PS_SOLID, RGB(255, 255, 255)
};
static MWPENOBJ OBJ_BLACK_PEN = {
{OBJ_PEN, TRUE}, PS_SOLID, RGB(0, 0, 0)
};
static MWPENOBJ OBJ_NULL_PEN = {
{OBJ_PEN, TRUE}, PS_NULL, RGB(0, 0, 0)
};
static MWFONTOBJ OBJ_OEM_FIXED_FONT = {
{OBJ_FONT, TRUE}, NULL, MWFONT_OEM_FIXED
};
static MWFONTOBJ OBJ_ANSI_FIXED_FONT = {
{OBJ_FONT, TRUE}, NULL, MWFONT_SYSTEM_FIXED
};
static MWFONTOBJ OBJ_ANSI_VAR_FONT = {
{OBJ_FONT, TRUE}, NULL, MWFONT_SYSTEM_VAR
};
static MWFONTOBJ OBJ_SYSTEM_FONT = {
{OBJ_FONT, TRUE}, NULL, MWFONT_SYSTEM_VAR
};
static MWFONTOBJ OBJ_DEVICE_DEFAULT_FONT = {
{OBJ_FONT, TRUE}, NULL, MWFONT_OEM_FIXED
};
static MWFONTOBJ OBJ_SYSTEM_FIXED_FONT = {
{OBJ_FONT, TRUE}, NULL, MWFONT_SYSTEM_FIXED
};
static MWFONTOBJ OBJ_DEFAULT_GUI_FONT = {
{OBJ_FONT, TRUE}, NULL, MWFONT_GUI_VAR
};
static struct hgdiobj *stockObjects[MAXSTOCKOBJECTS] = {
(struct hgdiobj *)&OBJ_WHITE_BRUSH, /* WHITE_BRUSH*/
(struct hgdiobj *)&OBJ_LTGRAY_BRUSH, /* LTGRAY_BRUSH*/
(struct hgdiobj *)&OBJ_GRAY_BRUSH, /* GRAY_BRUSH*/
(struct hgdiobj *)&OBJ_DKGRAY_BRUSH, /* DKGRAY_BRUSH*/
(struct hgdiobj *)&OBJ_BLACK_BRUSH, /* BLACK_BRUSH*/
(struct hgdiobj *)&OBJ_NULL_BRUSH, /* NULL_BRUSH*/
(struct hgdiobj *)&OBJ_WHITE_PEN, /* WHITE_PEN*/
(struct hgdiobj *)&OBJ_BLACK_PEN, /* BLACK_PEN*/
(struct hgdiobj *)&OBJ_NULL_PEN, /* NULL_PEN*/
(struct hgdiobj *)NULL,
(struct hgdiobj *)&OBJ_OEM_FIXED_FONT, /* OEM_FIXED_FONT*/
(struct hgdiobj *)&OBJ_ANSI_FIXED_FONT, /* ANSI_FIXED_FONT*/
(struct hgdiobj *)&OBJ_ANSI_VAR_FONT, /* ANSI_VAR_FONT*/
(struct hgdiobj *)&OBJ_SYSTEM_FONT, /* SYSTEM_FONT*/
(struct hgdiobj *)&OBJ_DEVICE_DEFAULT_FONT, /* DEVICE_DEFAULT_FONT*/
(struct hgdiobj *)NULL, /* DEFAULT_PALETTE*/
(struct hgdiobj *)&OBJ_SYSTEM_FIXED_FONT, /* SYSTEM_FIXED_FONT*/
(struct hgdiobj *)&OBJ_DEFAULT_GUI_FONT /* DEFAULT_GUI_FONT*/
};
HGDIOBJ WINAPI
GetStockObject(int nObject)
{
HGDIOBJ pObj;
MWFONTOBJ * pFont;
if(nObject >= 0 && nObject < MAXSTOCKOBJECTS) {
pObj = stockObjects[nObject];
/* create stock fonts on first access*/
if(pObj->hdr.type == OBJ_FONT) {
pFont = (MWFONTOBJ *)pObj;
if(pFont->pfont == NULL) {
pFont->pfont = GdCreateFont(&scrdev,
pFont->name, 0, NULL);
}
return pObj;
}
/* implement multiple color schemes with
* standard background brushes...
*/
switch(nObject) {
case LTGRAY_BRUSH:
case GRAY_BRUSH:
((MWBRUSHOBJ *)pObj)->color =GetSysColor(COLOR_BTNFACE);
break;
case DKGRAY_BRUSH:
((MWBRUSHOBJ *)pObj)->color =
GetSysColor(COLOR_BTNSHADOW);
break;
}
return pObj;
}
return NULL;
}
HGDIOBJ WINAPI
SelectObject(HDC hdc, HGDIOBJ hObject)
{
HGDIOBJ objOrg;
MWBITMAPOBJ * pb;
if(!hdc || !hObject)
return NULL;
switch(hObject->hdr.type) {
case OBJ_PEN:
objOrg = (HGDIOBJ)hdc->pen;
hdc->pen = (MWPENOBJ *)hObject;
break;
case OBJ_BRUSH:
objOrg = (HGDIOBJ)hdc->brush;
hdc->brush = (MWBRUSHOBJ *)hObject;
break;
case OBJ_FONT:
objOrg = (HGDIOBJ)hdc->font;
hdc->font = (MWFONTOBJ *)hObject;
break;
case OBJ_BITMAP:
/* must be memory dc to select bitmap*/
if(!(hdc->psd->flags&PSF_MEMORY))
return NULL;
objOrg = (HGDIOBJ)hdc->bitmap;
/* setup mem dc for drawing into bitmap*/
pb = (MWBITMAPOBJ *)hObject;
/* init memory context*/
if (!hdc->psd->MapMemGC(hdc->psd, pb->width, pb->height,
pb->planes, pb->bpp, pb->linelen, pb->size,
&pb->bits[0]))
return NULL;
hdc->bitmap = (MWBITMAPOBJ *)hObject;
break;
#if UPDATEREGIONS
case OBJ_REGION:
/*objOrg = (HGDIOBJ)hdc->region;*/
objOrg = NULL; /* FIXME? hdc->region is destroyed below*/
SelectClipRgn(hdc, (HRGN)hObject);
break;
#endif
default:
return NULL;
}
return objOrg;
}
BOOL WINAPI
DeleteObject(HGDIOBJ hObject)
{
if(!hObject || hObject->hdr.stockobj)
return FALSE;
if(hObject->hdr.type == OBJ_FONT)
GdDestroyFont(((MWFONTOBJ *)hObject)->pfont);
if(hObject->hdr.type == OBJ_REGION)
GdDestroyRegion(((MWRGNOBJ *)hObject)->rgn);
GdItemFree(hObject);
return TRUE;
}
#if UPDATEREGIONS
/* region is passed in client coords (win32 api doc bug)*/
int WINAPI
SelectClipRgn(HDC hdc, HRGN hrgn)
{
return ExtSelectClipRgn(hdc, hrgn, RGN_COPY);
}
/*
* Select a user clip region into DC, recalculate final clipregion.
* Only a copy of the passed region is used.
*/
/* region is passed in client coords (win32 api doc bug)*/
int WINAPI
ExtSelectClipRgn(HDC hdc, HRGN hrgn, int fnMode)
{
HRGN newrgn;
if(!hdc)
return ERROR;
if(hdc->region != (MWRGNOBJ *)hrgn) {
/* combine region if not null*/
if(hrgn) {
newrgn = CreateRectRgn(0, 0, 0, 0);
/*
* Temporarily convert region from
* client coords to screen coords, since
* hwnd->update is kept in screen coords.
*/
OffsetRgn(hrgn, hdc->hwnd->clirect.left,
hdc->hwnd->clirect.top);
if(fnMode == RGN_COPY)
CombineRgn(newrgn, hrgn, NULL, fnMode);
else CombineRgn(newrgn, (HRGN)hdc->region, hrgn,fnMode);
/* convert passed region back to client coords*/
OffsetRgn(hrgn, -hdc->hwnd->clirect.left,
-hdc->hwnd->clirect.top);
hrgn = newrgn;
}
DeleteObject((HRGN)hdc->region);
hdc->region = (MWRGNOBJ *)hrgn;
/* force recalc of clipregion*/
cliphdc = NULL;
MwPrepareDC(hdc);
}
if(hrgn)
return ((MWRGNOBJ *)hrgn)->rgn->type;
return NULLREGION;
}
/* update region is returned in client coordinates*/
int WINAPI
GetUpdateRgn(HWND hwnd, HRGN hrgn, BOOL bErase)
{
/* FIXME bErase*/
if(!hwnd)
return ERROR;
/* convert internal update region to client coords*/
GdOffsetRegion(hwnd->update, -hwnd->clirect.left, -hwnd->clirect.top);
GdCopyRegion(((MWRGNOBJ *)hrgn)->rgn, hwnd->update);
GdOffsetRegion(hwnd->update, hwnd->clirect.left, hwnd->clirect.top);
return hwnd->update->type;
}
#endif /* UPDATEREGIONS*/
/* update rectangle is returned in client coords*/
BOOL WINAPI
GetUpdateRect(HWND hwnd, LPRECT lpRect, BOOL bErase)
{
/* FIXME bErase*/
if(!hwnd)
return FALSE;
#if UPDATEREGIONS
if(lpRect) {
*lpRect = hwnd->update->extents;
/* convert to client coords*/
ScreenToClient(hwnd, (LPPOINT)&lpRect->left);
ScreenToClient(hwnd, (LPPOINT)&lpRect->right);
}
/* return TRUE if update region is non-empty*/
return hwnd->update->type != NULLREGION;
#else
GetClientRect(hwnd, lpRect);
return TRUE;
#endif
}
HBRUSH WINAPI
CreateSolidBrush(COLORREF crColor)
{
MWBRUSHOBJ *hbr;
hbr = GdItemNew(MWBRUSHOBJ);
if(!hbr)
return NULL;
hbr->hdr.type = OBJ_BRUSH;
hbr->hdr.stockobj = FALSE;
hbr->style = BS_SOLID;
hbr->color = crColor;
return (HBRUSH)hbr;
}
HPEN WINAPI
CreatePen(int nPenStyle, int nWidth, COLORREF crColor)
{
MWPENOBJ *hpen;
/* fix: nWidth > 1*/
hpen = GdItemNew(MWPENOBJ);
if(!hpen)
return NULL;
hpen->hdr.type = OBJ_PEN;
hpen->hdr.stockobj = FALSE;
hpen->style = nPenStyle;
hpen->color = crColor;
return (HPEN)hpen;
}
HBITMAP WINAPI
CreateCompatibleBitmap(HDC hdc, int nWidth, int nHeight)
{
MWBITMAPOBJ * hbitmap;
int size;
int linelen;
if(!hdc)
return NULL;
nWidth = MWMAX(nWidth, 1);
nHeight = MWMAX(nHeight, 1);
/* calc memory allocation size and linelen from width and height*/
if(!GdCalcMemGCAlloc(hdc->psd, nWidth, nHeight, 0, 0, &size, &linelen))
return NULL;
/* allocate gdi object*/
hbitmap = (MWBITMAPOBJ *)GdItemAlloc(sizeof(MWBITMAPOBJ)-1+size);
if(!hbitmap)
return NULL;
hbitmap->hdr.type = OBJ_BITMAP;
hbitmap->hdr.stockobj = FALSE;
hbitmap->width = nWidth;
hbitmap->height = nHeight;
/* create compatible with hdc*/
hbitmap->planes = hdc->psd->planes;
hbitmap->bpp = hdc->psd->bpp;
hbitmap->linelen = linelen;
hbitmap->size = size;
return (HBRUSH)hbitmap;
}
/* return NULL if no driver bitblit available*/
HDC WINAPI
CreateCompatibleDC(HDC hdc)
{
HDC hdcmem;
PSD psd;
PSD mempsd;
/* allow NULL hdc to mean screen*/
psd = hdc? hdc->psd: &scrdev;
/* allocate memory device, if driver doesn't blit will fail*/
mempsd = psd->AllocateMemGC(psd);
if(!mempsd)
return NULL;
/* allocate a DC for DesktopWindow*/
hdcmem = GetDCEx(NULL, NULL, DCX_DEFAULTCLIP);
if(!hdcmem) {
mempsd->FreeMemGC(mempsd);
return NULL;
}
hdcmem->psd = mempsd;
/* select in default bitmap to setup mem device parms*/
SelectObject(hdcmem, (HGDIOBJ)&default_bitmap);
return hdcmem;
}
BOOL WINAPI
BitBlt(HDC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight,
HDC hdcSrc, int nXSrc, int nYSrc, DWORD dwRop)
{
HWND hwnd;
POINT dst, src;
if(!hdcDest || !hdcSrc)
return FALSE;
dst.x = nXDest;
dst.y = nYDest;
src.x = nXSrc;
src.y = nYSrc;
/* if src screen DC, convert coords*/
/* FIXME: src clipping isn't checked, only one set of cliprects also*/
if(!MwIsMemDC(hdcSrc) && MwIsClientDC(hdcSrc)) {
if(!(hwnd = MwPrepareDC(hdcSrc)))
return FALSE;
ClientToScreen(hwnd, &src);
}
/* if dst screen DC, convert coords and set clipping*/
/* FIXME: if dest is also screen, src clipping will be overwritten*/
if(!MwIsMemDC(hdcDest) && MwIsClientDC(hdcDest)) {
if(!(hwnd = MwPrepareDC(hdcDest)))
return FALSE;
ClientToScreen(hwnd, &dst);
}
GdBlit(hdcDest->psd, dst.x, dst.y, nWidth, nHeight,
hdcSrc->psd, src.x, src.y, dwRop);
return TRUE;
}
UINT WINAPI
GetSystemPaletteEntries(HDC hdc,UINT iStartIndex,UINT nEntries,
LPPALETTEENTRY lppe)
{
UINT i;
MWPALENTRY rgb;
/* currently, we only work for screen device*/
if(!hdc || hdc->psd != &scrdev)
return 0;
for(i=0; i<nEntries; ++i) {
if(!GdGetPalette(hdc->psd, i+iStartIndex, 1, &rgb))
break;
lppe->peRed = rgb.r;
lppe->peGreen = rgb.g;
lppe->peBlue = rgb.b;
lppe->peFlags = 0;
++lppe;
}
return i;
}
/* allow NULL hdc for scrdev*/
int WINAPI
GetDeviceCaps(HDC hdc, int nIndex)
{
PSD psd;
if (!hdc)
psd = &scrdev;
else psd = hdc->psd;
switch(nIndex) {
case HORZRES:
return psd->xvirtres;
case VERTRES:
return psd->yvirtres;
case BITSPIXEL:
return psd->bpp;
case PLANES:
return psd->planes;
case LOGPIXELSX:
case LOGPIXELSY:
return 96;
case SIZEPALETTE:
if (psd->bpp <= 8)
return psd->ncolors;
break;
}
return 0;
}
| gpl-2.0 |
alexey6600/kernel_sony_tetra_2 | drivers/misc/tmd2771.c | 70420 | /*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*******************************************************************************/
/*******************************************************************************
* *
* File Name: taos.c *
* Description: Linux device driver for Taos ambient light and *
* proximity sensors. *
* Author: John Koshi *
* History: 09/16/2009 - Initial creation *
* 10/09/2009 - Triton version *
* 12/21/2009 - Probe/remove mode *
* 02/07/2010 - Add proximity *
* *
********************************************************************************
* Proprietary to Taos Inc., 1001 Klein Road #300, Plano, TX 75074 *
*******************************************************************************/
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/cdev.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/hwmon.h>
#include <linux/timer.h>
#include <linux/uaccess.h>
#include <linux/errno.h>
#include <linux/delay.h>
#include <linux/i2c/taos_common.h>
#include <linux/delay.h>
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <asm/gpio.h>
#include <linux/poll.h>
#include <linux/wakelock.h>
#include <linux/input.h>
#include <linux/of.h>
#include <linux/of_fdt.h>
#include <linux/of_platform.h>
#include <linux/of_gpio.h>
#ifdef CONFIG_HAS_EARLYSUSPEND
#include <linux/earlysuspend.h>
#endif
#define I2C_RETRY_DELAY 5
#define I2C_RETRY_COUNTS 20
#define LOG_LEVEL_ERROR (1U<<0)
#define LOG_LEVEL_INFO (1U<<0)
#define LOG_LEVEL_DEBUG (1U<<1)
#define LOG_LEVEL_FLOW (1U<<2)
static int debug_mask = LOG_LEVEL_ERROR;
module_param_named(debug_mask, debug_mask, int, S_IRUGO | S_IWUSR | S_IWGRP);
MODULE_PARM_DESC(debug,
"Debug level: Default: 0\n"
"\t\t\t 1: error info\n"
"\t\t\t 2: debug info\n" "\t\t\t 4: function flow\n");
#define pr_taos(debug_level_mask, fmt, args...) do {\
if (debug_mask & LOG_LEVEL_##debug_level_mask)\
pr_info("%s|%d: "fmt, KBUILD_BASENAME, __LINE__, ##args);\
} while (0)
#define TAOS_DEVICE_NAME "taos"
#define TAOS_DEVICE_ID "tmd2771"
#define TAOS_ID_NAME_SIZE 10
#define TAOS_TRITON_CHIPIDVAL 0x00
#define TAOS_TRITON_MAXREGS 32
#define TAOS_DEVICE_ADDR1 0x29
#define TAOS_DEVICE_ADDR2 0x39
#define TAOS_DEVICE_ADDR3 0x49
#define TAOS_MAX_NUM_DEVICES 3
#define TAOS_MAX_DEVICE_REGS 32
#define I2C_MAX_ADAPTERS 1
/* TRITON register offsets */
#define TAOS_TRITON_CNTRL 0x00
#define TAOS_TRITON_ALS_TIME 0X01
#define TAOS_TRITON_PRX_TIME 0x02
#define TAOS_TRITON_WAIT_TIME 0x03
#define TAOS_TRITON_ALS_MINTHRESHLO 0X04
#define TAOS_TRITON_ALS_MINTHRESHHI 0X05
#define TAOS_TRITON_ALS_MAXTHRESHLO 0X06
#define TAOS_TRITON_ALS_MAXTHRESHHI 0X07
#define TAOS_TRITON_PRX_MINTHRESHLO 0X08
#define TAOS_TRITON_PRX_MINTHRESHHI 0X09
#define TAOS_TRITON_PRX_MAXTHRESHLO 0X0A
#define TAOS_TRITON_PRX_MAXTHRESHHI 0X0B
#define TAOS_TRITON_INTERRUPT 0x0C
#define TAOS_TRITON_PRX_CFG 0x0D
#define TAOS_TRITON_PRX_COUNT 0x0E
#define TAOS_TRITON_GAIN 0x0F
#define TAOS_TRITON_REVID 0x11
#define TAOS_TRITON_CHIPID 0x12
#define TAOS_TRITON_STATUS 0x13
#define TAOS_TRITON_ALS_CHAN0LO 0x14
#define TAOS_TRITON_ALS_CHAN0HI 0x15
#define TAOS_TRITON_ALS_CHAN1LO 0x16
#define TAOS_TRITON_ALS_CHAN1HI 0x17
#define TAOS_TRITON_PRX_LO 0x18
#define TAOS_TRITON_PRX_HI 0x19
#define TAOS_TRITON_TEST_STATUS 0x1F
/* Triton cmd reg masks */
#define TAOS_TRITON_CMD_REG 0X80
#define TAOS_TRITON_CMD_AUTO 0x10
#define TAOS_TRITON_CMD_BYTE_RW 0x00
#define TAOS_TRITON_CMD_WORD_BLK_RW 0x20
#define TAOS_TRITON_CMD_SPL_FN 0x60
#define TAOS_TRITON_CMD_PROX_INTCLR 0X05
#define TAOS_TRITON_CMD_ALS_INTCLR 0X06
#define TAOS_TRITON_CMD_PROXALS_INTCLR 0X07
#define TAOS_TRITON_CMD_TST_REG 0X08
#define TAOS_TRITON_CMD_USER_REG 0X09
/* Triton cntrl reg masks */
#define TAOS_TRITON_CNTL_PROX_INT_ENBL 0X20
#define TAOS_TRITON_CNTL_ALS_INT_ENBL 0X10
#define TAOS_TRITON_CNTL_WAIT_TMR_ENBL 0X08
#define TAOS_TRITON_CNTL_PROX_DET_ENBL 0X04
#define TAOS_TRITON_CNTL_ADC_ENBL 0x02
#define TAOS_TRITON_CNTL_PWRON 0x01
/* Triton status reg masks */
#define TAOS_TRITON_STATUS_ADCVALID 0x01
#define TAOS_TRITON_STATUS_PRXVALID 0x02
#define TAOS_TRITON_STATUS_ADCINTR 0x10
#define TAOS_TRITON_STATUS_PRXINTR 0x20
/* lux constants */
#define TAOS_MAX_LUX 1000000
#define TAOS_SCALE_MILLILUX 2
#define TAOS_FILTER_DEPTH 3
#define CHIP_ID 0x3d
#ifdef TMD2771_MD_TEST
static struct timer_list tmd2771_wakeup_timer;
#endif
struct tmd2771x_reg {
const char *name;
u8 reg;
} tmd2771x_regs[] = {
{"ENABLE", TAOS_TRITON_CNTRL},
{"ATIME", TAOS_TRITON_ALS_TIME},
{"PTIME", TAOS_TRITON_PRX_TIME},
{"WTIME", TAOS_TRITON_WAIT_TIME},
{"AILTL", TAOS_TRITON_ALS_MINTHRESHLO},
{"AILTH", TAOS_TRITON_ALS_MINTHRESHHI},
{"AIHTL", TAOS_TRITON_ALS_MAXTHRESHLO},
{"AIHTH", TAOS_TRITON_ALS_MAXTHRESHHI},
{"PILTL", TAOS_TRITON_PRX_MINTHRESHLO},
{"PILTH", TAOS_TRITON_PRX_MINTHRESHHI},
{"PIHTL", TAOS_TRITON_PRX_MAXTHRESHLO},
{"PIHTH", TAOS_TRITON_PRX_MAXTHRESHHI},
{"PERS", TAOS_TRITON_INTERRUPT},
{"CONFIG", TAOS_TRITON_PRX_CFG},
{"PPCOUNT", TAOS_TRITON_PRX_COUNT},
{"CONTROL", TAOS_TRITON_GAIN},
{"ID", TAOS_TRITON_CHIPID},
{"STATUS", TAOS_TRITON_STATUS},
{"C0DATA", TAOS_TRITON_ALS_CHAN0LO},
{"C0DATAH", TAOS_TRITON_ALS_CHAN0HI},
{"C1DATA", TAOS_TRITON_ALS_CHAN1LO},
{"C1DATAH", TAOS_TRITON_ALS_CHAN1HI},
{"PDATA", TAOS_TRITON_PRX_LO},
{"PDATAH", TAOS_TRITON_PRX_HI},
};
static const struct of_device_id tmd2771_of_match[] = {
{.compatible = "bcm,tmd2771",},
{},
}
MODULE_DEVICE_TABLE(of, tmd2771_of_match);
#ifdef TMD2771_USER_CALIBRATION
static int tmd2771_offset;
#endif
#define TAOS_INPUT_NAME_ALS "TAOS_ALS_SENSOR"
#define TAOS_INPUT_NAME_PROX "TAOS_PROX_SENSOR"
static int isPsensorLocked;
static int als_ps_int;
static int als_ps_gpio_inr;
/* forward declarations */
static int taos_probe(struct i2c_client *clientp,
const struct i2c_device_id *idp);
static int taos_remove(struct i2c_client *client);
static int taos_open(struct inode *inode, struct file *file);
static int taos_release(struct inode *inode, struct file *file);
static long taos_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
static int taos_read(struct file *file, char *buf, size_t count, loff_t *ppos);
static int taos_write(struct file *file, const char *buf, size_t count,
loff_t *ppos);
static loff_t taos_llseek(struct file *file, loff_t offset, int orig);
static int taos_get_lux(void);
static int taos_lux_filter(int raw_lux);
static int taos_device_name(unsigned char *bufp, char **device_name);
static int taos_prox_poll(struct taos_prox_info *prxp);
static void taos_prox_poll_timer_func(unsigned long param);
static void taos_prox_poll_timer_start(void);
static int taos_als_threshold_set(void);
static int taos_prox_threshold_set(void);
static int taos_als_get_data(void);
static int taos_interrupts_clear(void);
static int prox_calibrate(void);
static int taos_sensors_als_on(void);
DECLARE_WAIT_QUEUE_HEAD(waitqueue_read);
#define ALS_PROX_DEBUG
unsigned int ReadEnable;
struct ReadData {
unsigned int data;
unsigned int interrupt;
};
struct ReadData readdata[2];
/* first device number */
static dev_t taos_dev_number;
/* class structure for this device */
struct class *taos_class;
/* module device table */
static struct i2c_device_id taos_idtable[] = {
{TAOS_DEVICE_ID, 0},
{}
};
MODULE_DEVICE_TABLE(i2c, taos_idtable);
/*board and address info*/
struct i2c_board_info taos_board_info[] = {
{I2C_BOARD_INFO(TAOS_DEVICE_ID, TAOS_DEVICE_ADDR2),},
};
unsigned short const taos_addr_list[2] = { TAOS_DEVICE_ADDR2, I2C_CLIENT_END };
/*client and device*/
struct i2c_client *my_clientp;
struct i2c_client *bad_clientp[TAOS_MAX_NUM_DEVICES];
static int device_found;
static char pro_buf[4];
static int mcount = 0x0;
static char als_buf[4];
static u16 status = 0x0;
static int ALS_ON = 0x0;
static int PROX_STATE = 0x0;
static int PROX_ON = 0x0;
static int prox_tmp_on = 1;
/* driver definition */
static struct i2c_driver taos_driver = {
.driver = {
.owner = THIS_MODULE,
.name = TAOS_DEVICE_NAME,
.of_match_table = tmd2771_of_match,
},
.id_table = taos_idtable,
.probe = taos_probe,
.remove = taos_remove,
};
/* per-device data */
struct taos_data {
struct i2c_client *client;
struct cdev cdev;
unsigned int addr;
struct input_dev *input_dev_als;
struct input_dev *input_dev_prox;
struct work_struct work;
struct work_struct calib_work;
struct mutex mutex;
struct wake_lock taos_wake_lock;
char taos_id;
char taos_name[TAOS_ID_NAME_SIZE];
struct mutex update_lock;
char valid;
unsigned long last_updated;
} *taos_datap;
static const struct file_operations taos_fops = {
.owner = THIS_MODULE,
.open = taos_open,
.release = taos_release,
.read = taos_read,
.write = taos_write,
.llseek = taos_llseek,
.unlocked_ioctl = taos_ioctl,
/*.poll = taos_poll, */
};
/* device configuration */
struct taos_cfg *taos_cfgp;
/*prox info*/
struct taos_prox_info prox_cal_info[32];
struct taos_prox_info prox_cur_info;
struct taos_prox_info *prox_cur_infop = &prox_cur_info;
static u8 prox_history_hi = 0x0;
static u8 prox_history_lo = 0x0;
static struct timer_list prox_poll_timer;
static int device_released = 0x0;
static u16 sat_als = 0x0;
static u16 sat_prox = 0x0;
/* device reg init values */
static u8 taos_triton_reg_init[16] = {
0x00, 0xFF, 0XFF, 0XFF, 0X00, 0X00, 0XFF, 0XFF, 0X00,
0X00, 0XFF, 0XFF, 0X00, 0X00, 0X00, 0X00
};
/* lux time scale */
struct time_scale_factor {
u16 numerator;
u16 denominator;
u16 saturation;
};
struct time_scale_factor TritonTime = { 1, 0, 0 };
struct time_scale_factor *lux_timep = &TritonTime;
/* gain table */
static u8 taos_triton_gain_table[] = { 1, 8, 16, 120 };
/* lux data */
struct lux_data {
u16 ratio;
u16 clear;
u16 ir;
};
struct lux_data TritonFN_lux_data[] = {
{9830, 8320, 15360},
{12452, 10554, 22797},
{14746, 6234, 11430},
{17695, 3968, 6400},
{0, 0, 0}
};
struct lux_data *lux_tablep = TritonFN_lux_data;
static int lux_history[TAOS_FILTER_DEPTH] = { -ENODATA, -ENODATA, -ENODATA };
static irqreturn_t taos_irq_handler(int irq, void *dev_id)
{
schedule_work(&taos_datap->work);
return IRQ_HANDLED;
}
#ifdef TMD2771_MD_TEST
void tmd2771_timer_func(unsigned long data)
{
schedule_work(&taos_datap->work);
mod_timer(&tmd2771_wakeup_timer,
jiffies+msecs_to_jiffies(100));
}
#endif
static int taos_get_data(void)
{
int ret = 0;
ret = i2c_smbus_write_byte(taos_datap->client,
TAOS_TRITON_CMD_REG | 0x13);
if (ret < 0) {
pr_taos(ERROR, "TAOS: i2c_smbus_write_byte(1)failed\n");
return ret;
}
status = i2c_smbus_read_byte(taos_datap->client);
if (mutex_trylock(&taos_datap->update_lock) == 0) {
pr_taos(INFO, "taos_get_data device isbusy\n");
return -ERESTARTSYS;
}
if ((status & 0x20) == 0x20) {
/*set_threshold();*/
ret = taos_prox_threshold_set();
if (ret >= 0)
ReadEnable = 1;
}
if ((status & 0x10) == 0x10) {
ReadEnable = 1;
taos_als_threshold_set();
ret = taos_als_get_data();
}
mutex_unlock(&taos_datap->update_lock);
return ret;
}
static int taos_interrupts_clear(void)
{
int ret = 0;
ret = i2c_smbus_write_byte(taos_datap->client, (TAOS_TRITON_CMD_REG
| TAOS_TRITON_CMD_SPL_FN
| 0x07));
if (ret < 0) {
pr_taos(ERROR, "TAOS: i2c error in taos_interrupts_clear()\n");
return ret;
}
return ret;
}
#ifdef TMD2771_MD_TEST
static void taos_work_func(struct work_struct *work)
{
int i, ret = 0;
u8 chdata[6];
u16 proxdata = 0;
u16 cleardata = 0;
int data = 0;
for (i = 0; i < 6; i++) {
chdata[i] = (i2c_smbus_read_byte_data(taos_datap->client,
(TAOS_TRITON_CMD_REG | TAOS_TRITON_CMD_AUTO |
(TAOS_TRITON_ALS_CHAN0LO + i))));
}
cleardata = chdata[0] + chdata[1] * 256;
proxdata = chdata[4] + chdata[5] * 256;
pr_info("[md test] tmd2771x prox data = %d\n", proxdata);
}
#else
static void taos_work_func(struct work_struct *work)
{
int ret;
int gpio_level;
ret = 0;
taos_get_data();
ret = taos_interrupts_clear();
gpio_level = gpio_get_value(als_ps_gpio_inr);
if (ret < 0 || gpio_level == 0) {
pr_err("tmd2771x: clear interrupts error\n");
taos_interrupts_clear();
}
}
#endif
static void taos_calib_work_func(struct work_struct *work)
{
int ret = 0;
u8 reg_val = 0;
u8 reg_cntrl = 0;
int itime = 0;
struct taos_data *taos_datap = container_of(work,
struct taos_data, calib_work);
mutex_lock(&taos_datap->mutex);
itime = (((taos_cfgp->als_time / 50) * 18) - 1);
itime = (~itime);
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_ALS_TIME, itime);
if (ret < 0)
goto out;
ret = i2c_smbus_write_byte(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_CNTRL);
if (ret < 0)
goto out;
reg_val = i2c_smbus_read_byte(taos_datap->client);
reg_cntrl = reg_val | (TAOS_TRITON_CNTL_ADC_ENBL |
TAOS_TRITON_CNTL_PWRON);
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_CNTRL, reg_cntrl);
if (ret < 0)
goto out;
ret = i2c_smbus_write_byte(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_GAIN);
if (ret < 0)
goto out;
reg_val = i2c_smbus_read_byte(taos_datap->client);
reg_val = reg_val & 0xFC;
reg_val = reg_val | (taos_cfgp->gain & 0x03);
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_GAIN, reg_val);
if (ret < 0)
goto out;
msleep(500);
ret = i2c_smbus_write_byte(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_STATUS);
if (ret < 0)
goto out;
reg_val = i2c_smbus_read_byte(taos_datap->client);
if ((reg_val & 0x01) != 0x01)
goto out;
taos_als_get_data();
out:
mutex_unlock(&taos_datap->mutex);
}
static int taos_als_get_data(void)
{
int ret = 0;
u8 reg_val;
int lux_val = 0;
pr_taos(DEBUG, "trace; taos_als_get_data\n");
ret = i2c_smbus_write_byte(taos_datap->client, TAOS_TRITON_CMD_REG
| TAOS_TRITON_CNTRL);
if (ret < 0) {
pr_taos(ERROR, "TAOS: i2c_smbus_write_byte fail in %s\n",
__func__);
return ret;
}
reg_val = i2c_smbus_read_byte(taos_datap->client);
if ((reg_val & (TAOS_TRITON_CNTL_ADC_ENBL | TAOS_TRITON_CNTL_PWRON)) !=
(TAOS_TRITON_CNTL_ADC_ENBL | TAOS_TRITON_CNTL_PWRON)) {
pr_taos(ERROR, "TAOS: taos_als_get_data reg_val === %0x\n",
reg_val);
taos_interrupts_clear();
return -ENODATA;
}
ret = i2c_smbus_write_byte(taos_datap->client, TAOS_TRITON_CMD_REG |
TAOS_TRITON_STATUS);
if (ret < 0) {
pr_taos(ERROR, "i2c_smbus_write_byte failed status register\n");
return ret;
}
reg_val = i2c_smbus_read_byte(taos_datap->client);
if ((reg_val & TAOS_TRITON_STATUS_ADCVALID) !=
TAOS_TRITON_STATUS_ADCVALID) {
pr_taos(ERROR, "TAOS: taos_als_get_data reg_val === %0x\n",
reg_val);
taos_interrupts_clear();
return -ENODATA;
}
lux_val = taos_get_lux();
if (lux_val < 0)
pr_taos(ERROR, "TAOS: call to taos_get_lux() error %d\n",
lux_val);
/* lux_val = taos_lux_filter(lux_val); */
input_report_abs(taos_datap->input_dev_als, ABS_MISC, lux_val);
input_sync(taos_datap->input_dev_als);
return ret;
}
static int taos_als_threshold_set(void)
{
int i, ret = 0;
u8 chdata[2];
u16 ch0;
u16 als_threshold_lo;
u16 als_threshold_hi;
for (i = 0; i < 2; i++) {
chdata[i] = (i2c_smbus_read_byte_data(taos_datap->client,
(TAOS_TRITON_CMD_REG |
TAOS_TRITON_CMD_AUTO |
(TAOS_TRITON_ALS_CHAN0LO
+ i))));
}
ch0 = chdata[0] + chdata[1] * 256;
als_threshold_hi = (12 * ch0) / 10;
if (als_threshold_hi >= 65535)
als_threshold_hi = 65535;
als_threshold_lo = (8 * ch0) / 10;
als_buf[0] = als_threshold_lo & 0x0ff;
als_buf[1] = als_threshold_lo >> 8;
als_buf[2] = als_threshold_hi & 0x0ff;
als_buf[3] = als_threshold_hi >> 8;
pr_taos(DEBUG, "trace : taos_als_threshold_set\n");
for (mcount = 0; mcount < 4; mcount++) {
ret = i2c_smbus_write_byte_data(taos_datap->client,
(TAOS_TRITON_CMD_REG | 0x04) +
mcount, als_buf[mcount]);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte_data failed in %s\n",
__func__);
return ret;
}
}
return ret;
}
static int taos_prox_threshold_set(void)
{
int i, ret = 0;
u8 chdata[6];
u16 proxdata = 0;
u16 cleardata = 0;
int data = 0;
for (i = 0; i < 6; i++) {
chdata[i] =
(i2c_smbus_read_byte_data
(taos_datap->client,
(TAOS_TRITON_CMD_REG | TAOS_TRITON_CMD_AUTO |
(TAOS_TRITON_ALS_CHAN0LO + i))));
}
cleardata = chdata[0] + chdata[1] * 256;
proxdata = chdata[4] + chdata[5] * 256;
pr_taos(DEBUG, "trace: taos_prox_threshold_set %d\n", proxdata);
if (prox_tmp_on
|| proxdata
< (taos_cfgp->prox_threshold_lo - taos_cfgp->prox_win_sw)) {
pro_buf[0] = 0x0;
pro_buf[1] = 0x0;
pro_buf[2] = taos_cfgp->prox_threshold_hi & 0x0ff;
pro_buf[3] = taos_cfgp->prox_threshold_hi >> 8;
data = 1;
input_report_abs(taos_datap->input_dev_prox, ABS_DISTANCE,
data);
input_sync(taos_datap->input_dev_prox);
pr_taos(INFO, " proximity: no object detected, proxdata: %d\n",
proxdata);
} else if (proxdata
> (taos_cfgp->prox_threshold_hi + taos_cfgp->prox_win_sw)) {
pr_taos(DEBUG, "====cleardata = %d sat_als = %d\n",
cleardata, sat_als);
if (cleardata > ((sat_als * 80) / 100))
return -ENODATA;
pro_buf[0] = taos_cfgp->prox_threshold_lo & 0x0ff;
pro_buf[1] = taos_cfgp->prox_threshold_lo >> 8;
pro_buf[2] = 0xff;
pro_buf[3] = 0xff;
data = 0;
input_report_abs(taos_datap->input_dev_prox, ABS_DISTANCE,
data);
input_sync(taos_datap->input_dev_prox);
pr_taos(INFO, "proximity: object detected,proxdata: %d\n",
proxdata);
}
PROX_STATE = data;
for (mcount = 0; mcount < 4; mcount++) {
ret = i2c_smbus_write_byte_data(taos_datap->client,
(TAOS_TRITON_CMD_REG | 0x08) +
mcount, pro_buf[mcount]);
if (ret < 0)
return ret;
}
prox_tmp_on = 0;
return ret;
}
static int __init taos_init(void)
{
int ret = 0;
struct device *temp_dev;
ret = alloc_chrdev_region(&taos_dev_number, 0,
TAOS_MAX_NUM_DEVICES, TAOS_DEVICE_NAME);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: alloc_chrdev_region() failed in taos_init()\n");
goto err_alloc_chrdev;
}
taos_class = class_create(THIS_MODULE, TAOS_DEVICE_NAME);
if (IS_ERR(taos_class)) {
pr_taos(ERROR, "fail to create class taos\n");
goto err_create_class;
}
taos_datap = kzalloc(sizeof(struct taos_data), GFP_KERNEL);
if (!taos_datap)
goto err_kzalloc_taos_datap;
memset(taos_datap, 0, sizeof(struct taos_data));
cdev_init(&taos_datap->cdev, &taos_fops);
taos_datap->cdev.owner = THIS_MODULE;
ret = cdev_add(&taos_datap->cdev, taos_dev_number, 1);
if (ret < 0) {
pr_taos(ERROR, "TAOS: cdev_add() failed in taos_init()\n");
goto err_cdev_add;
}
wake_lock_init(&taos_datap->taos_wake_lock, WAKE_LOCK_SUSPEND,
"taos-wake-lock");
temp_dev = device_create(taos_class, NULL,
MKDEV(MAJOR(taos_dev_number), 0), &taos_driver,
"taos");
if (IS_ERR(temp_dev)) {
pr_taos(ERROR, "cannot create taos dev\n");
goto err_create_taos_dev;
}
ret = i2c_add_driver(&taos_driver);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_add_driver() failed in taos_init()\n");
goto err_create_taos_dev;
}
return 0;
err_create_taos_dev:
cdev_del(&taos_datap->cdev);
err_cdev_add:
kfree(taos_datap);
taos_datap = NULL;
err_kzalloc_taos_datap:
class_destroy(taos_class);
err_create_class:
unregister_chrdev_region(taos_dev_number, TAOS_MAX_NUM_DEVICES);
err_alloc_chrdev:
return ret;
}
static void __exit taos_exit(void)
{
if (my_clientp)
i2c_unregister_device(my_clientp);
i2c_del_driver(&taos_driver);
device_destroy(taos_class, MKDEV(MAJOR(taos_dev_number), 0));
cdev_del(&taos_datap->cdev);
class_destroy(taos_class);
unregister_chrdev_region(taos_dev_number, TAOS_MAX_NUM_DEVICES);
disable_irq(als_ps_int);
kfree(taos_datap);
}
static int __attribute__ ((unused)) als_calibrate(struct taos_cfg *taos_cfg,
struct taos_data *taos_data)
{
int itime = 0;
int ret = 0;
u8 reg_cntrl = 0, reg_val = 0;
itime = (((taos_cfgp->als_time / 50) * 18) - 1);
itime = (~itime);
ret = i2c_smbus_write_byte_data(taos_datap->client, TAOS_TRITON_CMD_REG
| TAOS_TRITON_ALS_TIME, itime);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte_data failed in %s\n",
__func__);
return ret;
}
ret = i2c_smbus_write_byte(taos_datap->client, TAOS_TRITON_CMD_REG
| TAOS_TRITON_CNTRL);
if (ret < 0) {
pr_taos(ERROR,
"TAOS:i2c_smbus_write_byte failed als_calibrate\n");
return ret;
}
reg_val = i2c_smbus_read_byte(taos_datap->client);
reg_cntrl =
reg_val | (TAOS_TRITON_CNTL_ADC_ENBL | TAOS_TRITON_CNTL_PWRON);
ret = i2c_smbus_write_byte_data(taos_datap->client, TAOS_TRITON_CMD_REG
| TAOS_TRITON_CNTRL, reg_cntrl);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte_data failed in als_on\n");
ret = i2c_smbus_write_byte(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_GAIN);
if (ret < 0)
pr_taos(ERROR, "failed in ioctl als_on\n");
return ret;
}
reg_val = i2c_smbus_read_byte(taos_datap->client);
reg_val = reg_val & 0xFC;
reg_val = reg_val | (taos_cfgp->gain & 0x03);
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG
| TAOS_TRITON_GAIN, reg_val);
if (ret < 0) {
pr_taos(ERROR, "TAOS: failed in ioctl als_on\n");
return ret;
}
mdelay(500);
ret = i2c_smbus_write_byte(taos_datap->client, TAOS_TRITON_CMD_REG |
TAOS_TRITON_STATUS);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte failed in als_calibrate\n");
return ret;
}
reg_val = i2c_smbus_read_byte(taos_datap->client);
if ((reg_val & 0x01) != 0x01)
return -ENODATA;
ret = taos_als_get_data();
return ret;
}
static int prox_calibrate(void)
{
int i = 0;
int ret = 0;
u8 reg_cntrl = 0, reg_val = 0;
int prox_sum = 0, prox_mean = 0, prox_max = 0;
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG | 0x01,
taos_cfgp->prox_int_time);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte_data failed in ioctl prox_on\n");
return ret;
}
ret = i2c_smbus_write_byte_data(taos_datap->client,
(TAOS_TRITON_CMD_REG | 0x02),
taos_cfgp->prox_adc_time);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte_data failed in ioctl prox_on\n");
return ret;
}
ret = i2c_smbus_write_byte_data(taos_datap->client,
(TAOS_TRITON_CMD_REG | 0x03),
taos_cfgp->prox_wait_time);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte_data failed in ioctl prox_on\n");
return ret;
}
ret = i2c_smbus_write_byte_data(taos_datap->client, TAOS_TRITON_CMD_REG
| 0x0D, taos_cfgp->prox_config);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte_data failed in ioctl prox_on\n");
return ret;
}
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG | 0x0E,
taos_cfgp->prox_pulse_cnt);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte_data failed in ioctl prox_on\n");
return ret;
}
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG | 0x0F,
taos_cfgp->prox_gain);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte_data failed in ioctl prox_on\n");
return ret;
}
reg_cntrl = reg_val | (TAOS_TRITON_CNTL_PROX_DET_ENBL |
TAOS_TRITON_CNTL_PWRON |
TAOS_TRITON_CNTL_ADC_ENBL);
ret =
i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG | TAOS_TRITON_CNTRL,
reg_cntrl);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte_data failed in ioctl prox_on\n");
return ret;
}
prox_sum = 0;
prox_max = 0;
for (i = 0; i < 32; i++) {
ret = taos_prox_poll(&prox_cal_info[i]);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: call to prox_poll failed in ioctl prox_calibrate\n");
return ret;
}
prox_sum += prox_cal_info[i].prox_data;
if (prox_cal_info[i].prox_data > prox_max)
prox_max = prox_cal_info[i].prox_data;
msleep(100);
}
prox_mean = prox_sum >> 5;
taos_cfgp->prox_threshold_hi =
((((prox_max - prox_mean) * 200) + 50) / 100) + prox_mean;
taos_cfgp->prox_threshold_lo =
((((prox_max - prox_mean) * 170) + 50) / 100) + prox_mean;
if (taos_cfgp->prox_threshold_hi > 600) {
taos_cfgp->prox_threshold_hi = 600;
taos_cfgp->prox_threshold_lo = 550;
}
if (taos_cfgp->prox_threshold_lo < 100) {
taos_cfgp->prox_threshold_hi = 200;
taos_cfgp->prox_threshold_lo = 150;
}
#ifdef TMD2771_USER_CALIBRATION
tmd2771_offset = prox_mean;
pr_taos(INFO, "prox calibrate tmd2771_offset=%d\n", tmd2771_offset);
#endif
pr_taos(DEBUG, "----------- taos_cfgp->prox_threshold_hi = %d\n",
taos_cfgp->prox_threshold_hi);
pr_taos(DEBUG, "----------- taos_cfgp->prox_threshold_lo = %d\n",
taos_cfgp->prox_threshold_lo);
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_CNTRL, 0x00);
if (ret < 0)
pr_taos(ERROR,
"Power Off FAIL in prox_calibrate ret=%d\n", ret);
return 0;
}
#ifdef CONFIG_HAS_EARLYSUSPEND
static int __taos_late_resume(struct i2c_client *client)
{
u8 reg_val;
int ret = -1;
pr_taos(DEBUG, "taos late resume\n");
ret = i2c_smbus_write_byte(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_CNTRL);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte failed in ioctl als_calibrate\n");
return ret;
}
reg_val = i2c_smbus_read_byte(taos_datap->client);
if (((reg_val & TAOS_TRITON_CNTL_PROX_DET_ENBL) == 0x0)
&& (ALS_ON == 1))
taos_sensors_als_on();
if (PROX_ON == 1 && ALS_ON == 1)
reg_val = 0x3f;
else if (ALS_ON == 1)
reg_val = 0x13;
else if (PROX_ON == 1)
reg_val = 0x2d;
pr_taos(DEBUG, "TAOS: enabled reg in resume=0x%x\n", reg_val);
ret = i2c_smbus_write_byte(taos_datap->client, TAOS_TRITON_CMD_REG
| TAOS_TRITON_CNTRL);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte failed in taos_resume\n");
return ret;
}
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG | TAOS_TRITON_CNTRL,
reg_val);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte_data failed in ioctl als_off\n");
return ret;
}
return ret;
}
static int __taos_early_suspend(struct i2c_client *client, pm_message_t mesg)
{
u8 reg_val = 0, reg_cntrl = 0;
int ret = -1;
pr_taos(DEBUG, "taos enter suspend\n");
if (isPsensorLocked)
return -1;
ret = i2c_smbus_write_byte(taos_datap->client, TAOS_TRITON_CMD_REG
| TAOS_TRITON_CNTRL);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte failed in taos_resume\n");
return ret;
}
reg_val = i2c_smbus_read_byte(taos_datap->client);
if (~(reg_val & TAOS_TRITON_CNTL_PROX_DET_ENBL)) {
reg_cntrl = reg_val & (~TAOS_TRITON_CNTL_PWRON);
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_CNTRL, reg_cntrl);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte_data failed in taos_suspend\n");
return ret;
}
}
return ret;
}
static void taos_early_suspend(struct early_suspend *h)
{
pm_message_t mesg = {.event = PM_EVENT_SUSPEND, };
__taos_early_suspend(taos_datap->client, mesg);
}
static void taos_late_resume(struct early_suspend *h)
{
__taos_late_resume(taos_datap->client);
}
static struct early_suspend taos_early_suspend_desc = {
.level = EARLY_SUSPEND_LEVEL_BLANK_SCREEN,
.suspend = taos_early_suspend,
.resume = taos_late_resume,
};
#endif
static int taos_i2c_read(struct i2c_client *client, u8 reg, u8 *val)
{
int err = -EIO;
/* select register to write */
err = i2c_smbus_write_byte(client, (TAOS_TRITON_CMD_REG | reg));
if (err < 0) {
pr_taos(ERROR, "failed to write cmd register 0x%x, ret: %d\n",
reg, err);
goto smbus_write_err;
}
/* read the data */
err = i2c_smbus_read_byte(client);
if (err >= 0) {
*val = (u8) err;
} else {
pr_taos(ERROR, "failed to read register: 0x%x,ret:%d\n",
reg, err);
goto smbus_write_err;
}
smbus_write_err:
return err;
}
#ifdef TMD2771_USER_CALIBRATION
static ssize_t prox_cali_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
int enable;
int ret;
ret = kstrtoint(buf, 0, &enable);
if (ret)
return ret;
if (enable)
prox_calibrate();
return count;
}
static DEVICE_ATTR(prox_cali, 0644, NULL, prox_cali_store);
static ssize_t tmd2771_get_offset(struct device *dev,
struct device_attribute *attr,
char *buf)
{
return sprintf(buf, "%d\n", tmd2771_offset);
}
static ssize_t tmd2771_set_offset(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
int x;
int hi;
int lo;
int i;
int err = -EINVAL;
err = sscanf(buf, "%d", &x);
if (err != 1) {
pr_err("invalid parameter number: %d\n", err);
return err;
}
tmd2771_offset = x;
hi = taos_cfgp->prox_threshold_hi_def + tmd2771_offset
- taos_cfgp->prox_offset;
lo = taos_cfgp->prox_threshold_lo_def + tmd2771_offset
- taos_cfgp->prox_offset;
pr_taos(INFO,
"tmd2771_offset=%d,prox_offset=%d, hi =%d, lo=%d\n",
tmd2771_offset, taos_cfgp->prox_offset, hi, lo);
if (hi > 0xfffe || lo > 0xfffe ||
(tmd2771_offset-taos_cfgp->prox_offset) < 0) {
tmd2771_offset = 0;
pr_taos(ERROR, "isl290xx sw cali failed\n");
} else {
if (lo > tmd2771_offset) {
taos_cfgp->prox_threshold_hi = hi;
taos_cfgp->prox_threshold_lo = lo;
} else {
for (i = 0; i < 100; i++) {
hi++;
lo++;
if (lo > tmd2771_offset) {
taos_cfgp->prox_threshold_hi
= hi + 1;
taos_cfgp->prox_threshold_lo
= lo + 1;
break;
}
}
}
}
return count;
}
static DEVICE_ATTR(offset, S_IRUGO | S_IWUSR | S_IWGRP,
tmd2771_get_offset, tmd2771_set_offset);
#endif
static ssize_t taos_power_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
return sprintf(buf, "\nprox: %s, light: %s\n\n",
PROX_ON ? "on" : "off", ALS_ON ? "on" : "off");
}
static ssize_t taos_state_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
return sprintf(buf, "\nproximity:%s detect object\n\n",
PROX_STATE ? "no" : " ");
}
static ssize_t taos_reg_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{
unsigned i, n, reg_count;
u8 value;
reg_count = sizeof(tmd2771x_regs) / sizeof(tmd2771x_regs[0]);
for (i = 0, n = 0; i < reg_count; i++) {
taos_i2c_read(taos_datap->client, tmd2771x_regs[i].reg, &value);
n += scnprintf(buf + n, PAGE_SIZE - n,
"%-20s = 0x%02X\n",
tmd2771x_regs[i].name,
value);
}
return n;
}
static ssize_t taos_reg_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
unsigned i, reg_count, value;
int ret;
u8 prox_lo;
u8 prox_hi;
char name[30];
prox_lo = 0;
prox_hi = 0;
if (count >= 30)
return -EFAULT;
if (sscanf(buf, "%30s %x", name, &value) != 2) {
pr_err("input invalid\n");
return -EFAULT;
}
reg_count = sizeof(tmd2771x_regs) / sizeof(tmd2771x_regs[0]);
for (i = 0; i < reg_count; i++) {
if (!strcmp(name, tmd2771x_regs[i].name)) {
switch (tmd2771x_regs[i].reg) {
case TAOS_TRITON_PRX_MINTHRESHLO:
taos_i2c_read(taos_datap->client,
TAOS_TRITON_PRX_MINTHRESHHI,
&prox_hi);
taos_cfgp->prox_threshold_lo = value
+ (prox_hi << 8);
break;
case TAOS_TRITON_PRX_MINTHRESHHI:
taos_i2c_read(taos_datap->client,
TAOS_TRITON_PRX_MINTHRESHLO, &prox_lo);
taos_cfgp->prox_threshold_lo = (value << 8)
+ prox_lo;
break;
case TAOS_TRITON_PRX_MAXTHRESHLO:
taos_i2c_read(taos_datap->client,
TAOS_TRITON_PRX_MAXTHRESHHI,
&prox_hi);
taos_cfgp->prox_threshold_hi = value
+ (prox_hi << 8);
break;
case TAOS_TRITON_PRX_MAXTHRESHHI:
taos_i2c_read(taos_datap->client,
TAOS_TRITON_PRX_MAXTHRESHLO,
&prox_lo);
taos_cfgp->prox_threshold_hi = (value << 8)
+ prox_lo;
break;
default:
break;
}
ret = i2c_smbus_write_byte_data(taos_datap->client,
tmd2771x_regs[i].reg
| TAOS_TRITON_CMD_REG, value);
if (ret) {
pr_taos(ERROR,
"Failed to write register %s\n",
name);
return -EFAULT;
}
return count;
}
}
pr_taos(INFO, "no such register %s\n", name);
return -EFAULT;
}
static ssize_t prox_enable_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
int enable;
int ret;
u8 reg_cntrl;
ret = kstrtoint(buf, 0, &enable);
if (ret)
return ret;
if (enable) {
if (PROX_ON) {
pr_taos(INFO, "prox_enable: prox already on.\n");
return 0;
}
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG | 0x01,
taos_cfgp->prox_int_time);
if (ret < 0)
return ret;
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG | 0x02,
taos_cfgp->prox_adc_time);
if (ret < 0)
return ret;
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG | 0x03,
taos_cfgp->prox_wait_time);
if (ret < 0)
return ret;
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG | 0x0C,
taos_cfgp->prox_intr_filter);
if (ret < 0)
return ret;
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG | 0x0D,
taos_cfgp->prox_config);
if (ret < 0)
return ret;
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG | 0x0E,
taos_cfgp->prox_pulse_cnt);
if (ret < 0)
return ret;
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG | 0x0F,
taos_cfgp->prox_gain);
if (ret < 0)
return ret;
/* enable the irq of als when prox on */
reg_cntrl = TAOS_TRITON_CNTL_PROX_DET_ENBL |
TAOS_TRITON_CNTL_PWRON |
TAOS_TRITON_CNTL_PROX_INT_ENBL |
TAOS_TRITON_CNTL_ADC_ENBL |
TAOS_TRITON_CNTL_WAIT_TMR_ENBL |
TAOS_TRITON_CNTL_ALS_INT_ENBL;
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_CNTRL, reg_cntrl);
if (ret < 0)
return ret;
PROX_ON = 1;
#ifdef TMD2771_MD_TEST
mod_timer(&tmd2771_wakeup_timer,
jiffies+msecs_to_jiffies(100));
#endif
} else {
if (PROX_ON == 0) {
pr_taos(INFO,
"prox_on: prox already off.\n");
return 0;
}
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_CNTRL, 0x00);
if (ret < 0)
return ret;
if (ALS_ON == 1)
taos_sensors_als_on();
PROX_ON = 0;
}
return count;
}
static DEVICE_ATTR(prox_enable, 0644, NULL, prox_enable_store);
static DEVICE_ATTR(taos_power, 0444, taos_power_show, NULL);
static DEVICE_ATTR(taos_state, 0444, taos_state_show, NULL);
static DEVICE_ATTR(taos_reg, 0644, taos_reg_show, taos_reg_store);
static struct attribute *taos_prox_attr[] = {
&dev_attr_taos_power.attr,
&dev_attr_taos_state.attr,
&dev_attr_taos_reg.attr,
#ifdef TMD2771_USER_CALIBRATION
&dev_attr_prox_cali.attr,
&dev_attr_offset.attr,
#endif
&dev_attr_prox_enable.attr,
NULL,
};
static struct attribute_group taos_prox_attr_grp = {
.attrs = taos_prox_attr,
};
#ifdef TMD2771_USER_CALIBRATION
static void tmd2771_prox_boot_cali(void)
{
int hi;
int lo;
int i;
pr_taos(INFO, "prox. auto calibration in progress\n");
prox_calibrate();
hi = taos_cfgp->prox_threshold_hi_def + tmd2771_offset
- taos_cfgp->prox_offset;
lo = taos_cfgp->prox_threshold_lo_def + tmd2771_offset
- taos_cfgp->prox_offset;
pr_taos(INFO, "tmd2771_offset=%d,prox_offset=%d, hi =%d, lo=%d\n",
tmd2771_offset, taos_cfgp->prox_offset, hi, lo);
if (hi > 0xfffe || lo > 0xfffe ||
(tmd2771_offset-taos_cfgp->prox_offset) < 0) {
tmd2771_offset = 0;
pr_taos(ERROR, "tmd2771 boot cali failed\n");
} else {
if (lo > tmd2771_offset) {
taos_cfgp->prox_threshold_hi = hi;
taos_cfgp->prox_threshold_lo = lo;
} else {
for (i = 0; i < 60; i++) {
hi += 2;
lo += 2;
if (lo > tmd2771_offset) {
taos_cfgp->prox_threshold_hi
= hi + 1;
taos_cfgp->prox_threshold_lo
= lo + 1;
break;
}
}
}
}
}
#endif
static int taos_probe(struct i2c_client *clientp,
const struct i2c_device_id *idp)
{
int ret = 0;
int i = 0;
int chip_id;
unsigned char buf[TAOS_MAX_DEVICE_REGS];
char *device_name;
struct tmd2771_platform_data *pdata = NULL;
struct device_node *np;
u32 val = 0;
#ifdef TMD2771_USER_CALIBRATION
tmd2771_offset = 0;
#endif
if (!i2c_check_functionality(clientp->adapter,
I2C_FUNC_SMBUS_BYTE_DATA)) {
pr_taos(ERROR, "i2c smbus byte data functions unsupported\n");
ret = -EOPNOTSUPP;
/*goto err_i2c_check_function; */
}
if (!i2c_check_functionality(clientp->adapter,
I2C_FUNC_SMBUS_WORD_DATA)) {
pr_taos(ERROR, "i2c smbus word data functions unsupported\n");
}
if (!i2c_check_functionality
(clientp->adapter, I2C_FUNC_SMBUS_BLOCK_DATA)) {
pr_taos(ERROR,
"TAOS: taos_probe() - i2c smbus block data functions unsupported\n");
}
for (i = 0; i < I2C_RETRY_COUNTS; i++) {
chip_id = i2c_smbus_read_byte_data(clientp,
(TAOS_TRITON_CMD_REG |
(TAOS_TRITON_CNTRL + 0x12)));
if (chip_id < 0) {
pr_taos(ERROR, "get chip id fail with tries %d\n",
i);
msleep_interruptible(I2C_RETRY_DELAY);
if (i == (I2C_RETRY_COUNTS-1)) {
ret = -ENODEV;
goto err_i2c_check_function;
}
} else {
pr_taos(INFO,
"get chip id sucessfully with tries %d", i);
break;
}
}
taos_datap->client = clientp;
i2c_set_clientdata(clientp, taos_datap);
INIT_WORK(&(taos_datap->work), taos_work_func);
INIT_WORK(&(taos_datap->calib_work), taos_calib_work_func);
mutex_init(&taos_datap->mutex);
mutex_init(&taos_datap->update_lock);
taos_datap->input_dev_als = input_allocate_device();
if (!taos_datap->input_dev_als) {
pr_taos(ERROR, "fail to alloc input device for taos light\n");
ret = -ENOMEM;
goto err_alloc_input_taos_light;
}
taos_datap->input_dev_prox = input_allocate_device();
if (!taos_datap->input_dev_als) {
pr_taos(ERROR, "fail to alloc input device for taos proxim\n");
ret = -ENOMEM;
goto err_alloc_input_taos_prox;
}
taos_datap->input_dev_als->name = TAOS_INPUT_NAME_ALS;
taos_datap->input_dev_als->id.bustype = BUS_I2C;
taos_datap->input_dev_prox->name = TAOS_INPUT_NAME_PROX;
taos_datap->input_dev_prox->id.bustype = BUS_I2C;
set_bit(EV_ABS, taos_datap->input_dev_als->evbit);
set_bit(EV_ABS, taos_datap->input_dev_prox->evbit);
input_set_abs_params(taos_datap->input_dev_als, ABS_MISC, 0,
100000, 0, 0);
input_set_abs_params(taos_datap->input_dev_prox,
ABS_DISTANCE, 0, 1000, 0, 0);
ret = input_register_device(taos_datap->input_dev_als);
if (0 != ret) {
pr_taos(ERROR, "fail to register input for taos als\n");
ret = -ENOMEM;
goto err_register_input_als;
}
ret = input_register_device(taos_datap->input_dev_prox);
if (0 != ret) {
pr_taos(ERROR, "fail to register input for taos prox\n");
ret = -ENOMEM;
goto err_register_input_prox;
}
for (i = 0; i < TAOS_MAX_DEVICE_REGS; i++) {
ret = i2c_smbus_write_byte(clientp, TAOS_TRITON_CMD_REG |
(TAOS_TRITON_CNTRL + i));
if (ret < 0) {
pr_taos(ERROR,
"write control reg failed in taos_probe()\n");
goto err_register_input_prox;
}
buf[i] = i2c_smbus_read_byte(clientp);
}
ret = taos_device_name(buf, &device_name);
if (ret == 0) {
pr_taos(ERROR,
"TAOS: chip id that was read found mismatched by taos_device_name()\n");
ret = -ENODEV;
goto err_register_input_prox;
}
if (strcmp(device_name, TAOS_DEVICE_ID)) {
pr_taos(ERROR,
"TAOS: chip id that was read does not match expected id in taos_probe()\n");
ret = -ENODEV;
goto err_register_input_prox;
}
device_found = 1;
ret = i2c_smbus_write_byte(clientp, TAOS_TRITON_CMD_REG |
TAOS_TRITON_CNTRL);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte() to control reg failed in taos_probe()\n");
ret = -EIO;
goto err_register_input_prox;
}
strlcpy(clientp->name, TAOS_DEVICE_ID, I2C_NAME_SIZE);
strlcpy(taos_datap->taos_name, TAOS_DEVICE_ID, TAOS_ID_NAME_SIZE);
taos_datap->valid = 0;
taos_cfgp = kzalloc(sizeof(struct taos_cfg), GFP_KERNEL);
if (!taos_cfgp) {
pr_taos(ERROR,
"TAOS: kmalloc for struct taos_cfg failed in taos_probe()\n");
ret = -ENOMEM;
goto err_kzalloc_taos_cfgp;
}
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG | 0x00, 0x00);
if (ret < 0) {
pr_taos(ERROR, "TAOS: failed in power down\n");
ret = -EIO;
goto err_write_ctr_reg;
}
if (clientp->dev.platform_data) {
pdata = clientp->dev.platform_data;
if (taos_datap->client->irq)
val = taos_datap->client->irq;
als_ps_int = gpio_to_irq(val);
als_ps_gpio_inr = val;
printk(KERN_ALERT "gpio:%d irq:%d\n",
als_ps_gpio_inr, als_ps_int);
}
else {
if (taos_datap->client->irq)
val = taos_datap->client->irq;
else {
np = taos_datap->client->dev.of_node;
ret = of_property_read_u32(np,
"calibrate_target_param", &val);
if (ret)
goto err_read;
taos_cfgp->calibrate_target = val;
ret = of_property_read_u32(np,
"als_time_param", &val);
if (ret)
goto err_read;
taos_cfgp->als_time = val;
ret = of_property_read_u32(np,
"scale_factor_param", &val);
if (ret)
goto err_read;
taos_cfgp->scale_factor = val;
ret = of_property_read_u32(np,
"gain_trim_param", &val);
if (ret)
goto err_read;
taos_cfgp->gain_trim = val;
ret = of_property_read_u32(np,
"filter_history_param", &val);
if (ret)
goto err_read;
taos_cfgp->filter_history = val;
ret = of_property_read_u32(np,
"filter_count_param", &val);
if (ret)
goto err_read;
taos_cfgp->filter_count = val;
ret = of_property_read_u32(np,
"gain_param", &val);
if (ret)
goto err_read;
taos_cfgp->gain = val;
ret = of_property_read_u32(np,
"prox_threshold_hi_param", &val);
if (ret)
goto err_read;
taos_cfgp->prox_threshold_hi = val;
#ifdef TMD2771_USER_CALIBRATION
taos_cfgp->prox_threshold_hi_def = val;
#endif
ret = of_property_read_u32(np,
"prox_threshold_lo_param", &val);
if (ret)
goto err_read;
taos_cfgp->prox_threshold_lo = val;
#ifdef TMD2771_USER_CALIBRATION
taos_cfgp->prox_threshold_lo_def = val;
#endif
ret = of_property_read_u32(np,
"als_threshold_hi_param", &val);
if (ret)
goto err_read;
taos_cfgp->als_threshold_hi = val;
ret = of_property_read_u32(np,
"als_threshold_lo_param", &val);
if (ret)
goto err_read;
taos_cfgp->als_threshold_lo = val;
ret = of_property_read_u32(np,
"prox_int_time_param", &val);
if (ret)
goto err_read;
taos_cfgp->prox_int_time = val;
ret = of_property_read_u32(np,
"prox_adc_time_param", &val);
if (ret)
goto err_read;
taos_cfgp->prox_adc_time = val;
ret = of_property_read_u32(np,
"prox_wait_time_param", &val);
if (ret)
goto err_read;
taos_cfgp->prox_wait_time = val;
ret = of_property_read_u32(np,
"prox_intr_filter_param", &val);
if (ret)
goto err_read;
taos_cfgp->prox_intr_filter = val;
ret = of_property_read_u32(np,
"prox_config_param", &val);
if (ret)
goto err_read;
taos_cfgp->prox_config = val;
ret = of_property_read_u32(np,
"prox_pulse_cnt_param", &val);
if (ret)
goto err_read;
taos_cfgp->prox_pulse_cnt = val;
ret = of_property_read_u32(np,
"prox_gain_param", &val);
if (ret)
goto err_read;
taos_cfgp->prox_gain = val;
ret = of_property_read_u32(np,
"prox_win_sw", &val);
if (ret)
goto err_read;
taos_cfgp->prox_win_sw = val;
val = of_get_named_gpio(np, "gpio-irq-pin", 0);
if (!gpio_is_valid(val)) {
dev_err(&clientp->dev,
"%s: ERROR Invalid gpio-irq-pin\n",
__func__);
goto err_read;
}
als_ps_int = gpio_to_irq(val);
als_ps_gpio_inr = val;
#ifdef TMD2771_USER_CALIBRATION
ret = of_property_read_u32(np,
"prox_offset_param", &val);
if (ret)
taos_cfgp->prox_offset = 0;
else
taos_cfgp->prox_offset = val;
ret = of_property_read_u32(np,
"prox_boot_cali", &val);
if (ret)
taos_cfgp->prox_boot_cali = 0;
else
taos_cfgp->prox_boot_cali = val;
#endif
}
}
sat_als = (256 - taos_cfgp->prox_int_time) << 10;
sat_prox = (256 - taos_cfgp->prox_adc_time) << 10;
ret = gpio_request(als_ps_gpio_inr, "ALS_PS_INT");
if (ret < 0) {
pr_taos(ERROR, "failed to request GPIO:%d,ERRNO:%d\n",
(int)als_ps_gpio_inr, ret);
goto err_gpio_request;
}
gpio_direction_input(als_ps_gpio_inr);
#ifdef TMD2771_MD_TEST
setup_timer(&tmd2771_wakeup_timer,
tmd2771_timer_func, (unsigned long)taos_datap);
mod_timer(&tmd2771_wakeup_timer,
jiffies+msecs_to_jiffies(100));
#else
ret = request_threaded_irq(als_ps_int, NULL, &taos_irq_handler,
IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
"taos_irq", taos_datap);
if (ret != 0) {
pr_taos(ERROR, "request irq fail for taos\n");
goto err_request_irq;
}
#endif
#ifdef CONFIG_HAS_EARLYSUSPEND
register_early_suspend(&taos_early_suspend_desc);
#endif
ret = sysfs_create_group(&clientp->dev.kobj, &taos_prox_attr_grp);
if (0 != ret) {
pr_taos(ERROR, "sysfs create debug node fail, ret: %d\n", ret);
goto err_create_sys;
}
pr_taos(INFO, "device tmd27713 probe scuccess, chip id: 0x%x\n",
buf[0x12]);
return 0;
err_create_sys:
sysfs_remove_group(&clientp->dev.kobj, &taos_prox_attr_grp);
unregister_early_suspend(&taos_early_suspend_desc);
err_request_irq:
free_irq(als_ps_int, taos_datap);
gpio_free(als_ps_gpio_inr);
err_read:
err_gpio_request:
err_write_ctr_reg:
kfree(taos_cfgp);
taos_cfgp = NULL;
err_kzalloc_taos_cfgp:
input_unregister_device(taos_datap->input_dev_prox);
err_register_input_prox:
input_unregister_device(taos_datap->input_dev_als);
err_register_input_als:
input_free_device(taos_datap->input_dev_prox);
err_alloc_input_taos_prox:
input_free_device(taos_datap->input_dev_als);
err_alloc_input_taos_light:
mutex_destroy(&taos_datap->mutex);
mutex_destroy(&taos_datap->update_lock);
err_i2c_check_function:
return ret;
}
static int taos_remove(struct i2c_client *client)
{
int ret = 0;
sysfs_remove_group(&client->dev.kobj, &taos_prox_attr_grp);
unregister_early_suspend(&taos_early_suspend_desc);
free_irq(als_ps_int, taos_datap);
gpio_free(als_ps_gpio_inr);
kfree(taos_cfgp);
taos_cfgp = NULL;
input_unregister_device(taos_datap->input_dev_prox);
input_unregister_device(taos_datap->input_dev_als);
input_free_device(taos_datap->input_dev_prox);
input_free_device(taos_datap->input_dev_als);
mutex_destroy(&taos_datap->mutex);
mutex_destroy(&taos_datap->update_lock);
return ret;
}
static int taos_open(struct inode *inode, struct file *file)
{
struct taos_data *taos_datap;
int ret = 0;
device_released = 0;
pr_taos(DEBUG, "TAOS:********** taos_open **********\n");
taos_datap = container_of(inode->i_cdev, struct taos_data, cdev);
if (strcmp(taos_datap->taos_name, TAOS_DEVICE_ID) != 0) {
pr_taos(ERROR,
"device name incorrect during taos_open(),get %s\n",
taos_datap->taos_name);
ret = -ENODEV;
}
memset(readdata, 0, sizeof(struct ReadData) * 2);
disable_irq(als_ps_int);
enable_irq(als_ps_int);
return ret;
}
static int taos_release(struct inode *inode, struct file *file)
{
struct taos_data *taos_datap;
int ret = 0;
device_released = 1;
PROX_ON = 0;
prox_history_hi = 0;
prox_history_lo = 0;
taos_datap = container_of(inode->i_cdev, struct taos_data, cdev);
if (strcmp(taos_datap->taos_name, TAOS_DEVICE_ID) != 0) {
pr_taos(ERROR, "TAOS: device name incorrect during get %s\n",
taos_datap->taos_name);
ret = -ENODEV;
}
return ret;
}
static int taos_read(struct file *file, char *buf, size_t count, loff_t *ppos)
{
unsigned long flags;
int realmax;
int err;
if ((!ReadEnable) && (file->f_flags & O_NONBLOCK))
return -EAGAIN;
local_save_flags(flags);
local_irq_disable();
realmax = 0;
if (mutex_trylock(&taos_datap->update_lock) == 0) {
pr_taos(ERROR, "taos_get_data device isbusy\n");
return -ERESTARTSYS;
}
if (ReadEnable > 0) {
if (sizeof(struct ReadData) * 2 < count)
realmax = sizeof(struct ReadData) * 2;
else
realmax = count;
err = copy_to_user(buf, readdata, realmax);
if (err)
return -EAGAIN;
ReadEnable = 0;
}
mutex_unlock(&taos_datap->update_lock);
memset(readdata, 0, sizeof(struct ReadData) * 2);
local_irq_restore(flags);
return realmax;
}
static int taos_write(struct file *file, const char *buf, size_t count,
loff_t *ppos)
{
struct taos_data *taos_datap;
u8 i = 0, xfrd = 0, reg = 0;
u8 my_buf[TAOS_MAX_DEVICE_REGS];
int ret = 0;
if ((*ppos < 0) || (*ppos >= TAOS_MAX_DEVICE_REGS)
|| ((*ppos + count) > TAOS_MAX_DEVICE_REGS)) {
pr_taos(ERROR, "reg limit check failed in taos_write()\n");
return -EINVAL;
}
reg = (u8)*ppos;
ret = copy_from_user(my_buf, buf, count);
if (ret) {
pr_taos(ERROR, "copy_to_user failed in taos_write()\n");
return -ENODATA;
}
taos_datap =
container_of(file->f_dentry->d_inode->i_cdev, struct taos_data,
cdev);
while (xfrd < count) {
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG | reg,
my_buf[i++]);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte_data failed in taos_write()\n");
return ret;
}
reg++;
xfrd++;
}
return (int)xfrd;
}
static loff_t taos_llseek(struct file *file, loff_t offset, int orig)
{
int ret = 0;
loff_t new_pos = 0;
if ((offset >= TAOS_MAX_DEVICE_REGS) || (orig < 0) || (orig > 1)) {
pr_taos(ERROR,
"TAOS: offset param limit or origin limit check failed in taos_llseek()\n");
return -EINVAL;
}
switch (orig) {
case 0:
new_pos = offset;
break;
case 1:
new_pos = file->f_pos + offset;
break;
}
if ((new_pos < 0) || (new_pos >= TAOS_MAX_DEVICE_REGS) || (ret < 0)) {
pr_taos(ERROR,
"TAOS: new offset limit or origin limit check failed in taos_llseek()\n");
return -EINVAL;
}
file->f_pos = new_pos;
return new_pos;
}
static int taos_sensors_als_on(void)
{
int ret = 0, i = 0;
u8 itime = 0, reg_val = 0, reg_cntrl = 0;
for (i = 0; i < TAOS_FILTER_DEPTH; i++)
lux_history[i] = -ENODATA;
ret = i2c_smbus_write_byte(taos_datap->client,
TAOS_TRITON_CMD_REG | TAOS_TRITON_CMD_SPL_FN
| TAOS_TRITON_CMD_ALS_INTCLR);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte failed in ioctl als_on\n");
return ret;
}
itime = (((taos_cfgp->als_time / 50) * 18) - 1);
itime = (~itime);
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_ALS_TIME, itime);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte_data failed in ioctl als_on\n");
return ret;
}
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_INTERRUPT,
taos_cfgp->prox_intr_filter);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte_data failed in ioctl als_on\n");
return ret;
}
ret = i2c_smbus_write_byte(taos_datap->client,
TAOS_TRITON_CMD_REG | TAOS_TRITON_GAIN);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte failed in ioctl als_on\n");
return ret;
}
reg_val = i2c_smbus_read_byte(taos_datap->client);
reg_val = reg_val & 0xFC;
reg_val = reg_val | (taos_cfgp->gain & 0x03);
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_GAIN, reg_val);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte_data failed in ioctl als_on\n");
return ret;
}
reg_cntrl = (TAOS_TRITON_CNTL_ADC_ENBL | TAOS_TRITON_CNTL_PWRON |
TAOS_TRITON_CNTL_ALS_INT_ENBL);
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_CNTRL, reg_cntrl);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte_data failed in ioctl als_on\n");
return ret;
}
taos_als_threshold_set();
pr_taos(DEBUG, " taos_als_threshold_set succesful\n");
return ret;
}
static long taos_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
struct taos_data *taos_datap;
u8 itime;
int prox_sum = 0, prox_mean = 0, prox_max = 0;
int lux_val = 0, ret = 0, i = 0, tmp = 0;
u8 reg_val = 0, reg_cntrl = 0;
int ret_check = 0;
int ret_m = 0;
u8 reg_val_temp = 0;
itime = 0;
taos_datap = container_of(file->f_dentry->d_inode->i_cdev,
struct taos_data, cdev);
mutex_lock(&taos_datap->mutex);
switch (cmd) {
case TAOS_IOCTL_SENSOR_CHECK:
reg_val_temp = 0;
ret = i2c_smbus_write_byte(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_CNTRL);
if (ret < 0) {
pr_taos(ERROR, "TAOS_IOCTL_SENSOR_CHECK failed\n");
goto out;
}
reg_val_temp = i2c_smbus_read_byte(taos_datap->client);
pr_taos(INFO, "TAOS_IOCTL_SENSOR_CHECK,prox_adc_time,%d~\n",
reg_val_temp);
if ((reg_val_temp & 0xFF) == 0xF) {
ret = -ENODATA;
goto out;
}
break;
case TAOS_IOCTL_SENSOR_CONFIG:
ret = copy_from_user(taos_cfgp, (struct taos_cfg *)arg,
sizeof(struct taos_cfg));
if (ret) {
pr_taos(ERROR,
"TAOS: copy_from_user failed in ioctl config_set\n");
ret = -ENODATA;
goto out;
}
break;
case TAOS_IOCTL_SENSOR_ON:
ret = 0;
reg_val = 0;
ret_m = 0;
for (i = 0; i < TAOS_FILTER_DEPTH; i++)
lux_history[i] = -ENODATA;
ret = i2c_smbus_write_byte(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_CMD_SPL_FN |
TAOS_TRITON_CMD_ALS_INTCLR);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte failed in ioctl als_on\n");
goto out;
}
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_ALS_TIME,
taos_cfgp->prox_int_time);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte_data failed in ioctl prox_on\n");
goto out;
}
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_PRX_TIME,
taos_cfgp->prox_adc_time);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte_data failed in ioctl prox_on\n");
goto out;
}
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_WAIT_TIME,
taos_cfgp->prox_wait_time);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte_data failed in ioctl prox_on\n");
goto out;
}
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_INTERRUPT,
taos_cfgp->prox_intr_filter);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte_data failed in ioctl prox_on\n");
goto out;
}
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_PRX_CFG,
taos_cfgp->prox_config);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte_data failed in ioctl prox_on\n");
goto out;
}
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_PRX_COUNT,
taos_cfgp->prox_pulse_cnt);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte_data failed in ioctl prox_on\n");
goto out;
}
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_GAIN,
taos_cfgp->prox_gain);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte_data failed in ioctl prox_on\n");
goto out;
}
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_CNTRL, 0xF);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte_data failed in ioctl prox_on\n");
goto out;
}
break;
case TAOS_IOCTL_SENSOR_OFF:
ret = 0;
reg_val = 0;
ret_check = 0;
ret_m = 0;
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG |
0x00, 0x00);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte_data failed in ioctl prox_off\n");
goto out;
}
break;
case TAOS_IOCTL_ALS_ON:
pr_taos(DEBUG, "ioctl: TAOS_IOCTL_ALS_ON\n");
if (PROX_ON == 1) {
ALS_ON = 1;
goto out;
}
ret = i2c_smbus_write_byte(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_CNTRL);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte failed in ioctl als_calibrate\n");
goto out;
}
reg_val = i2c_smbus_read_byte(taos_datap->client);
if ((reg_val & TAOS_TRITON_CNTL_PROX_DET_ENBL) == 0x0)
taos_sensors_als_on();
ALS_ON = 1;
break;
case TAOS_IOCTL_ALS_OFF:
pr_taos(DEBUG, "ioctl:TAOS_IOCTL_ALS_OFF\n");
if (PROX_ON == 1) {
ALS_ON = 0;
goto out;
}
for (i = 0; i < TAOS_FILTER_DEPTH; i++)
lux_history[i] = -ENODATA;
ret = i2c_smbus_write_byte(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_CNTRL);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte failed in ioctl als_calibrate\n");
goto out;
}
reg_val = i2c_smbus_read_byte(taos_datap->client);
if ((reg_val & TAOS_TRITON_CNTL_PROX_DET_ENBL) == 0x0) {
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_CNTRL,
0x00);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte_data failed in ioctl als_off\n");
goto out;
}
cancel_work_sync(&taos_datap->work);
}
ALS_ON = 0;
break;
case TAOS_IOCTL_ALS_DATA:
ret = i2c_smbus_write_byte(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_CNTRL);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte failed in ioctl als_data\n");
goto out;
}
reg_val = i2c_smbus_read_byte(taos_datap->client);
if ((reg_val &
(TAOS_TRITON_CNTL_ADC_ENBL | TAOS_TRITON_CNTL_PWRON)) !=
(TAOS_TRITON_CNTL_ADC_ENBL | TAOS_TRITON_CNTL_PWRON)) {
ret = -ENODATA;
goto out;
}
ret = i2c_smbus_write_byte(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_STATUS);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: i2c_smbus_write_byte failed in ioctl als_data\n");
goto out;
}
reg_val = i2c_smbus_read_byte(taos_datap->client);
if ((reg_val & TAOS_TRITON_STATUS_ADCVALID) !=
TAOS_TRITON_STATUS_ADCVALID) {
ret = -ENODATA;
goto out;
}
lux_val = taos_get_lux();
if (lux_val < 0)
pr_taos(ERROR,
"TAOS: call to taos_get_lux() returned error %d in ioctl als_data\n",
lux_val);
lux_val = taos_lux_filter(lux_val);
break;
case TAOS_IOCTL_ALS_CALIBRATE:
schedule_work(&taos_datap->calib_work);
break;
case TAOS_IOCTL_CONFIG_GET:
pr_taos(DEBUG, "ioctl: TAOS_IOCTL_CONFIG_GET\n");
#ifdef TMD2771_USER_CALIBRATION
if (taos_cfgp->prox_boot_cali)
tmd2771_prox_boot_cali();
#endif
ret = copy_to_user((struct taos_cfg *)arg, taos_cfgp,
sizeof(struct taos_cfg));
if (ret) {
ret = -ENODATA;
goto out;
}
break;
case TAOS_IOCTL_CONFIG_SET:
ret = copy_from_user(taos_cfgp, (struct taos_cfg *)arg,
sizeof(struct taos_cfg));
if (ret) {
ret = -ENODATA;
goto out;
}
if (taos_cfgp->als_time < 50)
taos_cfgp->als_time = 50;
if (taos_cfgp->als_time > 650)
taos_cfgp->als_time = 650;
tmp = (taos_cfgp->als_time + 25) / 50;
taos_cfgp->als_time = tmp * 50;
sat_als = (256 - taos_cfgp->prox_int_time) << 10;
sat_prox = (256 - taos_cfgp->prox_adc_time) << 10;
break;
case TAOS_IOCTL_PROX_ON:
pr_taos(DEBUG, "ioctl: TAOS_IOCTL_PROX_ON\n");
PROX_ON = 1;
if (isPsensorLocked == 0) {
wake_lock(&taos_datap->taos_wake_lock);
isPsensorLocked = 1;
}
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG | 0x01,
taos_cfgp->prox_int_time);
if (ret < 0)
goto out;
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG | 0x02,
taos_cfgp->prox_adc_time);
if (ret < 0)
goto out;
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG | 0x03,
taos_cfgp->prox_wait_time);
if (ret < 0)
goto out;
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG | 0x0C,
taos_cfgp->prox_intr_filter);
if (ret < 0)
goto out;
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG | 0x0D,
taos_cfgp->prox_config);
if (ret < 0)
goto out;
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG | 0x0E,
taos_cfgp->prox_pulse_cnt);
if (ret < 0)
goto out;
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG | 0x0F,
taos_cfgp->prox_gain);
if (ret < 0)
goto out;
/* enable the irq of als when prox on */
reg_cntrl = TAOS_TRITON_CNTL_PROX_DET_ENBL |
TAOS_TRITON_CNTL_PWRON |
TAOS_TRITON_CNTL_PROX_INT_ENBL |
TAOS_TRITON_CNTL_ADC_ENBL |
TAOS_TRITON_CNTL_WAIT_TMR_ENBL |
TAOS_TRITON_CNTL_ALS_INT_ENBL;
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_CNTRL, reg_cntrl);
if (ret < 0)
goto out;
/* add delay so that the internal oscillator of chip can
be more stable after PON is asserted */
usleep_range(3000, 4000);
input_report_abs(taos_datap->input_dev_prox, ABS_DISTANCE, -1);
input_sync(taos_datap->input_dev_prox);
taos_prox_threshold_set();
break;
case TAOS_IOCTL_PROX_OFF:
pr_taos(DEBUG, "ioctl: TAOS_IOCTL_PROX_OFF\n");
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_CNTRL, 0x00);
if (ret < 0)
goto out;
if (ALS_ON == 1)
taos_sensors_als_on();
else
cancel_work_sync(&taos_datap->work);
PROX_ON = 0;
if (isPsensorLocked == 1) {
wake_unlock(&taos_datap->taos_wake_lock);
isPsensorLocked = 0;
}
break;
case TAOS_IOCTL_PROX_DATA:
ret = taos_prox_poll(prox_cur_infop);
if (ret < 0)
goto out;
ret = copy_to_user((struct taos_prox_info *)arg, prox_cur_infop,
sizeof(struct taos_prox_info));
if (ret) {
ret = -ENODATA;
goto out;
}
break;
case TAOS_IOCTL_PROX_EVENT:
ret = taos_prox_poll(prox_cur_infop);
if (ret >= 0)
ret = prox_cur_infop->prox_event;
goto out;
case TAOS_IOCTL_PROX_CALIBRATE:
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG | 0x01,
taos_cfgp->prox_int_time);
if (ret < 0)
goto out;
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG | 0x02,
taos_cfgp->prox_adc_time);
if (ret < 0)
goto out;
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG | 0x03,
taos_cfgp->prox_wait_time);
if (ret < 0)
goto out;
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG | 0x0D,
taos_cfgp->prox_config);
if (ret < 0)
goto out;
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG | 0x0E,
taos_cfgp->prox_pulse_cnt);
if (ret < 0)
goto out;
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG | 0x0F,
taos_cfgp->prox_gain);
if (ret < 0)
goto out;
reg_cntrl = reg_val | (TAOS_TRITON_CNTL_PROX_DET_ENBL |
TAOS_TRITON_CNTL_PWRON |
TAOS_TRITON_CNTL_ADC_ENBL);
ret = i2c_smbus_write_byte_data(taos_datap->client,
TAOS_TRITON_CMD_REG |
TAOS_TRITON_CNTRL, reg_cntrl);
if (ret < 0)
goto out;
prox_sum = 0;
prox_max = 0;
for (i = 0; i < 32; i++) {
ret = taos_prox_poll(&prox_cal_info[i]);
if (ret < 0)
goto out;
prox_sum += prox_cal_info[i].prox_data;
if (prox_cal_info[i].prox_data > prox_max)
prox_max = prox_cal_info[i].prox_data;
mdelay(100);
}
prox_mean = prox_sum >> 5;
taos_cfgp->prox_threshold_hi =
((((prox_max - prox_mean) * 200) + 50) / 100) + prox_mean;
taos_cfgp->prox_threshold_lo =
((((prox_max - prox_mean) * 170) + 50) / 100) + prox_mean;
pr_taos(DEBUG, "TAOS:----- taos_cfgp->prox_threshold_hi = %d\n",
taos_cfgp->prox_threshold_hi);
pr_taos(DEBUG, "TAOS------ taos_cfgp->prox_threshold_lo = %d\n",
taos_cfgp->prox_threshold_lo);
for (i = 0; i < sizeof(taos_triton_reg_init); i++) {
if (i != 11) {
ret =
i2c_smbus_write_byte_data(
taos_datap->client,
TAOS_TRITON_CMD_REG
|(TAOS_TRITON_CNTRL + i),
taos_triton_reg_init[i]);
if (ret < 0)
goto out;
}
}
break;
default:
ret = -EINVAL;
break;
}
out:
mutex_unlock(&taos_datap->mutex);
return ret;
}
/* read/calculate lux value */
static int taos_get_lux(void)
{
u32 raw_clear = 0, raw_ir = 0, raw_lux = 0;
u32 lux = 0;
u32 ratio = 0;
u8 dev_gain = 0;
struct lux_data *p;
int ret = 0;
u8 chdata[4];
u16 Tint;
int tmp = 0, i = 0;
for (i = 0; i < 4; i++) {
ret = i2c_smbus_write_byte(taos_datap->client,
TAOS_TRITON_CMD_REG |
(TAOS_TRITON_ALS_CHAN0LO + i));
if (ret < 0)
return ret;
chdata[i] = i2c_smbus_read_byte(taos_datap->client);
pr_taos(DEBUG, "ch(%d),data=%d\n", i, chdata[i]);
}
pr_taos(DEBUG, "ch0=%d\n", chdata[0] + chdata[1] * 256);
pr_taos(DEBUG, "ch1=%d\n", chdata[2] + chdata[3] * 256);
tmp = (taos_cfgp->als_time + 25) / 50;
TritonTime.numerator = 1;
TritonTime.denominator = tmp;
tmp = 300 * taos_cfgp->als_time;
if (tmp > 65535)
tmp = 65535;
TritonTime.saturation = tmp;
raw_clear = chdata[1];
raw_clear <<= 8;
raw_clear |= chdata[0];
raw_ir = chdata[3];
raw_ir <<= 8;
raw_ir |= chdata[2];
if (raw_ir > raw_clear) {
raw_lux = raw_ir;
raw_ir = raw_clear;
raw_clear = raw_lux;
}
dev_gain = taos_triton_gain_table[taos_cfgp->gain & 0x3];
if (raw_clear >= lux_timep->saturation)
return TAOS_MAX_LUX;
if (raw_ir >= lux_timep->saturation)
return TAOS_MAX_LUX;
if (raw_clear == 0)
return 0;
if (dev_gain == 0 || dev_gain > 127) {
pr_taos(ERROR, "dev_gain = 0 or > 127 in taos_get_lux()\n");
return -1;
}
if (lux_timep->denominator == 0) {
pr_taos(ERROR, "error: lux_timep->denominator = 0\n");
return -1;
}
raw_clear *= taos_cfgp->scale_factor * 500;
raw_ir *= taos_cfgp->scale_factor * 100;
ratio = (raw_ir << 15) / raw_clear;
for (p = lux_tablep; p->ratio && p->ratio < ratio; p++)
;
if (!p->ratio)
return 0;
Tint = taos_cfgp->als_time;
raw_clear =
((raw_clear * 400 + (dev_gain >> 1)) / dev_gain +
(Tint >> 1)) / Tint;
raw_ir =
((raw_ir * 400 + (dev_gain >> 1)) / dev_gain + (Tint >> 1)) / Tint;
lux = ((raw_clear * (p->clear)) - (raw_ir * (p->ir)));
lux = 4 * (lux + 32000) / 64000;
if (lux > TAOS_MAX_LUX)
lux = TAOS_MAX_LUX;
return lux;
/*
lux = ((raw_clear * (p->clear)) - (raw_ir * (p->ir)));
lux =
((lux +
(lux_timep->denominator >> 1)) / lux_timep->denominator) *
lux_timep->numerator;
lux = (lux + (dev_gain >> 1)) / dev_gain;
lux >>= TAOS_SCALE_MILLILUX;
//printk(KERN_INFO "------taos_get_lux--lux==%d\n", lux);
if (lux > TAOS_MAX_LUX)
lux = TAOS_MAX_LUX;
return (lux) * taos_cfgp->filter_count;
*/
}
static int taos_lux_filter(int lux)
{
static u8 middle[] = { 1, 0, 2, 0, 0, 2, 0, 1 };
int index;
lux_history[2] = lux_history[1];
lux_history[1] = lux_history[0];
lux_history[0] = lux;
if (lux_history[2] < 0) {
if (lux_history[1] > 0)
return lux_history[1];
else
return lux_history[0];
}
index = 0;
if (lux_history[0] > lux_history[1])
index += 4;
if (lux_history[1] > lux_history[2])
index += 2;
if (lux_history[0] > lux_history[2])
index++;
return lux_history[middle[index]];
}
/* verify device */
static int taos_device_name(unsigned char *bufp, char **device_name)
{
if ((bufp[0x12] & 0xff) != 0x29)
return 0;
if (bufp[0x10] | bufp[0x1a] | bufp[0x1b] | bufp[0x1c] | bufp[0x1d] |
bufp[0x1e])
return 0;
if (bufp[0x13] & 0x0c)
return 0;
*device_name = "tmd2771";
return 1;
}
static int taos_prox_poll(struct taos_prox_info *prxp)
{
int i = 0, ret = 0;
u8 chdata[6];
for (i = 0; i < 6; i++) {
chdata[i] =
(i2c_smbus_read_byte_data(taos_datap->client,
(TAOS_TRITON_CMD_REG |
TAOS_TRITON_CMD_AUTO |
(TAOS_TRITON_ALS_CHAN0LO + i))));
}
prxp->prox_clear = chdata[1];
prxp->prox_clear <<= 8;
prxp->prox_clear |= chdata[0];
if (prxp->prox_clear > ((sat_als * 80) / 100))
return -ENODATA;
prxp->prox_data = chdata[5];
prxp->prox_data <<= 8;
prxp->prox_data |= chdata[4];
return ret;
}
static void taos_prox_poll_timer_func(unsigned long param)
{
int ret = 0;
if (!device_released) {
ret = taos_prox_poll(prox_cur_infop);
if (ret < 0) {
pr_taos(ERROR,
"TAOS: call to prox_poll failed in taos_prox_poll_timer_func()\n");
return;
}
taos_prox_poll_timer_start();
}
return;
}
static void taos_prox_poll_timer_start(void)
{
init_timer(&prox_poll_timer);
prox_poll_timer.expires = jiffies + (HZ / 10);
prox_poll_timer.function = taos_prox_poll_timer_func;
add_timer(&prox_poll_timer);
return;
}
MODULE_AUTHOR("John Koshi - Surya Software");
MODULE_DESCRIPTION("TAOS ambient light and proximity sensor driver");
MODULE_LICENSE("GPL");
module_init(taos_init);
module_exit(taos_exit);
| gpl-2.0 |
sandrinr/XCSoar | src/zzip/file.c | 37678 |
/*
* Author:
* Guido Draheim <[email protected]>
* Tomi Ollila <[email protected]>
*
* Copyright (c) Guido Draheim, use under copyleft (LGPL,MPL)
*/
#include <zzip/lib.h> /* exported... */
#include <zzip/file.h>
#include <string.h>
#include <sys/stat.h>
#ifdef ZZIP_DISABLED
#include <errno.h>
#endif /* ZZIP_DISABLED */
#include <stdlib.h>
#include <ctype.h>
#include <zzip/format.h>
#include <zzip/fetch.h>
#include <zzip/zzip32.h>
#include <zzip/__debug.h>
#if 0
# if defined ZZIP_HAVE_IO_H
# include <io.h> /* tell */
# else
# define tell(fd) lseek(fd,0,SEEK_CUR)
# endif
#else
#define tells(fd) seeks(fd,0,SEEK_CUR)
#endif
/** end usage.
* This function is the direct call of => zzip_close(fp). It will cleanup the
* inflate-portion of => zlib and free the structure given.
*
* it is called quite from the error-cleanup parts
* of the various => _open functions.
*
* the .refcount is decreased and if zero the fp->dir is closed just as well.
*/
int
zzip_file_close(ZZIP_FILE * fp)
{
auto int self;
ZZIP_DIR *dir = fp->dir;
if (fp->method)
inflateEnd(&fp->d_stream); /* inflateEnd() can be called many times */
if (dir->cache.locked == NULL)
dir->cache.locked = &self;
if (fp->buf32k)
{
if (dir->cache.locked == &self && dir->cache.buf32k == NULL)
dir->cache.buf32k = fp->buf32k;
else
free(fp->buf32k);
}
if (dir->currentfp == fp)
dir->currentfp = NULL;
dir->refcount--;
/* ease to notice possible dangling reference errors */
memset(fp, 0, sizeof(*fp));
if (dir->cache.locked == &self && dir->cache.fp == NULL)
dir->cache.fp = fp;
else
free(fp);
if (dir->cache.locked == &self)
dir->cache.locked = NULL;
if (! dir->refcount)
return zzip_dir_close(dir);
else
return 0;
}
static int
zzip_file_saveoffset(ZZIP_FILE * fp)
{
if (fp)
{
int fd = fp->dir->fd;
zzip_off_t off = fp->io->fd.seeks(fd, 0, SEEK_CUR);
if (off < 0)
return -1;
fp->offset = off;
}
return 0;
}
/* user-definition */
#ifndef ZZIP_BACKSLASH_DIRSEP
#if defined HAVE_WINDOWS_H || defined ZZIP_HAVE_WINDOWS_H || defined _WIN32
#define ZZIP_BACKSLASH_DIRSEP 1
#elif defined ZZIP_CHECK_BACKSLASH_DIRSEPARATOR
#define ZZIP_BACKSLASH_DIRSEP 1
#else
#define ZZIP_BACKSLASH_DIRSEP 0
#endif
#endif
static zzip_char_t*
strrchr_basename(zzip_char_t* name)
{
register zzip_char_t *n = strrchr(name, '/');
if (n) return n + 1;
return name;
}
static zzip_char_t*
dirsep_basename(zzip_char_t* name)
{
register zzip_char_t *n = strrchr(name, '/');
if (ZZIP_BACKSLASH_DIRSEP)
{
register zzip_char_t *m = strrchr(name, '\\');
if (!n || (m && n < m))
n = m;
}
if (n) return n + 1;
return name;
}
#if defined strcasecmp
#define dirsep_strcasecmp strcasecmp
#else
static int
dirsep_strcasecmp(zzip_char_t * s1, zzip_char_t * s2)
{
/* ASCII tolower - including mapping of backslash in normal slash */
static const char mapping[] = "@abcdefghijklmnopqrstuvwxyz[/]^_";
int c1, c2;
while (*s1 && *s2)
{
c1 = (int) (unsigned char) *s1;
c2 = (int) (unsigned char) *s2;
if ((c1 & 0xE0) == 0x40)
c1 = mapping[c1 & 0x1f];
if ((c2 & 0xE0) == 0x40)
c2 = mapping[c2 & 0x1f];
if (c1 != c2)
return (c1 - c2);
s1++;
s2++;
}
return (((int) (unsigned char) *s1) - ((int) (unsigned char) *s2));
}
#endif
static int zzip_inflate_init(ZZIP_FILE *, struct zzip_dir_hdr *);
/** start usage.
* This function opens an => ZZIP_FILE from an already open => ZZIP_DIR handle.
* Since we have a chance to reuse a cached => buf32k and => ZZIP_FILE memchunk
* this is the best choice to unpack multiple files.
*
* Note: the zlib supports 2..15 bit windowsize, hence we provide a 32k
* memchunk here... just to be safe.
*
* On error it returns null and sets errcode in the ZZIP_DIR.
*/
ZZIP_FILE *
zzip_file_open(ZZIP_DIR * dir, zzip_char_t * name, int o_mode)
{
auto int self;
zzip_error_t err = 0;
struct zzip_file *fp = 0;
struct zzip_dir_hdr *hdr = dir->hdr0;
int (*filename_strcmp) (zzip_char_t *, zzip_char_t *);
zzip_char_t* (*filename_basename)(zzip_char_t*);
filename_strcmp = (o_mode & ZZIP_CASELESS) ? dirsep_strcasecmp : strcmp;
filename_basename = (o_mode & ZZIP_CASELESS) ? dirsep_basename : strrchr_basename;
if (! dir)
return NULL;
if (! dir->fd || dir->fd == -1)
{ /* dir->errcode = EBADF; */ return NULL; }
if (! hdr)
{ /* dir->errcode = ENOENT; */ return NULL; }
if (o_mode & ZZIP_NOPATHS)
name = filename_basename(name);
while (1)
{
register zzip_char_t *hdr_name = hdr->d_name;
if (o_mode & ZZIP_NOPATHS)
hdr_name = filename_basename(hdr_name);
HINT4("name='%s', compr=%d, size=%d\n",
hdr->d_name, hdr->d_compr, hdr->d_usize);
if (! filename_strcmp(hdr_name, name))
{
switch (hdr->d_compr)
{
case 0: /* store */
case 8: /* inflate */
break;
default:
{ /*err = ZZIP_UNSUPP_COMPR; */ goto error; }
}
if (dir->cache.locked == NULL)
dir->cache.locked = &self;
if (dir->cache.locked == &self && dir->cache.fp)
{
fp = dir->cache.fp;
dir->cache.fp = NULL;
/* memset(zfp, 0, sizeof *fp); cleared in zzip_file_close() */
} else
{
if (! (fp = (ZZIP_FILE *) calloc(1, sizeof(*fp))))
{ /* err = ZZIP_OUTOFMEM; */ goto error; }
}
fp->dir = dir;
fp->io = dir->io;
dir->refcount++;
if (dir->cache.locked == &self && dir->cache.buf32k)
{
fp->buf32k = dir->cache.buf32k;
dir->cache.buf32k = NULL;
} else
{
if (! (fp->buf32k = (char *) malloc(ZZIP_32K)))
{ /* err = ZZIP_OUTOFMEM; */ goto error; }
}
if (dir->cache.locked == &self)
dir->cache.locked = NULL;
/*
* In order to support simultaneous open files in one zip archive
* we'll fix the fd offset when opening new file/changing which
* file to read...
*/
if (zzip_file_saveoffset(dir->currentfp) < 0)
{ /* err = ZZIP_DIR_SEEK; */ goto error; }
fp->offset = hdr->d_off;
dir->currentfp = fp;
if (dir->io->fd.seeks(dir->fd, hdr->d_off, SEEK_SET) < 0)
{ /* err = ZZIP_DIR_SEEK; */ goto error; }
{
/* skip local header - should test tons of other info,
* but trust that those are correct */
zzip_ssize_t dataoff;
struct zzip_file_header *p = (void *) fp->buf32k;
dataoff = dir->io->fd.read(dir->fd, (void *) p, sizeof(*p));
if (dataoff < (zzip_ssize_t) sizeof(*p))
{ /* err = ZZIP_DIR_READ; */ goto error; }
if (! zzip_file_header_check_magic(p)) /* PK\3\4 */
{ /* err = ZZIP_CORRUPTED; */ goto error; }
dataoff = zzip_file_header_sizeof_tail(p);
if (dir->io->fd.seeks(dir->fd, dataoff, SEEK_CUR) < 0)
{ /* err = ZZIP_DIR_SEEK; */ goto error; }
fp->dataoffset = dir->io->fd.tells(dir->fd);
fp->usize = hdr->d_usize;
fp->csize = hdr->d_csize;
}
err = zzip_inflate_init(fp, hdr);
if (err)
goto error;
return fp;
} else
{
if (hdr->d_reclen == 0)
break;
hdr = (struct zzip_dir_hdr *) ((char *) hdr + hdr->d_reclen);
} /*filename_strcmp */
} /*forever */
#ifdef ZZIP_DISABLED
dir->errcode = ZZIP_ENOENT;
#endif /* ZZIP_DISABLED */
return NULL;
error:
if (fp)
zzip_file_close(fp);
#ifdef ZZIP_DISABLED
dir->errcode = err;
#endif /* ZZIP_DISABLED */
return NULL;
}
/** internal.
* call => inflateInit and setup fp's iterator variables,
* used by lowlevel => _open functions.
*/
static int
zzip_inflate_init(ZZIP_FILE * fp, struct zzip_dir_hdr *hdr)
{
int err;
fp->method = hdr->d_compr;
fp->restlen = hdr->d_usize;
if (fp->method)
{
memset(&fp->d_stream, 0, sizeof(fp->d_stream));
err = inflateInit2(&fp->d_stream, -MAX_WBITS);
if (err != Z_OK)
goto error;
fp->crestlen = hdr->d_csize;
}
return 0;
error:
if (fp)
zzip_file_close(fp);
return err;
}
/** end usage.
* This function closes the given ZZIP_FILE handle.
*
* If the ZZIP_FILE wraps a normal stat'fd then it is just that int'fd
* that is being closed and the otherwise empty ZZIP_FILE gets freed.
*/
int
zzip_fclose(ZZIP_FILE * fp)
{
if (! fp)
return 0;
if (! fp->dir) /* stat fd */
{ int r = fp->io->fd.close(fp->fd); free(fp); return r; }
else
return zzip_file_close(fp);
}
/** => zzip_fclose
*/
int
zzip_close(ZZIP_FILE * fp)
{
return zzip_fclose(fp);
}
/** read data.
* This function reads data from zip-contained file.
*
* This fuction works like => read(2) and will fill the given buffer with bytes from
* the opened file. It will return the number of bytes read, so if the => EOF
* is encountered you will be prompted with the number of bytes actually read.
*
* This is the routines that needs the => buf32k buffer, and it would have
* need for much more polishing but it does already work quite well.
*
* Note: the 32K buffer is rather big. The original inflate-algorithm
* required just that but the latest zlib would work just fine with
* a smaller buffer.
*/
zzip_ssize_t
zzip_file_read(ZZIP_FILE * fp, void *buf, zzip_size_t len)
{
ZZIP_DIR *dir;
zzip_size_t l;
zzip_ssize_t rv;
if (! fp || ! fp->dir)
return 0;
dir = fp->dir;
l = fp->restlen > len ? len : fp->restlen;
if (fp->restlen == 0)
return 0;
/*
* If this is other handle than previous, save current seek pointer
* and read the file position of `this' handle.
*/
if (dir->currentfp != fp)
{
if (zzip_file_saveoffset(dir->currentfp) < 0
|| fp->io->fd.seeks(dir->fd, fp->offset, SEEK_SET) < 0)
{ /* dir->errcode = ZZIP_DIR_SEEK; */ return -1; }
else
{ dir->currentfp = fp; }
}
/* if more methods is to be supported, change this to `switch ()' */
if (fp->method) /* method != 0 == 8, inflate */
{
fp->d_stream.avail_out = l;
fp->d_stream.next_out = (unsigned char *) buf;
do
{
int err;
zzip_size_t startlen;
if (fp->crestlen > 0 && fp->d_stream.avail_in == 0)
{
zzip_size_t cl = (fp->crestlen < ZZIP_32K ?
fp->crestlen : ZZIP_32K);
/* zzip_size_t cl =
* fp->crestlen > 128 ? 128 : fp->crestlen;
*/
zzip_ssize_t i = fp->io->fd.read(dir->fd, fp->buf32k, cl);
if (i <= 0)
{
#ifdef ZZIP_DISABLED
dir->errcode = ZZIP_DIR_READ;
/* or ZZIP_DIR_READ_EOF ? */
#endif /* ZZIP_DISABLED */
return -1;
}
fp->crestlen -= i;
fp->d_stream.avail_in = i;
fp->d_stream.next_in = (unsigned char *) fp->buf32k;
}
startlen = fp->d_stream.total_out;
err = inflate(&fp->d_stream, Z_NO_FLUSH);
if (err == Z_STREAM_END)
{ fp->restlen = 0; }
else if (err == Z_OK)
{ fp->restlen -= (fp->d_stream.total_out - startlen); }
else
{ /* dir->errcode = err; */ return -1; }
}
while (fp->restlen && fp->d_stream.avail_out);
return l - fp->d_stream.avail_out;
} else
{ /* method == 0 -- unstore */
rv = fp->io->fd.read(dir->fd, buf, l);
if (rv > 0)
{ fp->restlen-= rv; }
#ifdef ZZIP_DISABLED
else if (rv < 0)
{ dir->errcode = ZZIP_DIR_READ; }
#endif /* ZZIP_DISABLED */
return rv;
}
}
/** read data.
* This function will read(2) data from a real/zipped file.
*
* This function is the replacement for => read(2) will fill the given buffer with
* bytes from the opened file. It will return the number of bytes read, so if the EOF
* is encountered you will be prompted with the number of bytes actually read.
*
* If the file-handle is wrapping a stat'able file then it will actually just
* perform a normal => read(2)-call, otherwise => zzip_file_read is called
* to decompress the data stream and any error is mapped to => errno(3).
*/
zzip_ssize_t
zzip_read(ZZIP_FILE * fp, void *buf, zzip_size_t len)
{
if (! fp)
return 0;
if (! fp->dir)
{ return fp->io->fd.read(fp->fd, buf, len); } /* stat fd */
else
{
register zzip_ssize_t v;
v = zzip_file_read(fp, buf, len);
#ifdef ZZIP_DISABLED
if (v == -1)
{ errno = zzip_errno(fp->dir->errcode); }
#endif /* ZZIP_DISABLED */
return v;
}
}
static zzip_size_t
zzip_pread_fallback(ZZIP_FILE *file, void *ptr, zzip_size_t size,
zzip_off_t offset)
{
zzip_off_t new_offset = zzip_seek(file, offset, SEEK_SET);
if (new_offset < 0)
return -1;
return zzip_read(file, ptr, size);
}
#ifdef __linux__
#define ZZIP_HAVE_PREAD
#endif
zzip_size_t
zzip_pread(ZZIP_FILE *file, void *ptr, zzip_size_t size, zzip_off_t offset)
{
#ifdef ZZIP_HAVE_PREAD
if (file->dir == NULL) {
/* reading from a regular file */
return pread(file->fd, ptr, size, offset);
} else if (file->method == 0) {
/* uncompressed: can read directly from the ZIP file using
pread() */
offset += file->dataoffset;
return pread(file->dir->fd, ptr, size, offset);
} else {
#endif
/* compressed (or no pread() system call): fall back to
zzip_seek() + zzip_read() */
return zzip_pread_fallback(file, ptr, size, offset);
#ifdef ZZIP_HAVE_PREAD
}
#endif
}
/** => zzip_read
*/
zzip_size_t
zzip_fread(void *ptr, zzip_size_t size, zzip_size_t nmemb, ZZIP_FILE * file)
{
if (! size)
size = 1;
return zzip_read(file, ptr, size * nmemb) / size;
}
#define ZZIP_WRONLY O_WRONLY
#define ZZIP_EXCL O_EXCL
#if defined O_SYNC
#define ZZIP_SYNC O_SYNC
#else
#define ZZIP_SYNC 0
#endif
#if defined O_NONBLOCK
#define ZZIP_NONBLOCK O_NONBLOCK
#elif defined O_NDELAY
#define ZZIP_NOCTTY O_NDELAY
#else
#define ZZIP_NOCTTY 0
#endif
/* ------------------------------------------------------------------- */
/** start usage. also: fopen(2)
* This function will => fopen(3) a real/zipped file.
*
* It has some magic functionality builtin - it will first try to open
* the given <em>filename</em> as a normal file. If it does not
* exist, the given path to the filename (if any) is split into
* its directory-part and the file-part. A ".zip" extension is
* then added to the directory-part to create the name of a
* zip-archive. That zip-archive (if it exists) is being searched
* for the file-part, and if found a zzip-handle is returned.
*
* Note that if the file is found in the normal fs-directory the
* returned structure is mostly empty and the => zzip_read call will
* use the libc => read(2) to obtain data. Otherwise a => zzip_file_open
* is performed and any error mapped to => errno(3).
*
* unlike the posix-wrapper => zzip_open the mode-argument is
* a string which allows for more freedom to support the extra
* zzip modes called ZZIP_CASEINSENSITIVE and ZZIP_IGNOREPATH.
* Currently, this => zzip_fopen call will convert the following
* characters in the mode-string into their corrsponding mode-bits:
* * <code> "r" : O_RDONLY : </code> read-only
* * <code> "b" : O_BINARY : </code> binary (win32 specific)
* * <code> "f" : O_NOCTTY : </code> no char device (unix)
* * <code> "i" : ZZIP_CASELESS : </code> inside zip file
* * <code> "*" : ZZIP_NOPATHS : </code> inside zip file only
* all other modes will be ignored for zip-contained entries
* but they are transferred for compatibility and portability,
* including these extra sugar bits:
* * <code> "x" : O_EXCL :</code> fail if file did exist
* * <code> "s" : O_SYNC :</code> synchronized access
* * <code> "n" : O_NONBLOCK :</code> nonblocking access
* * <code> "z#" : compression level :</code> for zlib
* * <code> "g#" : group access :</code> unix access bits
* * <code> "u#" : owner access :</code> unix access bits
* * <code> "o#" : world access :</code> unix access bits
* ... the access bits are in traditional unix bit format
* with 7 = read/write/execute, 6 = read/write, 4 = read-only.
*
* The default access mode is 0664, and the compression level
* is ignored since the lib can not yet write zip files, otherwise
* it would be the initialisation value for the zlib deflateInit
* where 0 = no-compression, 1 = best-speed, 9 = best-compression.
*
* This function returns a new zzip-handle (use => zzip_close to return
* it). On error this function will return null setting => errno(3).
*/
ZZIP_FILE *
zzip_fopen(zzip_char_t * filename, zzip_char_t * mode)
{
return zzip_freopen(filename, mode, 0);
}
/** => zzip_fopen
*
* This function receives an additional argument pointing to
* a ZZIP_FILE* being already in use. If this extra argument is
* null then this function is identical with calling => zzip_fopen
*
* Per default, the old file stream is closed and only the internal
* structures associated with it are kept. These internal structures
* may be reused for the return value, and this is a lot quicker when
* the filename matches a zipped file that is incidentally in the very
* same zip arch as the old filename wrapped in the stream struct.
*
* That's simply because the zip arch's central directory does not
* need to be read again. As an extension for this function, if the
* mode-string contains a "q" then the old stream is not closed but
* left untouched, instead it is only given as a hint that a new
* file handle may share/copy the zip arch structures of the old file
* handle if that is possible, i.e when they are in the same zip arch.
*
* This function returns a new zzip-handle (use => zzip_close to return
* it). On error this function will return null setting => errno(3).
*/
ZZIP_FILE *
zzip_freopen(zzip_char_t * filename, zzip_char_t * mode, ZZIP_FILE * stream)
{
int o_flags = 0;
int o_modes = 0664;
if (! mode)
mode = "rb";
# ifndef O_BINARY
# define O_BINARY 0
# endif
# ifndef O_NOCTTY
# define O_NOCTTY 0
# endif
# ifndef O_SYNC
# define O_SYNC 0
# endif
# ifndef O_NONBLOCK
# define O_NONBLOCK 0
# endif
for (; *mode; mode++)
{
switch (*mode)
{
/* *INDENT-OFF* */
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
continue; /* ignore if not attached to other info */
case 'r': o_flags |= mode[1] == '+' ? O_RDWR : O_RDONLY; break;
case 'w': o_flags |= mode[1] == '+' ? O_RDWR : O_WRONLY;
o_flags |= O_TRUNC; break;
case 'b': o_flags |= O_BINARY; break;
case 'f': o_flags |= O_NOCTTY; break;
case 'i': o_modes |= ZZIP_CASELESS; break;
case '*': o_modes |= ZZIP_NOPATHS; break;
case 'x': o_flags |= O_EXCL; break;
case 's': o_flags |= O_SYNC; break;
case 'n': o_flags |= O_NONBLOCK; break;
case 'o': o_modes &=~ 07;
o_modes |= ((mode[1] - '0')) & 07; continue;
case 'g': o_modes &=~ 070;
o_modes |= ((mode[1] - '0') << 3) & 070; continue;
case 'u': o_modes &=~ 0700;
o_modes |= ((mode[1] - '0') << 6) & 0700; continue;
case 'q': o_modes |= ZZIP_FACTORY; break;
case 'z': /* compression level */
continue; /* currently ignored, just for write mode */
/* *INDENT-ON* */
}
}
{
ZZIP_FILE *fp =
zzip_open_shared_io(stream, filename, o_flags, o_modes, 0, 0);
if (! (o_modes & ZZIP_FACTORY) && stream)
zzip_file_close(stream);
return fp;
}
}
/** start usage.
* This function will => open(2) a real/zipped file
*
* It has some magic functionality builtin - it will first try to open
* the given <em>filename</em> as a normal file. If it does not
* exist, the given path to the filename (if any) is split into
* its directory-part and the file-part. A ".zip" extension is
* then added to the directory-part to create the name of a
* zip-archive. That zip-archive (if it exists) is being searched
* for the file-part, and if found a zzip-handle is returned.
*
* Note that if the file is found in the normal fs-directory the
* returned structure is mostly empty and the => zzip_read call will
* use the libc => read(2) to obtain data. Otherwise a => zzip_file_open
* is performed and any error mapped to => errno(3).
*
* There was a possibility to transfer zziplib-specific openmodes
* through o_flags but you should please not use them anymore and
* look into => zzip_open_ext_io to submit them down. This function
* is shallow in that it just extracts the zzipflags and calls
* * <code>zzip_open_ext_io(filename, o_flags, zzipflags|0664, 0, 0) </code>
* you must stop using this extra functionality (not well known anyway)
* since zzip_open might be later usable to open files for writing
* in which case the _EXTRAFLAGS will get in conflict.
*
* compare with => open(2) and => zzip_fopen
*/
ZZIP_FILE *
zzip_open(zzip_char_t * filename, int o_flags)
{
/* backward compatibility */
int o_modes = 0664;
if (o_flags & ZZIP_CASEINSENSITIVE)
{ o_flags ^= ZZIP_CASEINSENSITIVE; o_modes |= ZZIP_CASELESS; }
if (o_flags & ZZIP_IGNOREPATH)
{ o_flags ^= ZZIP_IGNOREPATH; o_modes |= ZZIP_NOPATHS; }
return zzip_open_ext_io(filename, o_flags, o_modes, 0, 0);
}
/* ZZIP_ONLYZIP won't work on platforms with sizeof(int) == 16bit */
#if ZZIP_SIZEOF_INT+0 == 2
#undef ZZIP_ONLYZIP
#endif
/** => zzip_open
*
* This function uses explicit ext and io instead of the internal
* defaults, setting them to zero is equivalent to => zzip_open
*
* note that the two flag types have been split into an o_flags
* (for fcntl-like openflags) and o_modes where the latter shall
* carry the zzip_flags and possibly accessmodes for unix filesystems.
* Since this version of zziplib can not write zipfiles, it is not
* yet used for anything else than zzip-specific modeflags.
*
* This function returns a new zzip-handle (use => zzip_close to return
* it). On error this function will return null setting => errno(3).
*
* If any ext_io handlers were used then the referenced structure
* should be static as the allocated ZZIP_FILE does not copy them.
*/
ZZIP_FILE *
zzip_open_ext_io(zzip_char_t * filename, int o_flags, int o_modes,
zzip_strings_t * ext, zzip_plugin_io_t io)
{
return zzip_open_shared_io(0, filename, o_flags, o_modes, ext, io);
}
/** => zzip_open
*
* This function takes an extra stream argument - if a handle has been
* then ext/io can be left null and the new stream handle will pick up
* the ext/io. This should be used only in specific environment however
* since => zzip_file_real does not store any ext-sequence.
*
* The benefit for this function comes in when the old file handle
* was openened from a file within a zip archive. When the new file
* is in the same zip archive then the internal zzip_dir structures
* will be shared. It is even quicker, as no check needs to be done
* anymore trying to guess the zip archive place in the filesystem,
* here we just check whether the zip archive's filepath is a prefix
* part of the filename to be opened.
*
* Note that this function is also used by => zzip_freopen that
* will unshare the old handle, thereby possibly closing the handle.
*
* This function returns a new zzip-handle (use => zzip_close to return
* it). On error this function will return null setting => errno(3).
*/
ZZIP_FILE *
zzip_open_shared_io(ZZIP_FILE * stream,
zzip_char_t * filename, int o_flags, int o_modes,
zzip_strings_t * ext, zzip_plugin_io_t io)
{
if (stream && stream->dir)
{
if (! ext)
ext = stream->dir->fileext;
if (! io)
io = stream->dir->io;
}
if (! io)
io = zzip_get_default_io();
if (o_modes & (ZZIP_PREFERZIP | ZZIP_ONLYZIP))
goto try_zzip;
try_real:
/* prefer an existing real file */
{
zzip_plugin_io_t os = (o_modes & ZZIP_ALLOWREAL)
? zzip_get_default_io() : io;
int fd = (os->fd.open)(filename, o_flags); /* io->fd.open */
if (fd != -1)
{
ZZIP_FILE *fp = calloc(1, sizeof(ZZIP_FILE));
if (! fp)
{ os->fd.close(fd); return 0; } /* io->fd.close */
fp->fd = fd;
fp->io = os;
return fp;
}
if (o_modes & ZZIP_PREFERZIP)
return 0;
}
try_zzip:
/* if the user had it in place of a normal xopen, then
* we better defend this lib against illegal usage */
if (o_flags & (O_CREAT | O_WRONLY))
{ /* errno = EINVAL; */ return 0; }
if (o_flags & (O_RDWR))
{ o_flags ^= O_RDWR; o_flags |= O_RDONLY; }
/* this is just for backward compatibility -and strictly needed to
* prepare ourselves for more options and more options later on... */
/*# if (o_modes & ZZIP_CASELESS) { o_flags |= ZZIP_CASEINSENSITIVE; } */
/*# if (o_modes & ZZIP_NOPATHS) { o_flags |= ZZIP_IGNOREPATH; } */
/* see if we can open a file that is a zip file */
{
char basename[PATH_MAX];
char *p;
int filename_len = strlen(filename);
if (filename_len >= PATH_MAX)
{ /* errno = ENAMETOOLONG; */ return 0; }
memcpy(basename, filename, filename_len + 1);
/* see if we can share the same zip directory */
if (stream && stream->dir && stream->dir->realname)
{
zzip_size_t len = strlen(stream->dir->realname);
if (! memcmp(filename, stream->dir->realname, len) &&
filename[len] == '/' && filename[len + 1])
{
ZZIP_FILE *fp =
zzip_file_open(stream->dir, filename + len + 1, o_modes);
#ifdef ZZIP_DISABLED
if (! fp)
{ errno = zzip_errno (stream->dir->errcode); }
#endif /* ZZIP_DISABLED */
return fp;
}
}
/* per each slash in filename, check if it there is a zzip around */
while ((p = strrchr(basename, '/')))
{
zzip_error_t e = 0;
ZZIP_DIR *dir;
ZZIP_FILE *fp;
int fd;
*p = '\0';
/* i.e. cut at path separator == possible zipfile basename */
fd = __zzip_try_open(basename, o_flags | O_RDONLY | O_BINARY,
ext, io);
if (fd == -1)
{ continue; }
/* found zip-file .... now try to parse it */
dir = zzip_dir_fdopen_ext_io(fd, &e, ext, io);
if (e)
{ /* errno = zzip_errno(e); */ io->fd.close(fd); return 0; }
/* (p - basename) is the lenghtof zzip_dir part of the filename */
fp = zzip_file_open(dir, filename + (p - basename) + 1, o_modes);
if (! fp)
{ /* errno = zzip_errno(dir->errcode); */ }
else
{ if (! dir->realname) dir->realname = strdup (basename); }
zzip_dir_close(dir);
/* note: since (fp) is attached that (dir) will survive */
/* but (dir) is implicitly closed on next zzip_close(fp) */
return fp;
}
if (o_modes & ZZIP_PREFERZIP)
goto try_real;
else
{ /* errno = ENOENT; */ return 0; }
}
}
#if defined ZZIP_LARGEFILE_RENAME && defined EOVERFLOW && defined PIC
/* DLL compatibility layer - so that 32bit code can link with this lib too */
#undef zzip_open_shared_io /* zzip_open_shared_io64 */
#undef zzip_open_ext_io /* zzip_open_ext_io64 */
#undef zzip_opendir_ext_io /* zzip_opendir_ext_io64 */
ZZIP_FILE *zzip_open_shared_io(ZZIP_FILE * stream,
zzip_char_t * name, int o_flags,
int o_modes, zzip_strings_t * ext,
zzip_plugin_io_t io);
ZZIP_FILE *zzip_open_ext_io(zzip_char_t * name, int o_flags,
int o_modes, zzip_strings_t * ext,
zzip_plugin_io_t io);
ZZIP_DIR *zzip_opendir_ext_io(zzip_char_t * name, int o_modes,
zzip_strings_t * ext, zzip_plugin_io_t io);
ZZIP_FILE *
zzip_open_shared_io(ZZIP_FILE * stream,
zzip_char_t * name, int o_flags,
int o_modes, zzip_strings_t * ext, zzip_plugin_io_t io)
{
if (! io)
return zzip_open_shared_io64(stream, name, o_flags, o_modes, ext, io);
errno = EOVERFLOW;
return NULL;
}
ZZIP_FILE *
zzip_open_ext_io(zzip_char_t * name, int o_flags, int o_modes,
zzip_strings_t * ext, zzip_plugin_io_t io)
{
if (! io)
return zzip_open_ext_io64(name, o_flags, o_modes, ext, io);
errno = EOVERFLOW;
return NULL;
}
ZZIP_DIR *
zzip_opendir_ext_io(zzip_char_t * name, int o_modes,
zzip_strings_t * ext, zzip_plugin_io_t io)
{
if (! io)
return zzip_opendir_ext_io64(name, o_modes, ext, io);
else
{ errno = EOVERFLOW; return NULL; }
}
#endif /* ZZIP_LARGEFILE_RENAME && EOVERFLOW && PIC */
/* ------------------------------------------------------------------- */
/** rewind.
*
* This function will rewind a real/zipped file.
*
* It seeks to the beginning of this file's data in the zip,
* or the beginning of the file for a stat'fd.
*/
int
zzip_rewind(ZZIP_FILE * fp)
{
ZZIP_DIR *dir;
int err;
if (! fp)
return -1;
if (! fp->dir)
{ /* stat fd */
fp->io->fd.seeks(fp->fd, 0, SEEK_SET);
return 0;
}
dir = fp->dir;
/*
* If this is other handle than previous, save current seek pointer
*/
if (dir->currentfp != fp)
{
if (zzip_file_saveoffset(dir->currentfp) < 0)
{ /* dir->errcode = ZZIP_DIR_SEEK; */ return -1; }
else
{ dir->currentfp = fp; }
}
/* seek to beginning of this file */
if (fp->io->fd.seeks(dir->fd, fp->dataoffset, SEEK_SET) < 0)
return -1;
/* reset the inflate init stuff */
fp->restlen = fp->usize;
fp->offset = fp->dataoffset;
if (fp->method)
{ /* method == 8, deflate */
err = inflateReset(&fp->d_stream);
if (err != Z_OK)
goto error;
/* start over at next inflate with a fresh read() */
fp->d_stream.avail_in = 0;
fp->crestlen = fp->csize;
}
return 0;
error:
if (fp)
zzip_file_close(fp);
return err;
}
/** seek.
*
* This function will perform a => lseek(2) operation on a real/zipped file
*
* It will try to seek to the offset specified by offset, relative to whence,
* which is one of SEEK_SET, SEEK_CUR or SEEK_END.
*
* If the file-handle is wrapping a stat'able file then it will actually just
* perform a normal => lseek(2)-call. Otherwise the relative offset
* is calculated, negative offsets are transformed into positive ones
* by rewinding the file, and then data is read until the offset is
* reached. This can make the function terribly slow, but this is
* how gzio implements it, so I'm not sure there is a better way
* without using the internals of the algorithm.
*/
zzip_off_t
zzip_seek(ZZIP_FILE * fp, zzip_off_t offset, int whence)
{
zzip_off_t cur_pos, rel_ofs, read_size, ofs;
ZZIP_DIR *dir;
if (! fp)
return -1;
if (! fp->dir)
{ /* stat fd */
return fp->io->fd.seeks(fp->fd, offset, whence);
}
cur_pos = zzip_tell(fp);
/* calculate relative offset */
switch (whence)
{
case SEEK_SET: /* from beginning */
rel_ofs = offset - cur_pos;
break;
case SEEK_CUR: /* from current */
rel_ofs = offset;
break;
case SEEK_END: /* from end */
rel_ofs = fp->usize + offset - cur_pos;
break;
default: /* something wrong */
return -1;
}
if (rel_ofs == 0)
return cur_pos; /* don't have to move */
if (rel_ofs < 0)
{ /* convert backward into forward */
if (zzip_rewind(fp) == -1)
return -1;
read_size = cur_pos + rel_ofs;
cur_pos = 0;
} else
{ /* amount to read is positive relative offset */
read_size = rel_ofs;
}
if (read_size < 0) /* bad offset, before beginning of file */
return -1;
if (read_size + cur_pos > (zzip_off_t) fp->usize) /* bad offset, past EOF */
return -1;
if (read_size == 0) /* nothing to read */
return cur_pos;
dir = fp->dir;
/*
* If this is other handle than previous, save current seek pointer
* and read the file position of `this' handle.
*/
if (dir->currentfp != fp)
{
if (zzip_file_saveoffset(dir->currentfp) < 0
|| fp->io->fd.seeks(dir->fd, fp->offset, SEEK_SET) < 0)
{ /* dir->errcode = ZZIP_DIR_SEEK; */ return -1; }
else
{ dir->currentfp = fp; }
}
if (fp->method == 0)
{ /* unstore, just lseek relatively */
ofs = fp->io->fd.seeks(dir->fd, read_size, SEEK_CUR);
if (ofs > 0)
{ /* readjust from beginning of file */
ofs -= fp->dataoffset;
fp->restlen = fp->usize - ofs;
}
return ofs;
} else
{ /* method == 8, inflate */
char *buf;
/*FIXME: use a static buffer! */
buf = (char *) malloc(ZZIP_32K);
if (! buf)
return -1;
while (read_size > 0)
{
zzip_off_t size = ZZIP_32K;
if (read_size < size /*32K */ )
size = read_size;
size = zzip_file_read(fp, buf, (zzip_size_t) size);
if (size <= 0)
{ free(buf); return -1; }
read_size -= size;
}
free(buf);
}
return zzip_tell(fp);
}
/** tell.
*
* This function will => tell(2) the current position in a real/zipped file
*
* It will return the current offset within the real/zipped file,
* measured in uncompressed bytes for the zipped-file case.
*
* If the file-handle is wrapping a stat'able file then it will actually just
* perform a normal => tell(2)-call, otherwise the offset is
* calculated from the amount of data left and the total uncompressed
* size;
*/
zzip_off_t
zzip_tell(ZZIP_FILE * fp)
{
if (! fp)
return -1;
if (! fp->dir) /* stat fd */
return fp->io->fd.tells(fp->fd);
/* current uncompressed offset is uncompressed size - data left */
return (fp->usize - fp->restlen);
}
#ifndef EOVERFLOW
#define EOVERFLOW EFBIG
#endif
/** => zzip_tell
* This function is provided for users who can not use any largefile-mode.
*/
long
zzip_tell32(ZZIP_FILE * fp)
{
if (sizeof(zzip_off_t) == sizeof(long))
{
return zzip_tell(fp);
} else
{
off_t off = zzip_tell(fp);
if (off >= 0) {
register long off32 = off;
if (off32 == off) return off32;
#ifdef ZZIP_DISABLED
errno = EOVERFLOW;
#endif /* ZZIP_DISABLED */
}
return -1;
}
}
/** => zzip_seek
* This function is provided for users who can not use any largefile-mode.
*/
long
zzip_seek32(ZZIP_FILE * fp, long offset, int whence)
{
if (sizeof(zzip_off_t) == sizeof(long))
{
return zzip_seek(fp, offset, whence);
} else
{
off_t off = zzip_seek(fp, offset, whence);
if (off >= 0) {
register long off32 = off;
if (off32 == off) return off32;
#ifdef ZZIP_DISABLED
errno = EOVERFLOW;
#endif /* ZZIP_DISABLED */
}
return -1;
}
}
/*
* Local variables:
* c-file-style: "stroustrup"
* End:
*/
| gpl-2.0 |
dwander/linaro-base | arch/x86/kernel/process_64.c | 14353 | /*
* Copyright (C) 1995 Linus Torvalds
*
* Pentium III FXSR, SSE support
* Gareth Hughes <[email protected]>, May 2000
*
* X86-64 port
* Andi Kleen.
*
* CPU hotplug support - [email protected]
*/
/*
* This file handles the architecture-dependent parts of process handling..
*/
#include <linux/cpu.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/fs.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/elfcore.h>
#include <linux/smp.h>
#include <linux/slab.h>
#include <linux/user.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/ptrace.h>
#include <linux/notifier.h>
#include <linux/kprobes.h>
#include <linux/kdebug.h>
#include <linux/prctl.h>
#include <linux/uaccess.h>
#include <linux/io.h>
#include <linux/ftrace.h>
#include <asm/pgtable.h>
#include <asm/processor.h>
#include <asm/i387.h>
#include <asm/fpu-internal.h>
#include <asm/mmu_context.h>
#include <asm/prctl.h>
#include <asm/desc.h>
#include <asm/proto.h>
#include <asm/ia32.h>
#include <asm/idle.h>
#include <asm/syscalls.h>
#include <asm/debugreg.h>
#include <asm/switch_to.h>
asmlinkage extern void ret_from_fork(void);
DEFINE_PER_CPU(unsigned long, old_rsp);
/* Prints also some state that isn't saved in the pt_regs */
void __show_regs(struct pt_regs *regs, int all)
{
unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L, fs, gs, shadowgs;
unsigned long d0, d1, d2, d3, d6, d7;
unsigned int fsindex, gsindex;
unsigned int ds, cs, es;
printk(KERN_DEFAULT "RIP: %04lx:[<%016lx>] ", regs->cs & 0xffff, regs->ip);
printk_address(regs->ip, 1);
printk(KERN_DEFAULT "RSP: %04lx:%016lx EFLAGS: %08lx\n", regs->ss,
regs->sp, regs->flags);
printk(KERN_DEFAULT "RAX: %016lx RBX: %016lx RCX: %016lx\n",
regs->ax, regs->bx, regs->cx);
printk(KERN_DEFAULT "RDX: %016lx RSI: %016lx RDI: %016lx\n",
regs->dx, regs->si, regs->di);
printk(KERN_DEFAULT "RBP: %016lx R08: %016lx R09: %016lx\n",
regs->bp, regs->r8, regs->r9);
printk(KERN_DEFAULT "R10: %016lx R11: %016lx R12: %016lx\n",
regs->r10, regs->r11, regs->r12);
printk(KERN_DEFAULT "R13: %016lx R14: %016lx R15: %016lx\n",
regs->r13, regs->r14, regs->r15);
asm("movl %%ds,%0" : "=r" (ds));
asm("movl %%cs,%0" : "=r" (cs));
asm("movl %%es,%0" : "=r" (es));
asm("movl %%fs,%0" : "=r" (fsindex));
asm("movl %%gs,%0" : "=r" (gsindex));
rdmsrl(MSR_FS_BASE, fs);
rdmsrl(MSR_GS_BASE, gs);
rdmsrl(MSR_KERNEL_GS_BASE, shadowgs);
if (!all)
return;
cr0 = read_cr0();
cr2 = read_cr2();
cr3 = read_cr3();
cr4 = read_cr4();
printk(KERN_DEFAULT "FS: %016lx(%04x) GS:%016lx(%04x) knlGS:%016lx\n",
fs, fsindex, gs, gsindex, shadowgs);
printk(KERN_DEFAULT "CS: %04x DS: %04x ES: %04x CR0: %016lx\n", cs, ds,
es, cr0);
printk(KERN_DEFAULT "CR2: %016lx CR3: %016lx CR4: %016lx\n", cr2, cr3,
cr4);
get_debugreg(d0, 0);
get_debugreg(d1, 1);
get_debugreg(d2, 2);
printk(KERN_DEFAULT "DR0: %016lx DR1: %016lx DR2: %016lx\n", d0, d1, d2);
get_debugreg(d3, 3);
get_debugreg(d6, 6);
get_debugreg(d7, 7);
printk(KERN_DEFAULT "DR3: %016lx DR6: %016lx DR7: %016lx\n", d3, d6, d7);
}
void release_thread(struct task_struct *dead_task)
{
if (dead_task->mm) {
if (dead_task->mm->context.size) {
pr_warn("WARNING: dead process %s still has LDT? <%p/%d>\n",
dead_task->comm,
dead_task->mm->context.ldt,
dead_task->mm->context.size);
BUG();
}
}
}
static inline void set_32bit_tls(struct task_struct *t, int tls, u32 addr)
{
struct user_desc ud = {
.base_addr = addr,
.limit = 0xfffff,
.seg_32bit = 1,
.limit_in_pages = 1,
.useable = 1,
};
struct desc_struct *desc = t->thread.tls_array;
desc += tls;
fill_ldt(desc, &ud);
}
static inline u32 read_32bit_tls(struct task_struct *t, int tls)
{
return get_desc_base(&t->thread.tls_array[tls]);
}
int copy_thread(unsigned long clone_flags, unsigned long sp,
unsigned long arg, struct task_struct *p)
{
int err;
struct pt_regs *childregs;
struct task_struct *me = current;
p->thread.sp0 = (unsigned long)task_stack_page(p) + THREAD_SIZE;
childregs = task_pt_regs(p);
p->thread.sp = (unsigned long) childregs;
p->thread.usersp = me->thread.usersp;
set_tsk_thread_flag(p, TIF_FORK);
p->fpu_counter = 0;
p->thread.io_bitmap_ptr = NULL;
savesegment(gs, p->thread.gsindex);
p->thread.gs = p->thread.gsindex ? 0 : me->thread.gs;
savesegment(fs, p->thread.fsindex);
p->thread.fs = p->thread.fsindex ? 0 : me->thread.fs;
savesegment(es, p->thread.es);
savesegment(ds, p->thread.ds);
memset(p->thread.ptrace_bps, 0, sizeof(p->thread.ptrace_bps));
if (unlikely(p->flags & PF_KTHREAD)) {
/* kernel thread */
memset(childregs, 0, sizeof(struct pt_regs));
childregs->sp = (unsigned long)childregs;
childregs->ss = __KERNEL_DS;
childregs->bx = sp; /* function */
childregs->bp = arg;
childregs->orig_ax = -1;
childregs->cs = __KERNEL_CS | get_kernel_rpl();
childregs->flags = X86_EFLAGS_IF | X86_EFLAGS_BIT1;
return 0;
}
*childregs = *current_pt_regs();
childregs->ax = 0;
if (sp)
childregs->sp = sp;
err = -ENOMEM;
memset(p->thread.ptrace_bps, 0, sizeof(p->thread.ptrace_bps));
if (unlikely(test_tsk_thread_flag(me, TIF_IO_BITMAP))) {
p->thread.io_bitmap_ptr = kmemdup(me->thread.io_bitmap_ptr,
IO_BITMAP_BYTES, GFP_KERNEL);
if (!p->thread.io_bitmap_ptr) {
p->thread.io_bitmap_max = 0;
return -ENOMEM;
}
set_tsk_thread_flag(p, TIF_IO_BITMAP);
}
/*
* Set a new TLS for the child thread?
*/
if (clone_flags & CLONE_SETTLS) {
#ifdef CONFIG_IA32_EMULATION
if (test_thread_flag(TIF_IA32))
err = do_set_thread_area(p, -1,
(struct user_desc __user *)childregs->si, 0);
else
#endif
err = do_arch_prctl(p, ARCH_SET_FS, childregs->r8);
if (err)
goto out;
}
err = 0;
out:
if (err && p->thread.io_bitmap_ptr) {
kfree(p->thread.io_bitmap_ptr);
p->thread.io_bitmap_max = 0;
}
return err;
}
static void
start_thread_common(struct pt_regs *regs, unsigned long new_ip,
unsigned long new_sp,
unsigned int _cs, unsigned int _ss, unsigned int _ds)
{
loadsegment(fs, 0);
loadsegment(es, _ds);
loadsegment(ds, _ds);
load_gs_index(0);
current->thread.usersp = new_sp;
regs->ip = new_ip;
regs->sp = new_sp;
this_cpu_write(old_rsp, new_sp);
regs->cs = _cs;
regs->ss = _ss;
regs->flags = X86_EFLAGS_IF;
}
void
start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp)
{
start_thread_common(regs, new_ip, new_sp,
__USER_CS, __USER_DS, 0);
}
#ifdef CONFIG_IA32_EMULATION
void start_thread_ia32(struct pt_regs *regs, u32 new_ip, u32 new_sp)
{
start_thread_common(regs, new_ip, new_sp,
test_thread_flag(TIF_X32)
? __USER_CS : __USER32_CS,
__USER_DS, __USER_DS);
}
#endif
/*
* switch_to(x,y) should switch tasks from x to y.
*
* This could still be optimized:
* - fold all the options into a flag word and test it with a single test.
* - could test fs/gs bitsliced
*
* Kprobes not supported here. Set the probe on schedule instead.
* Function graph tracer not supported too.
*/
__notrace_funcgraph struct task_struct *
__switch_to(struct task_struct *prev_p, struct task_struct *next_p)
{
struct thread_struct *prev = &prev_p->thread;
struct thread_struct *next = &next_p->thread;
int cpu = smp_processor_id();
struct tss_struct *tss = &per_cpu(init_tss, cpu);
unsigned fsindex, gsindex;
fpu_switch_t fpu;
fpu = switch_fpu_prepare(prev_p, next_p, cpu);
/*
* Reload esp0, LDT and the page table pointer:
*/
load_sp0(tss, next);
/*
* Switch DS and ES.
* This won't pick up thread selector changes, but I guess that is ok.
*/
savesegment(es, prev->es);
if (unlikely(next->es | prev->es))
loadsegment(es, next->es);
savesegment(ds, prev->ds);
if (unlikely(next->ds | prev->ds))
loadsegment(ds, next->ds);
/* We must save %fs and %gs before load_TLS() because
* %fs and %gs may be cleared by load_TLS().
*
* (e.g. xen_load_tls())
*/
savesegment(fs, fsindex);
savesegment(gs, gsindex);
load_TLS(next, cpu);
/*
* Leave lazy mode, flushing any hypercalls made here.
* This must be done before restoring TLS segments so
* the GDT and LDT are properly updated, and must be
* done before math_state_restore, so the TS bit is up
* to date.
*/
arch_end_context_switch(next_p);
/*
* Switch FS and GS.
*
* Segment register != 0 always requires a reload. Also
* reload when it has changed. When prev process used 64bit
* base always reload to avoid an information leak.
*/
if (unlikely(fsindex | next->fsindex | prev->fs)) {
loadsegment(fs, next->fsindex);
/*
* Check if the user used a selector != 0; if yes
* clear 64bit base, since overloaded base is always
* mapped to the Null selector
*/
if (fsindex)
prev->fs = 0;
}
/* when next process has a 64bit base use it */
if (next->fs)
wrmsrl(MSR_FS_BASE, next->fs);
prev->fsindex = fsindex;
if (unlikely(gsindex | next->gsindex | prev->gs)) {
load_gs_index(next->gsindex);
if (gsindex)
prev->gs = 0;
}
if (next->gs)
wrmsrl(MSR_KERNEL_GS_BASE, next->gs);
prev->gsindex = gsindex;
switch_fpu_finish(next_p, fpu);
/*
* Switch the PDA and FPU contexts.
*/
prev->usersp = this_cpu_read(old_rsp);
this_cpu_write(old_rsp, next->usersp);
this_cpu_write(current_task, next_p);
/*
* If it were not for PREEMPT_ACTIVE we could guarantee that the
* preempt_count of all tasks was equal here and this would not be
* needed.
*/
task_thread_info(prev_p)->saved_preempt_count = this_cpu_read(__preempt_count);
this_cpu_write(__preempt_count, task_thread_info(next_p)->saved_preempt_count);
this_cpu_write(kernel_stack,
(unsigned long)task_stack_page(next_p) +
THREAD_SIZE - KERNEL_STACK_OFFSET);
/*
* Now maybe reload the debug registers and handle I/O bitmaps
*/
if (unlikely(task_thread_info(next_p)->flags & _TIF_WORK_CTXSW_NEXT ||
task_thread_info(prev_p)->flags & _TIF_WORK_CTXSW_PREV))
__switch_to_xtra(prev_p, next_p, tss);
return prev_p;
}
void set_personality_64bit(void)
{
/* inherit personality from parent */
/* Make sure to be in 64bit mode */
clear_thread_flag(TIF_IA32);
clear_thread_flag(TIF_ADDR32);
clear_thread_flag(TIF_X32);
/* Ensure the corresponding mm is not marked. */
if (current->mm)
current->mm->context.ia32_compat = 0;
/* TBD: overwrites user setup. Should have two bits.
But 64bit processes have always behaved this way,
so it's not too bad. The main problem is just that
32bit childs are affected again. */
current->personality &= ~READ_IMPLIES_EXEC;
}
void set_personality_ia32(bool x32)
{
/* inherit personality from parent */
/* Make sure to be in 32bit mode */
set_thread_flag(TIF_ADDR32);
/* Mark the associated mm as containing 32-bit tasks. */
if (current->mm)
current->mm->context.ia32_compat = 1;
if (x32) {
clear_thread_flag(TIF_IA32);
set_thread_flag(TIF_X32);
current->personality &= ~READ_IMPLIES_EXEC;
/* is_compat_task() uses the presence of the x32
syscall bit flag to determine compat status */
current_thread_info()->status &= ~TS_COMPAT;
} else {
set_thread_flag(TIF_IA32);
clear_thread_flag(TIF_X32);
current->personality |= force_personality32;
/* Prepare the first "return" to user space */
current_thread_info()->status |= TS_COMPAT;
}
}
EXPORT_SYMBOL_GPL(set_personality_ia32);
unsigned long get_wchan(struct task_struct *p)
{
unsigned long stack;
u64 fp, ip;
int count = 0;
if (!p || p == current || p->state == TASK_RUNNING)
return 0;
stack = (unsigned long)task_stack_page(p);
if (p->thread.sp < stack || p->thread.sp >= stack+THREAD_SIZE)
return 0;
fp = *(u64 *)(p->thread.sp);
do {
if (fp < (unsigned long)stack ||
fp >= (unsigned long)stack+THREAD_SIZE)
return 0;
ip = *(u64 *)(fp+8);
if (!in_sched_functions(ip))
return ip;
fp = *(u64 *)fp;
} while (count++ < 16);
return 0;
}
long do_arch_prctl(struct task_struct *task, int code, unsigned long addr)
{
int ret = 0;
int doit = task == current;
int cpu;
switch (code) {
case ARCH_SET_GS:
if (addr >= TASK_SIZE_OF(task))
return -EPERM;
cpu = get_cpu();
/* handle small bases via the GDT because that's faster to
switch. */
if (addr <= 0xffffffff) {
set_32bit_tls(task, GS_TLS, addr);
if (doit) {
load_TLS(&task->thread, cpu);
load_gs_index(GS_TLS_SEL);
}
task->thread.gsindex = GS_TLS_SEL;
task->thread.gs = 0;
} else {
task->thread.gsindex = 0;
task->thread.gs = addr;
if (doit) {
load_gs_index(0);
ret = wrmsrl_safe(MSR_KERNEL_GS_BASE, addr);
}
}
put_cpu();
break;
case ARCH_SET_FS:
/* Not strictly needed for fs, but do it for symmetry
with gs */
if (addr >= TASK_SIZE_OF(task))
return -EPERM;
cpu = get_cpu();
/* handle small bases via the GDT because that's faster to
switch. */
if (addr <= 0xffffffff) {
set_32bit_tls(task, FS_TLS, addr);
if (doit) {
load_TLS(&task->thread, cpu);
loadsegment(fs, FS_TLS_SEL);
}
task->thread.fsindex = FS_TLS_SEL;
task->thread.fs = 0;
} else {
task->thread.fsindex = 0;
task->thread.fs = addr;
if (doit) {
/* set the selector to 0 to not confuse
__switch_to */
loadsegment(fs, 0);
ret = wrmsrl_safe(MSR_FS_BASE, addr);
}
}
put_cpu();
break;
case ARCH_GET_FS: {
unsigned long base;
if (task->thread.fsindex == FS_TLS_SEL)
base = read_32bit_tls(task, FS_TLS);
else if (doit)
rdmsrl(MSR_FS_BASE, base);
else
base = task->thread.fs;
ret = put_user(base, (unsigned long __user *)addr);
break;
}
case ARCH_GET_GS: {
unsigned long base;
unsigned gsindex;
if (task->thread.gsindex == GS_TLS_SEL)
base = read_32bit_tls(task, GS_TLS);
else if (doit) {
savesegment(gs, gsindex);
if (gsindex)
rdmsrl(MSR_KERNEL_GS_BASE, base);
else
base = task->thread.gs;
} else
base = task->thread.gs;
ret = put_user(base, (unsigned long __user *)addr);
break;
}
default:
ret = -EINVAL;
break;
}
return ret;
}
long sys_arch_prctl(int code, unsigned long addr)
{
return do_arch_prctl(current, code, addr);
}
unsigned long KSTK_ESP(struct task_struct *task)
{
return (test_tsk_thread_flag(task, TIF_IA32)) ?
(task_pt_regs(task)->sp) : ((task)->thread.usersp);
}
| gpl-2.0 |
johnmanlove/JMMC_Corp-Site | wp-content/plugins/constant-contact-api/admin/contacts.php | 4096 | <?php
use Ctct\ConstantContact;
use Ctct\Components\Contacts\Contact;
use Ctct\Components\Contacts\Address;
use Ctct\Components\Contacts\CustomField;
use Ctct\Components\Contacts\Note;
use Ctct\Components\Contacts\ContactList;
use Ctct\Components\Contacts\EmailAddress;
use Ctct\Exceptions\CtctException;
class CTCT_Admin_Contacts extends CTCT_Admin_Page {
var $errors;
var $id;
var $can_edit = true;
var $can_add = true;
var $component = 'Contact';
protected function getKey() {
return "constant-contact-contacts";
}
protected function getTitle( $value = '' ) {
if ( empty( $value ) && $this->isEdit() || $value == 'edit' ) {
return __( "Edit Contact", 'ctct' );
}
if ( empty( $value ) && $this->isSingle() || $value == 'single' ) {
return __( 'Contact', 'ctct' );
}
if ( empty( $value ) && $this->isAdd() || $value == 'add' ) {
return __( 'Add a Contact', 'ctct' );
}
return __( 'Contacts', 'ctct' );
}
protected function getNavTitle() {
return __( 'Contacts', 'ctct' );
}
protected function add() {
$data = esc_attr_recursive( (array) $_POST );
$Contact = new KWSContact( $data );
include( CTCT_DIR_PATH . 'views/admin/view.contact-addedit.php' );
}
protected function processForms() {
// check if the form was submitted
if ( isset( $_POST['email_addresses'] ) && ! empty( $_POST['email_addresses'] ) ) {
$action = "Getting Contact By Email Address";
try {
$data = $_POST;
$returnContact = $this->cc->addUpdateContact( $data );
// create a new contact if one does not exist
if ( $returnContact && ! is_wp_error( $returnContact ) ) {
wp_redirect( add_query_arg( array(
'page' => $this->getKey(),
'view' => $returnContact->id
), admin_url( 'admin.php' ) ) );
// update the existing contact if address already existed
} else {
$this->errors[] = $returnContact;
}
// catch any exceptions thrown during the process and print the errors to screen
} catch ( CtctException $ex ) {
r( $ex, true, $action . ' Exception' );
$this->errors = $ex;
}
}
}
protected function edit() {
if ( empty( $this->id ) ) {
esc_html_e( 'You have not specified a Contact to edit', 'ctct' );
return;
}
$Contact = $this->cc->getContact( CTCT_ACCESS_TOKEN, $this->id );
// The fetching of the contact failed.
if ( is_null( $Contact->id ) ) {
return;
}
$Contact = new KWSContact( $Contact );
include( CTCT_DIR_PATH . 'views/admin/view.contact-addedit.php' );
}
protected function single() {
$id = $this->id;
if ( empty( $id ) ) {
esc_html_e( 'You have not specified a Contact to view', 'ctct' );
return;
}
if ( $refresh = get_option( 'ctct_refresh_contact_' . $id ) ) {
delete_option( 'ctct_refresh_contact_' . $id );
add_filter( 'ctct_cache', '__return_false' );
}
$Contact = $this->cc->getContact( CTCT_ACCESS_TOKEN, $id );
// The fetching of the contact failed.
if ( is_null( $Contact->id ) ) {
return;
}
$Contact = new KWSContact( $Contact );
$summary = $this->cc->getContactSummaryReport( CTCT_ACCESS_TOKEN, $Contact->get( 'id' ) );
include( CTCT_DIR_PATH . 'views/admin/view.contact-view.php' );
}
protected function view() {
add_filter( 'ctct_cachekey', function () {
return isset( $_GET['status'] ) ? false : 'ctct_all_contacts';
} );
if ( ! empty( $_GET['refresh'] ) && $_GET['refresh'] === 'contacts' ) {
do_action( 'ctct_flush_contacts' );
}
$Contacts = $this->cc->getAllContacts();
kws_print_subsub( 'status', array(
array( 'val' => '', 'text' => 'All' ),
array( 'val' => 'ACTIVE', 'text' => 'Active' ),
array( 'val' => 'UNCONFIRMED', 'text' => 'Unconfirmed' ),
array( 'val' => 'OPTOUT', 'text' => 'Opt-Out' ),
array( 'val' => 'REMOVED', 'text' => 'Removed' ),
array( 'val' => 'NON_SUBSCRIBER', 'text' => 'Non-Subscriber' ),
) );
if ( empty( $Contacts ) ) {
esc_html_e( 'Your account has no contacts.', 'ctct' );
} else {
include( CTCT_DIR_PATH . 'views/admin/view.contacts-view.php' );
}
}
}
new CTCT_Admin_Contacts; | gpl-2.0 |
prajnashi/gst-plugins-base | gst/playback/gstdecodebin.c | 62802 | /* GStreamer
* Copyright (C) <2004> Wim Taymans <[email protected]>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/**
* SECTION:element-decodebin
*
* #GstBin that auto-magically constructs a decoding pipeline using available
* decoders and demuxers via auto-plugging.
*
* When using decodebin in your application, connect a signal handler to
* #GstDecodeBin::new-decoded-pad and connect your sinks from within the
* callback function.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <gst/gst-i18n-plugin.h>
#include <string.h>
#include <gst/gst.h>
#include <gst/pbutils/pbutils.h>
#include "gstplay-marshal.h"
/* generic templates */
static GstStaticPadTemplate decoder_bin_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
static GstStaticPadTemplate decoder_bin_src_template =
GST_STATIC_PAD_TEMPLATE ("src%d",
GST_PAD_SRC,
GST_PAD_SOMETIMES,
GST_STATIC_CAPS_ANY);
GST_DEBUG_CATEGORY_STATIC (gst_decode_bin_debug);
#define GST_CAT_DEFAULT gst_decode_bin_debug
#define GST_TYPE_DECODE_BIN (gst_decode_bin_get_type())
#define GST_DECODE_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DECODE_BIN,GstDecodeBin))
#define GST_DECODE_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DECODE_BIN,GstDecodeBinClass))
#define GST_IS_DECODE_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DECODE_BIN))
#define GST_IS_DECODE_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DECODE_BIN))
typedef struct _GstDecodeBin GstDecodeBin;
typedef struct _GstDecodeBinClass GstDecodeBinClass;
/**
* GstDecodeBin:
*
* Auto-plugging decoder element structure
*/
struct _GstDecodeBin
{
GstBin bin; /* we extend GstBin */
GstElement *typefind; /* this holds the typefind object */
GstElement *fakesink;
GList *dynamics; /* list of dynamic connections */
GList *queues; /* list of demuxer-decoder queues */
GList *probes; /* list of PadProbeData */
GList *factories; /* factories we can use for selecting elements */
gint numpads;
gint numwaiting;
gboolean have_type;
guint have_type_id; /* signal id for the typefind element */
gboolean shutting_down; /* stop pluggin if we're shutting down */
GType queue_type; /* store the GType of queues, to aid in recognising them */
GMutex *cb_mutex; /* Mutex for multi-threaded callbacks, such as removing the fakesink */
};
struct _GstDecodeBinClass
{
GstBinClass parent_class;
/* signal we fire when a new pad has been decoded into raw audio/video */
void (*new_decoded_pad) (GstElement * element, GstPad * pad, gboolean last);
/* signal we fire when a pad has been removed */
void (*removed_decoded_pad) (GstElement * element, GstPad * pad);
/* signal fired when we found a pad that we cannot decode */
void (*unknown_type) (GstElement * element, GstPad * pad, GstCaps * caps);
};
/* signals */
enum
{
SIGNAL_NEW_DECODED_PAD,
SIGNAL_REMOVED_DECODED_PAD,
SIGNAL_UNKNOWN_TYPE,
SIGNAL_REDIRECT,
LAST_SIGNAL
};
/* Properties */
enum
{
PROP_0,
PROP_SINK_CAPS,
};
typedef struct
{
GstPad *pad;
gulong sigid;
gboolean done;
} PadProbeData;
/* this structure is created for all dynamic pads that could get created
* at runtime */
typedef struct
{
GstDecodeBin *decode_bin; /* pointer to ourself */
GstElement *element; /* the element sending the signal */
gint np_sig_id; /* signal id of new_pad */
gint nmp_sig_id; /* signal id of no_more_pads */
GstPad *pad; /* the pad sending the signal */
gint caps_sig_id; /* signal id of caps */
}
GstDynamic;
static void gst_decode_bin_class_init (GstDecodeBinClass * klass);
static void gst_decode_bin_init (GstDecodeBin * decode_bin);
static void gst_decode_bin_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
static void gst_decode_bin_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
static void gst_decode_bin_dispose (GObject * object);
static void gst_decode_bin_finalize (GObject * object);
static GstStateChangeReturn gst_decode_bin_change_state (GstElement * element,
GstStateChange transition);
static gboolean add_fakesink (GstDecodeBin * decode_bin);
static void remove_fakesink (GstDecodeBin * decode_bin);
static void dynamic_free (GstDynamic * dyn);
static void free_dynamics (GstDecodeBin * decode_bin);
static void type_found (GstElement * typefind, guint probability,
GstCaps * caps, GstDecodeBin * decode_bin);
static GstElement *try_to_link_1 (GstDecodeBin * decode_bin,
GstElement * origelement, GstPad * pad, GList * factories);
static void close_link (GstElement * element, GstDecodeBin * decode_bin);
static void close_pad_link (GstElement * element, GstPad * pad,
GstCaps * caps, GstDecodeBin * decode_bin, gboolean more);
static void unlinked (GstPad * pad, GstPad * peerpad,
GstDecodeBin * decode_bin);
static void new_pad (GstElement * element, GstPad * pad, GstDynamic * dynamic);
static void no_more_pads (GstElement * element, GstDynamic * dynamic);
static void new_caps (GstPad * pad, GParamSpec * unused, GstDynamic * dynamic);
static void queue_filled_cb (GstElement * queue, GstDecodeBin * decode_bin);
static void queue_underrun_cb (GstElement * queue, GstDecodeBin * decode_bin);
static gboolean is_demuxer_element (GstElement * srcelement);
static GstElementClass *parent_class;
static guint gst_decode_bin_signals[LAST_SIGNAL] = { 0 };
static const GstElementDetails gst_decode_bin_details =
GST_ELEMENT_DETAILS ("Decoder Bin",
"Generic/Bin/Decoder",
"Autoplug and decode to raw media",
"Wim Taymans <[email protected]>");
static GType
gst_decode_bin_get_type (void)
{
static GType gst_decode_bin_type = 0;
if (!gst_decode_bin_type) {
static const GTypeInfo gst_decode_bin_info = {
sizeof (GstDecodeBinClass),
NULL,
NULL,
(GClassInitFunc) gst_decode_bin_class_init,
NULL,
NULL,
sizeof (GstDecodeBin),
0,
(GInstanceInitFunc) gst_decode_bin_init,
NULL
};
gst_decode_bin_type =
g_type_register_static (GST_TYPE_BIN, "GstDecodeBin",
&gst_decode_bin_info, 0);
}
return gst_decode_bin_type;
}
static void
gst_decode_bin_class_init (GstDecodeBinClass * klass)
{
GObjectClass *gobject_klass;
GstElementClass *gstelement_klass;
GstBinClass *gstbin_klass;
gobject_klass = (GObjectClass *) klass;
gstelement_klass = (GstElementClass *) klass;
gstbin_klass = (GstBinClass *) klass;
parent_class = g_type_class_peek_parent (klass);
gobject_klass->set_property = GST_DEBUG_FUNCPTR (gst_decode_bin_set_property);
gobject_klass->get_property = GST_DEBUG_FUNCPTR (gst_decode_bin_get_property);
gobject_klass->dispose = GST_DEBUG_FUNCPTR (gst_decode_bin_dispose);
gobject_klass->finalize = GST_DEBUG_FUNCPTR (gst_decode_bin_finalize);
/**
* GstDecodeBin::new-decoded-pad:
* @bin: The decodebin
* @pad: The newly created pad
* @islast: #TRUE if this is the last pad to be added. Deprecated.
*
* This signal gets emitted as soon as a new pad of the same type as one of
* the valid 'raw' types is added.
*/
gst_decode_bin_signals[SIGNAL_NEW_DECODED_PAD] =
g_signal_new ("new-decoded-pad", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GstDecodeBinClass, new_decoded_pad), NULL, NULL,
gst_play_marshal_VOID__OBJECT_BOOLEAN, G_TYPE_NONE, 2, GST_TYPE_PAD,
G_TYPE_BOOLEAN);
/**
* GstDecodeBin::removed-decoded-pad:
* @bin: The decodebin
* @pad: The pad that was removed
*
* This signal is emitted when a 'final' caps pad has been removed.
*/
gst_decode_bin_signals[SIGNAL_REMOVED_DECODED_PAD] =
g_signal_new ("removed-decoded-pad", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GstDecodeBinClass, removed_decoded_pad), NULL, NULL,
gst_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GST_TYPE_PAD);
/**
* GstDecodeBin::unknown-type:
* @bin: The decodebin
* @pad: The new pad containing caps that cannot be resolved to a 'final'
* stream type.
* @caps: The #GstCaps of the pad that cannot be resolved.
*
* This signal is emitted when a pad for which there is no further possible
* decoding is added to the decodebin.
*/
gst_decode_bin_signals[SIGNAL_UNKNOWN_TYPE] =
g_signal_new ("unknown-type", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstDecodeBinClass, unknown_type),
NULL, NULL, gst_marshal_VOID__OBJECT_BOXED, G_TYPE_NONE, 2,
GST_TYPE_PAD, GST_TYPE_CAPS);
g_object_class_install_property (gobject_klass, PROP_SINK_CAPS,
g_param_spec_boxed ("sink-caps", "Sink Caps",
"The caps of the input data. (NULL = use typefind element)",
GST_TYPE_CAPS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gst_element_class_add_pad_template (gstelement_klass,
gst_static_pad_template_get (&decoder_bin_sink_template));
gst_element_class_add_pad_template (gstelement_klass,
gst_static_pad_template_get (&decoder_bin_src_template));
gst_element_class_set_details (gstelement_klass, &gst_decode_bin_details);
gstelement_klass->change_state =
GST_DEBUG_FUNCPTR (gst_decode_bin_change_state);
}
/* check if the bin is dynamic.
*
* If there are no outstanding dynamic connections, the bin is
* considered to be non-dynamic.
*/
static gboolean
gst_decode_bin_is_dynamic (GstDecodeBin * decode_bin)
{
return decode_bin->dynamics != NULL;
}
/* the filter function for selecting the elements we can use in
* autoplugging */
static gboolean
gst_decode_bin_factory_filter (GstPluginFeature * feature,
GstDecodeBin * decode_bin)
{
guint rank;
const gchar *klass;
/* we only care about element factories */
if (!GST_IS_ELEMENT_FACTORY (feature))
return FALSE;
klass = gst_element_factory_get_klass (GST_ELEMENT_FACTORY (feature));
/* only demuxers, decoders and parsers can play */
if (strstr (klass, "Demux") == NULL &&
strstr (klass, "Decoder") == NULL && strstr (klass, "Parse") == NULL &&
strstr (klass, "Depayloader") == NULL) {
return FALSE;
}
/* only select elements with autoplugging rank */
rank = gst_plugin_feature_get_rank (feature);
if (rank < GST_RANK_MARGINAL)
return FALSE;
return TRUE;
}
/* function used to sort element features */
static gint
compare_ranks (GstPluginFeature * f1, GstPluginFeature * f2)
{
gint diff;
const gchar *rname1, *rname2;
diff = gst_plugin_feature_get_rank (f2) - gst_plugin_feature_get_rank (f1);
if (diff != 0)
return diff;
rname1 = gst_plugin_feature_get_name (f1);
rname2 = gst_plugin_feature_get_name (f2);
diff = strcmp (rname2, rname1);
return diff;
}
static void
print_feature (GstPluginFeature * feature)
{
const gchar *rname;
rname = gst_plugin_feature_get_name (feature);
GST_DEBUG ("%s", rname);
}
static void
gst_decode_bin_init (GstDecodeBin * decode_bin)
{
GList *factories;
decode_bin->cb_mutex = g_mutex_new ();
/* first filter out the interesting element factories */
factories = gst_default_registry_feature_filter (
(GstPluginFeatureFilter) gst_decode_bin_factory_filter,
FALSE, decode_bin);
/* sort them according to their ranks */
decode_bin->factories = g_list_sort (factories, (GCompareFunc) compare_ranks);
/* do some debugging */
g_list_foreach (decode_bin->factories, (GFunc) print_feature, NULL);
/* we create the typefind element only once */
decode_bin->typefind = gst_element_factory_make ("typefind", "typefind");
if (!decode_bin->typefind) {
g_warning ("can't find typefind element, decodebin will not work");
} else {
GstPad *pad, *gpad;
/* add the typefind element */
if (!gst_bin_add (GST_BIN (decode_bin), decode_bin->typefind)) {
g_warning ("Could not add typefind element, decodebin will not work");
gst_object_unref (decode_bin->typefind);
decode_bin->typefind = NULL;
}
/* get the sinkpad */
pad = gst_element_get_static_pad (decode_bin->typefind, "sink");
/* ghost the sink pad to ourself */
gpad = gst_ghost_pad_new ("sink", pad);
gst_pad_set_active (gpad, TRUE);
gst_element_add_pad (GST_ELEMENT (decode_bin), gpad);
gst_object_unref (pad);
/* connect a signal to find out when the typefind element found
* a type */
decode_bin->have_type_id =
g_signal_connect (G_OBJECT (decode_bin->typefind), "have_type",
G_CALLBACK (type_found), decode_bin);
}
add_fakesink (decode_bin);
decode_bin->dynamics = NULL;
decode_bin->queues = NULL;
decode_bin->probes = NULL;
}
static void
gst_decode_bin_dispose (GObject * object)
{
GstDecodeBin *decode_bin;
decode_bin = GST_DECODE_BIN (object);
if (decode_bin->factories)
gst_plugin_feature_list_free (decode_bin->factories);
decode_bin->factories = NULL;
G_OBJECT_CLASS (parent_class)->dispose (object);
/* our parent dispose might trigger new signals when pads are unlinked
* etc. clean up the mess here. */
/* FIXME do proper cleanup when going to NULL */
free_dynamics (decode_bin);
}
static void
gst_decode_bin_set_sink_caps (GstDecodeBin * dbin, GstCaps * caps)
{
GST_DEBUG_OBJECT (dbin, "Setting new caps: %" GST_PTR_FORMAT, caps);
g_object_set (dbin->typefind, "force-caps", caps, NULL);
}
static GstCaps *
gst_decode_bin_get_sink_caps (GstDecodeBin * dbin)
{
GstCaps *caps;
GST_DEBUG_OBJECT (dbin, "Getting currently set caps");
g_object_get (dbin->typefind, "force-caps", &caps, NULL);
return caps;
}
static void
gst_decode_bin_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{
GstDecodeBin *dbin;
dbin = GST_DECODE_BIN (object);
switch (prop_id) {
case PROP_SINK_CAPS:
gst_decode_bin_set_sink_caps (dbin, g_value_get_boxed (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gst_decode_bin_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec)
{
GstDecodeBin *dbin;
dbin = GST_DECODE_BIN (object);
switch (prop_id) {
case PROP_SINK_CAPS:
g_value_take_boxed (value, gst_decode_bin_get_sink_caps (dbin));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gst_decode_bin_finalize (GObject * object)
{
GstDecodeBin *decode_bin = GST_DECODE_BIN (object);
g_mutex_free (decode_bin->cb_mutex);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
struct DynFind
{
GstElement *elem;
GstPad *pad;
};
static gint
find_dynamic (GstDynamic * dyn, struct DynFind *info)
{
if (dyn->element == info->elem && dyn->pad == info->pad)
return 0;
return 1;
}
/* Add either an element (for dynamic pads/pad-added watching) or a
* pad (for delayed caps/notify::caps watching) to the dynamic list,
* taking care to ignore repeat entries so we don't end up handling a
* pad twice, for example */
static void
dynamic_add (GstElement * element, GstPad * pad, GstDecodeBin * decode_bin)
{
GstDynamic *dyn;
struct DynFind find_info;
GList *found;
g_return_if_fail (element != NULL);
/* do a search that this entry doesn't already exist */
find_info.elem = element;
find_info.pad = pad;
found = g_list_find_custom (decode_bin->dynamics, &find_info,
(GCompareFunc) find_dynamic);
if (found != NULL)
goto exit;
/* take refs */
dyn = g_new0 (GstDynamic, 1);
dyn->element = gst_object_ref (element);
dyn->decode_bin = gst_object_ref (decode_bin);
if (pad) {
dyn->pad = gst_object_ref (pad);
GST_DEBUG_OBJECT (decode_bin, "dynamic create for pad %" GST_PTR_FORMAT,
pad);
dyn->caps_sig_id = g_signal_connect (G_OBJECT (pad), "notify::caps",
G_CALLBACK (new_caps), dyn);
} else {
GST_DEBUG_OBJECT (decode_bin, "dynamic create for element %"
GST_PTR_FORMAT, element);
dyn->np_sig_id = g_signal_connect (G_OBJECT (element), "pad-added",
G_CALLBACK (new_pad), dyn);
dyn->nmp_sig_id = g_signal_connect (G_OBJECT (element), "no-more-pads",
G_CALLBACK (no_more_pads), dyn);
}
/* and add this element to the dynamic elements */
decode_bin->dynamics = g_list_prepend (decode_bin->dynamics, dyn);
return;
exit:
if (element) {
GST_DEBUG_OBJECT (decode_bin, "Dynamic element already added: %"
GST_PTR_FORMAT, element);
} else {
GST_DEBUG_OBJECT (decode_bin, "Dynamic pad already added: %"
GST_PTR_FORMAT, pad);
}
}
static void
dynamic_free (GstDynamic * dyn)
{
GST_DEBUG_OBJECT (dyn->decode_bin, "dynamic free");
/* disconnect signals */
if (dyn->np_sig_id)
g_signal_handler_disconnect (G_OBJECT (dyn->element), dyn->np_sig_id);
if (dyn->nmp_sig_id)
g_signal_handler_disconnect (G_OBJECT (dyn->element), dyn->nmp_sig_id);
if (dyn->caps_sig_id)
g_signal_handler_disconnect (G_OBJECT (dyn->pad), dyn->caps_sig_id);
if (dyn->pad)
gst_object_unref (dyn->pad);
dyn->pad = NULL;
if (dyn->element)
gst_object_unref (dyn->element);
dyn->element = NULL;
gst_object_unref (dyn->decode_bin);
dyn->decode_bin = NULL;
g_free (dyn);
}
static void
free_dynamics (GstDecodeBin * decode_bin)
{
GList *dyns;
for (dyns = decode_bin->dynamics; dyns; dyns = g_list_next (dyns)) {
GstDynamic *dynamic = (GstDynamic *) dyns->data;
dynamic_free (dynamic);
}
g_list_free (decode_bin->dynamics);
decode_bin->dynamics = NULL;
}
/* this function runs through the element factories and returns a list
* of all elements that are able to sink the given caps
*/
static GList *
find_compatibles (GstDecodeBin * decode_bin, const GstCaps * caps)
{
GList *factories;
GList *to_try = NULL;
/* loop over all the factories */
for (factories = decode_bin->factories; factories;
factories = g_list_next (factories)) {
GstElementFactory *factory = GST_ELEMENT_FACTORY (factories->data);
const GList *templates;
GList *walk;
/* get the templates from the element factory */
templates = gst_element_factory_get_static_pad_templates (factory);
for (walk = (GList *) templates; walk; walk = g_list_next (walk)) {
GstStaticPadTemplate *templ = walk->data;
/* we only care about the sink templates */
if (templ->direction == GST_PAD_SINK) {
GstCaps *intersect;
GstCaps *tmpl_caps;
/* try to intersect the caps with the caps of the template */
tmpl_caps = gst_static_caps_get (&templ->static_caps);
intersect = gst_caps_intersect (caps, tmpl_caps);
gst_caps_unref (tmpl_caps);
/* check if the intersection is empty */
if (!gst_caps_is_empty (intersect)) {
/* non empty intersection, we can use this element */
to_try = g_list_prepend (to_try, factory);
gst_caps_unref (intersect);
break;
}
gst_caps_unref (intersect);
}
}
}
to_try = g_list_reverse (to_try);
return to_try;
}
static gboolean
mimetype_is_raw (const gchar * mimetype)
{
return g_str_has_prefix (mimetype, "video/x-raw") ||
g_str_has_prefix (mimetype, "audio/x-raw") ||
g_str_has_prefix (mimetype, "text/plain") ||
g_str_has_prefix (mimetype, "text/x-pango-markup");
}
static void
free_pad_probes (GstDecodeBin * decode_bin)
{
GList *tmp;
/* Remove pad probes */
for (tmp = decode_bin->probes; tmp; tmp = g_list_next (tmp)) {
PadProbeData *data = (PadProbeData *) tmp->data;
gst_pad_remove_data_probe (data->pad, data->sigid);
g_free (data);
}
g_list_free (decode_bin->probes);
decode_bin->probes = NULL;
}
/* used when we need to remove a probe because the decoder we plugged failed
* to activate */
static void
free_pad_probe_for_element (GstDecodeBin * decode_bin, GstElement * element)
{
GList *l;
for (l = decode_bin->probes; l != NULL; l = g_list_next (l)) {
PadProbeData *data = (PadProbeData *) l->data;
if (GST_ELEMENT_CAST (GST_PAD_PARENT (data->pad)) == element) {
gst_pad_remove_data_probe (data->pad, data->sigid);
decode_bin->probes = g_list_delete_link (decode_bin->probes, l);
g_free (data);
return;
}
}
}
static gboolean
add_fakesink (GstDecodeBin * decode_bin)
{
if (decode_bin->fakesink != NULL)
return TRUE;
g_mutex_lock (decode_bin->cb_mutex);
decode_bin->fakesink = gst_element_factory_make ("fakesink", "fakesink");
if (!decode_bin->fakesink)
goto no_fakesink;
/* hacky, remove sink flag, we don't want our decodebin to become a sink
* just because we add a fakesink element to make us ASYNC */
GST_OBJECT_FLAG_UNSET (decode_bin->fakesink, GST_ELEMENT_IS_SINK);
/* takes ownership */
if (!gst_bin_add (GST_BIN (decode_bin), decode_bin->fakesink)) {
g_warning ("Could not add fakesink element, decodebin will not work");
gst_object_unref (decode_bin->fakesink);
decode_bin->fakesink = NULL;
}
g_mutex_unlock (decode_bin->cb_mutex);
return TRUE;
/* ERRORS */
no_fakesink:
{
g_warning ("can't find fakesink element, decodebin will not work");
g_mutex_unlock (decode_bin->cb_mutex);
return FALSE;
}
}
static void
remove_fakesink (GstDecodeBin * decode_bin)
{
gboolean removed_fakesink = FALSE;
if (decode_bin->fakesink == NULL)
return;
g_mutex_lock (decode_bin->cb_mutex);
if (decode_bin->fakesink) {
GST_DEBUG_OBJECT (decode_bin, "Removing fakesink and marking state dirty");
/* Lock the state to prevent it from changing state to non-NULL
* before it's removed */
gst_element_set_locked_state (decode_bin->fakesink, TRUE);
/* setting the state to NULL is never async */
gst_element_set_state (decode_bin->fakesink, GST_STATE_NULL);
gst_bin_remove (GST_BIN (decode_bin), decode_bin->fakesink);
decode_bin->fakesink = NULL;
removed_fakesink = TRUE;
}
g_mutex_unlock (decode_bin->cb_mutex);
if (removed_fakesink) {
free_pad_probes (decode_bin);
}
}
/* this should be implemented with _pad_block() */
static gboolean
pad_probe (GstPad * pad, GstMiniObject * data, GstDecodeBin * decode_bin)
{
GList *tmp;
gboolean alldone = TRUE;
for (tmp = decode_bin->probes; tmp; tmp = g_list_next (tmp)) {
PadProbeData *pdata = (PadProbeData *) tmp->data;
if (pdata->pad == pad) {
if (GST_IS_BUFFER (data)) {
if (!pdata->done)
decode_bin->numwaiting--;
pdata->done = TRUE;
} else if (GST_IS_EVENT (data) &&
((GST_EVENT_TYPE (data) == GST_EVENT_EOS) ||
(GST_EVENT_TYPE (data) == GST_EVENT_TAG) ||
(GST_EVENT_TYPE (data) == GST_EVENT_FLUSH_START))) {
/* FIXME, what about NEWSEGMENT? really, use _pad_block()... */
if (!pdata->done)
decode_bin->numwaiting--;
pdata->done = TRUE;
}
}
if (!(pdata->done)) {
GST_LOG_OBJECT (decode_bin, "Pad probe on pad %" GST_PTR_FORMAT
" but pad %" GST_PTR_FORMAT " still needs data.", pad, pdata->pad);
alldone = FALSE;
}
}
if (alldone)
remove_fakesink (decode_bin);
return TRUE;
}
/* FIXME: this should be somehow merged with the queue code in
* try_to_link_1() to reduce code duplication */
static GstPad *
add_raw_queue (GstDecodeBin * decode_bin, GstPad * pad)
{
GstElement *queue = NULL;
GstPad *queuesinkpad = NULL, *queuesrcpad = NULL;
queue = gst_element_factory_make ("queue", NULL);
decode_bin->queue_type = G_OBJECT_TYPE (queue);
g_object_set (G_OBJECT (queue), "max-size-buffers", 0, NULL);
g_object_set (G_OBJECT (queue), "max-size-time", G_GINT64_CONSTANT (0), NULL);
g_object_set (G_OBJECT (queue), "max-size-bytes", 8192, NULL);
gst_bin_add (GST_BIN (decode_bin), queue);
gst_element_set_state (queue, GST_STATE_READY);
queuesinkpad = gst_element_get_static_pad (queue, "sink");
queuesrcpad = gst_element_get_static_pad (queue, "src");
if (gst_pad_link (pad, queuesinkpad) != GST_PAD_LINK_OK) {
GST_WARNING_OBJECT (decode_bin,
"Linking queue failed, trying without queue");
gst_element_set_state (queue, GST_STATE_NULL);
gst_object_unref (queuesrcpad);
gst_object_unref (queuesinkpad);
gst_bin_remove (GST_BIN (decode_bin), queue);
return gst_object_ref (pad);
}
decode_bin->queues = g_list_append (decode_bin->queues, queue);
g_signal_connect (G_OBJECT (queue),
"overrun", G_CALLBACK (queue_filled_cb), decode_bin);
g_signal_connect (G_OBJECT (queue),
"underrun", G_CALLBACK (queue_underrun_cb), decode_bin);
gst_element_set_state (queue, GST_STATE_PAUSED);
gst_object_unref (queuesinkpad);
return queuesrcpad;
}
/* given a pad and a caps from an element, find the list of elements
* that could connect to the pad
*
* If the pad has a raw format, this function will create a ghostpad
* for the pad onto the decodebin.
*
* If no compatible elements could be found, this function will signal
* the unknown_type signal.
*/
static void
close_pad_link (GstElement * element, GstPad * pad, GstCaps * caps,
GstDecodeBin * decode_bin, gboolean more)
{
GstStructure *structure;
const gchar *mimetype;
gchar *padname;
gint diff;
padname = gst_pad_get_name (pad);
diff = strncmp (padname, "current_", 8);
g_free (padname);
/* hack.. ignore current pads */
if (!diff)
return;
/* the caps is empty, this means the pad has no type, we can only
* decide to fire the unknown_type signal. */
if (caps == NULL || gst_caps_is_empty (caps))
goto unknown_type;
/* the caps is any, this means the pad can be anything and
* we don't know yet */
if (gst_caps_is_any (caps))
goto dont_know_yet;
GST_LOG_OBJECT (element, "trying to close %" GST_PTR_FORMAT, caps);
/* FIXME, iterate over more structures? I guess it is possible that
* this pad has some encoded and some raw pads. This code will fail
* then if the first structure is not the raw type... */
structure = gst_caps_get_structure (caps, 0);
mimetype = gst_structure_get_name (structure);
/* first see if this is raw. If the type is raw, we can
* create a ghostpad for this pad. It's possible that the caps are not
* fixed. */
if (mimetype_is_raw (mimetype)) {
gchar *padname;
GstPad *ghost;
PadProbeData *data;
/* If we're at a demuxer element but have raw data already
* we have to add a queue here. For non-raw data this is done
* in try_to_link_1() */
if (is_demuxer_element (element)) {
GST_DEBUG_OBJECT (decode_bin,
"Element %s is a demuxer, inserting a queue",
GST_OBJECT_NAME (element));
pad = add_raw_queue (decode_bin, pad);
}
/* make a unique name for this new pad */
padname = g_strdup_printf ("src%d", decode_bin->numpads);
decode_bin->numpads++;
/* make it a ghostpad */
ghost = gst_ghost_pad_new (padname, pad);
gst_pad_set_active (ghost, TRUE);
gst_element_add_pad (GST_ELEMENT (decode_bin), ghost);
data = g_new0 (PadProbeData, 1);
data->pad = pad;
data->done = FALSE;
/* FIXME, use _pad_block() */
data->sigid = gst_pad_add_data_probe (pad, G_CALLBACK (pad_probe),
decode_bin);
decode_bin->numwaiting++;
decode_bin->probes = g_list_append (decode_bin->probes, data);
GST_LOG_OBJECT (element, "closed pad %s", padname);
/* our own signal with an extra flag that this is the only pad */
GST_DEBUG_OBJECT (decode_bin, "emitting new-decoded-pad");
g_signal_emit (G_OBJECT (decode_bin),
gst_decode_bin_signals[SIGNAL_NEW_DECODED_PAD], 0, ghost, !more);
GST_DEBUG_OBJECT (decode_bin, "emitted new-decoded-pad");
g_free (padname);
/* If we're at a demuxer element pad was set to a queue's
* srcpad and must be unref'd here */
if (is_demuxer_element (element))
gst_object_unref (pad);
} else {
GList *to_try;
/* if the caps has many types, we need to delay */
if (!gst_caps_is_fixed (caps))
goto many_types;
/* continue plugging, first find all compatible elements */
to_try = find_compatibles (decode_bin, caps);
if (to_try == NULL)
/* no compatible elements, we cannot go on */
goto unknown_type;
if (try_to_link_1 (decode_bin, element, pad, to_try) == NULL) {
g_list_free (to_try);
GST_LOG_OBJECT (pad, "none of the allegedly available elements usable");
goto unknown_type;
}
/* can free the list again now */
g_list_free (to_try);
}
return;
/* ERRORS */
unknown_type:
{
GST_LOG_OBJECT (pad, "unknown type found, fire signal");
g_signal_emit (G_OBJECT (decode_bin),
gst_decode_bin_signals[SIGNAL_UNKNOWN_TYPE], 0, pad, caps);
gst_element_post_message (GST_ELEMENT_CAST (decode_bin),
gst_missing_decoder_message_new (GST_ELEMENT_CAST (decode_bin), caps));
if (element == decode_bin->typefind) {
gchar *desc;
desc = gst_pb_utils_get_decoder_description (caps);
GST_ELEMENT_ERROR (decode_bin, STREAM, CODEC_NOT_FOUND,
(_("A %s plugin is required to play this stream, but not installed."),
desc),
("No decoder to handle media type '%s'",
gst_structure_get_name (gst_caps_get_structure (caps, 0))));
g_free (desc);
}
return;
}
dont_know_yet:
{
GST_LOG_OBJECT (pad, "type is not known yet");
goto setup_caps_delay;
}
many_types:
{
GST_LOG_OBJECT (pad, "many possible types");
goto setup_caps_delay;
}
setup_caps_delay:
{
GST_LOG_OBJECT (pad, "setting up a delayed link");
dynamic_add (element, pad, decode_bin);
return;
}
}
/* Decide whether an element is a demuxer based on the
* klass and number/type of src pad templates it has */
static gboolean
is_demuxer_element (GstElement * srcelement)
{
GstElementFactory *srcfactory;
GstElementClass *elemclass;
GList *walk;
const gchar *klass;
gint potential_src_pads = 0;
srcfactory = gst_element_get_factory (srcelement);
klass = gst_element_factory_get_klass (srcfactory);
/* Can't be a demuxer unless it has Demux in the klass name */
if (klass == NULL || !strstr (klass, "Demux"))
return FALSE;
/* Walk the src pad templates and count how many the element
* might produce */
elemclass = GST_ELEMENT_GET_CLASS (srcelement);
walk = gst_element_class_get_pad_template_list (elemclass);
while (walk != NULL) {
GstPadTemplate *templ;
templ = (GstPadTemplate *) walk->data;
if (GST_PAD_TEMPLATE_DIRECTION (templ) == GST_PAD_SRC) {
switch (GST_PAD_TEMPLATE_PRESENCE (templ)) {
case GST_PAD_ALWAYS:
case GST_PAD_SOMETIMES:
if (strstr (GST_PAD_TEMPLATE_NAME_TEMPLATE (templ), "%"))
potential_src_pads += 2; /* Might make multiple pads */
else
potential_src_pads += 1;
break;
case GST_PAD_REQUEST:
potential_src_pads += 2;
break;
}
}
walk = g_list_next (walk);
}
if (potential_src_pads < 2)
return FALSE;
return TRUE;
}
/*
* given a list of element factories, try to link one of the factories
* to the given pad.
*
* The function returns the element that was successfully linked to the
* pad.
*/
static GstElement *
try_to_link_1 (GstDecodeBin * decode_bin, GstElement * srcelement, GstPad * pad,
GList * factories)
{
GList *walk;
GstElement *result = NULL;
gboolean isdemux = FALSE;
GstPad *queuesinkpad = NULL, *queuesrcpad = NULL;
GstElement *queue = NULL;
GstPad *usedsrcpad = pad;
/* Check if the parent of the src pad is a demuxer */
isdemux = is_demuxer_element (srcelement);
if (isdemux && factories != NULL) {
GstPadLinkReturn dqlink;
/* Insert a queue between demuxer and decoder */
GST_DEBUG_OBJECT (decode_bin,
"Element %s is a demuxer, inserting a queue",
GST_OBJECT_NAME (srcelement));
queue = gst_element_factory_make ("queue", NULL);
decode_bin->queue_type = G_OBJECT_TYPE (queue);
g_object_set (G_OBJECT (queue), "max-size-buffers", 0, NULL);
g_object_set (G_OBJECT (queue), "max-size-time", G_GINT64_CONSTANT (0),
NULL);
g_object_set (G_OBJECT (queue), "max-size-bytes", 8192, NULL);
gst_bin_add (GST_BIN (decode_bin), queue);
gst_element_set_state (queue, GST_STATE_READY);
queuesinkpad = gst_element_get_static_pad (queue, "sink");
usedsrcpad = queuesrcpad = gst_element_get_static_pad (queue, "src");
dqlink = gst_pad_link (pad, queuesinkpad);
g_return_val_if_fail (dqlink == GST_PAD_LINK_OK, NULL);
}
/* loop over the factories */
for (walk = factories; walk; walk = g_list_next (walk)) {
GstElementFactory *factory = GST_ELEMENT_FACTORY (walk->data);
GstElement *element;
GstPadLinkReturn ret;
GstPad *sinkpad;
GST_DEBUG_OBJECT (decode_bin, "trying to link %s",
gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (factory)));
/* make an element from the factory first */
if ((element = gst_element_factory_create (factory, NULL)) == NULL) {
/* hmm, strange. Like with all things in life, let's move on.. */
GST_WARNING_OBJECT (decode_bin, "could not create an element from %s",
gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (factory)));
continue;
}
/* try to link the given pad to a sinkpad */
/* FIXME, find the sinkpad by looping over the pads instead of
* looking it up by name */
if ((sinkpad = gst_element_get_static_pad (element, "sink")) == NULL) {
/* if no pad is found we can't do anything */
GST_WARNING_OBJECT (decode_bin, "could not find sinkpad in element");
continue;
}
/* now add the element to the bin first */
GST_DEBUG_OBJECT (decode_bin, "adding %s", GST_OBJECT_NAME (element));
gst_bin_add (GST_BIN (decode_bin), element);
/* set to READY first so it is ready, duh. */
if (gst_element_set_state (element,
GST_STATE_READY) == GST_STATE_CHANGE_FAILURE) {
GST_WARNING_OBJECT (decode_bin, "Couldn't set %s to READY",
GST_ELEMENT_NAME (element));
/* get rid of the sinkpad */
gst_object_unref (sinkpad);
/* this element did not work, remove it again and continue trying
* other elements, the element will be disposed. */
/* FIXME: shouldn't we do this before adding it to the bin so that no
* error messages get through to the app? (tpm) */
gst_bin_remove (GST_BIN (decode_bin), element);
continue;
}
if ((ret = gst_pad_link (usedsrcpad, sinkpad)) != GST_PAD_LINK_OK) {
GST_DEBUG_OBJECT (decode_bin, "link failed on pad %s:%s, reason %d",
GST_DEBUG_PAD_NAME (pad), ret);
/* get rid of the sinkpad */
gst_object_unref (sinkpad);
/* this element did not work, remove it again and continue trying
* other elements, the element will be disposed. */
gst_element_set_state (element, GST_STATE_NULL);
gst_bin_remove (GST_BIN (decode_bin), element);
} else {
guint sig;
GST_DEBUG_OBJECT (decode_bin, "linked on pad %s:%s",
GST_DEBUG_PAD_NAME (usedsrcpad));
/* configure the queue some more */
if (queue != NULL) {
decode_bin->queues = g_list_append (decode_bin->queues, queue);
g_signal_connect (G_OBJECT (queue),
"overrun", G_CALLBACK (queue_filled_cb), decode_bin);
g_signal_connect (G_OBJECT (queue),
"underrun", G_CALLBACK (queue_underrun_cb), decode_bin);
}
/* The link worked, now figure out what it was that we connected */
/* make sure we catch unlink signals */
sig = g_signal_connect (G_OBJECT (pad), "unlinked",
G_CALLBACK (unlinked), decode_bin);
/* now that we added the element we can try to continue autoplugging
* on it until we have a raw type */
close_link (element, decode_bin);
/* change the state of the element to that of the parent */
if ((gst_element_set_state (element,
GST_STATE_PAUSED)) == GST_STATE_CHANGE_FAILURE) {
GST_WARNING_OBJECT (decode_bin, "Couldn't set %s to PAUSED",
GST_ELEMENT_NAME (element));
/* close_link -> close_pad_link -> might have set up a pad probe */
free_pad_probe_for_element (decode_bin, element);
gst_element_set_state (element, GST_STATE_NULL);
gst_bin_remove (GST_BIN (decode_bin), element);
continue;
}
result = element;
/* get rid of the sinkpad now */
gst_object_unref (sinkpad);
/* Set the queue to paused and set the pointer to NULL so we don't
* remove it below */
if (queue != NULL) {
gst_element_set_state (queue, GST_STATE_PAUSED);
queue = NULL;
gst_object_unref (queuesrcpad);
gst_object_unref (queuesinkpad);
}
/* and exit */
goto done;
}
}
done:
if (queue != NULL) {
/* We didn't successfully connect to the queue */
gst_pad_unlink (pad, queuesinkpad);
gst_element_set_state (queue, GST_STATE_NULL);
gst_object_unref (queuesrcpad);
gst_object_unref (queuesinkpad);
gst_bin_remove (GST_BIN (decode_bin), queue);
}
return result;
}
static GstPad *
get_our_ghost_pad (GstDecodeBin * decode_bin, GstPad * pad)
{
GstIterator *pad_it = NULL;
GstPad *db_pad = NULL;
gboolean done = FALSE;
if (pad == NULL || !GST_PAD_IS_SRC (pad)) {
GST_DEBUG_OBJECT (decode_bin, "pad NULL or not SRC pad");
return NULL;
}
/* our ghostpads are the sourcepads */
pad_it = gst_element_iterate_src_pads (GST_ELEMENT (decode_bin));
while (!done) {
db_pad = NULL;
switch (gst_iterator_next (pad_it, (gpointer) & db_pad)) {
case GST_ITERATOR_OK:
GST_DEBUG_OBJECT (decode_bin, "looking at pad %s:%s",
GST_DEBUG_PAD_NAME (db_pad));
if (GST_IS_GHOST_PAD (db_pad)) {
GstPad *target_pad = NULL;
target_pad = gst_ghost_pad_get_target (GST_GHOST_PAD (db_pad));
done = (target_pad == pad);
if (target_pad)
gst_object_unref (target_pad);
if (done) {
/* Found our ghost pad */
GST_DEBUG_OBJECT (decode_bin, "found ghostpad %s:%s for pad %s:%s",
GST_DEBUG_PAD_NAME (db_pad), GST_DEBUG_PAD_NAME (pad));
break;
}
}
/* Not the right one */
gst_object_unref (db_pad);
break;
case GST_ITERATOR_RESYNC:
gst_iterator_resync (pad_it);
break;
case GST_ITERATOR_ERROR:
done = TRUE;
break;
case GST_ITERATOR_DONE:
done = TRUE;
break;
}
}
gst_iterator_free (pad_it);
return db_pad;
}
/* remove all downstream elements starting from the given pad.
* Also make sure to remove the ghostpad we created for the raw
* decoded stream.
*/
static void
remove_element_chain (GstDecodeBin * decode_bin, GstPad * pad)
{
GList *int_links, *walk;
GstElement *elem = GST_ELEMENT (GST_OBJECT_PARENT (pad));
while (GST_OBJECT_PARENT (elem) &&
GST_OBJECT_PARENT (elem) != GST_OBJECT (decode_bin))
elem = GST_ELEMENT (GST_OBJECT_PARENT (elem));
if (G_OBJECT_TYPE (elem) == decode_bin->queue_type) {
GST_DEBUG_OBJECT (decode_bin,
"Encountered demuxer output queue while removing element chain");
decode_bin->queues = g_list_remove (decode_bin->queues, elem);
}
GST_DEBUG_OBJECT (decode_bin, "%s:%s", GST_DEBUG_PAD_NAME (pad));
int_links = gst_pad_get_internal_links (pad);
/* remove all elements linked to this pad up to the ghostpad
* that we created for this stream */
for (walk = int_links; walk; walk = g_list_next (walk)) {
GstPad *pad;
GstPad *ghostpad;
GstPad *peer;
pad = GST_PAD (walk->data);
GST_DEBUG_OBJECT (decode_bin, "inspecting internal pad %s:%s",
GST_DEBUG_PAD_NAME (pad));
ghostpad = get_our_ghost_pad (decode_bin, pad);
if (ghostpad) {
GST_DEBUG_OBJECT (decode_bin, "found our ghost pad %s:%s for %s:%s",
GST_DEBUG_PAD_NAME (ghostpad), GST_DEBUG_PAD_NAME (pad));
g_signal_emit (G_OBJECT (decode_bin),
gst_decode_bin_signals[SIGNAL_REMOVED_DECODED_PAD], 0, ghostpad);
gst_element_remove_pad (GST_ELEMENT (decode_bin), ghostpad);
gst_object_unref (ghostpad);
continue;
} else {
GST_DEBUG_OBJECT (decode_bin, "not one of our ghostpads");
}
peer = gst_pad_get_peer (pad);
if (peer == NULL)
continue;
GST_DEBUG_OBJECT (decode_bin, "internal pad %s:%s linked to pad %s:%s",
GST_DEBUG_PAD_NAME (pad), GST_DEBUG_PAD_NAME (peer));
{
GstObject *parent = gst_pad_get_parent (peer);
if (parent) {
GstObject *grandparent = gst_object_get_parent (parent);
if (grandparent != NULL) {
if (GST_ELEMENT (grandparent) != GST_ELEMENT (decode_bin)) {
GST_DEBUG_OBJECT (decode_bin, "dead end pad %s:%s parent %s",
GST_DEBUG_PAD_NAME (peer), GST_OBJECT_NAME (grandparent));
} else {
GST_DEBUG_OBJECT (decode_bin, "recursing element %s on pad %s:%s",
GST_ELEMENT_NAME (elem), GST_DEBUG_PAD_NAME (pad));
remove_element_chain (decode_bin, peer);
}
gst_object_unref (grandparent);
}
gst_object_unref (parent);
}
}
gst_object_unref (peer);
}
GST_DEBUG_OBJECT (decode_bin, "removing %s", GST_ELEMENT_NAME (elem));
g_list_free (int_links);
gst_element_set_state (elem, GST_STATE_NULL);
gst_bin_remove (GST_BIN (decode_bin), elem);
}
/* there are @bytes bytes in @queue, enlarge it
*
* Returns: new max number of bytes in @queue
*/
static guint
queue_enlarge (GstElement * queue, guint bytes, GstDecodeBin * decode_bin)
{
/* Increase the queue size by 1Mbyte if it is over 1Mb, else double its current limit
*/
if (bytes > 1024 * 1024)
bytes += 1024 * 1024;
else
bytes *= 2;
GST_DEBUG_OBJECT (decode_bin,
"increasing queue %s max-size-bytes to %d", GST_ELEMENT_NAME (queue),
bytes);
g_object_set (G_OBJECT (queue), "max-size-bytes", bytes, NULL);
return bytes;
}
/* this callback is called when our queues fills up or are empty
* We then check the status of all other queues to make sure we
* never have an empty and full queue at the same time since that
* would block dataflow. In the case of a filled queue, we make
* it larger.
*/
static void
queue_underrun_cb (GstElement * queue, GstDecodeBin * decode_bin)
{
/* FIXME: we don't really do anything here for now. Ideally we should
* see if some of the queues are filled and increase their values
* in that case.
* Note: be very carefull with thread safety here as this underrun
* signal is done from the streaming thread of queue srcpad which
* is different from the pad_added (where we add the queue to the
* list) and the overrun signals that are signalled from the
* demuxer thread.
*/
GST_DEBUG_OBJECT (decode_bin, "got underrun");
}
/* Make sure we don't have a full queue and empty queue situation */
static void
queue_filled_cb (GstElement * queue, GstDecodeBin * decode_bin)
{
GList *tmp;
gboolean increase = FALSE;
guint bytes;
/* get current byte level from the queue that is filled */
g_object_get (G_OBJECT (queue), "current-level-bytes", &bytes, NULL);
GST_DEBUG_OBJECT (decode_bin, "One of the queues is full at %d bytes", bytes);
/* we do not buffer more than 20Mb */
if (bytes > (20 * 1024 * 1024))
goto too_large;
/* check all other queue to see if one is empty, in that case
* we need to enlarge @queue */
for (tmp = decode_bin->queues; tmp; tmp = g_list_next (tmp)) {
GstElement *aqueue = GST_ELEMENT (tmp->data);
guint levelbytes = 0;
if (aqueue != queue) {
g_object_get (G_OBJECT (aqueue), "current-level-bytes", &levelbytes,
NULL);
if (levelbytes == 0) {
/* yup, found an empty queue, we can stop the search and
* need to enlarge the queue */
increase = TRUE;
break;
}
}
}
if (increase) {
/* enlarge @queue */
queue_enlarge (queue, bytes, decode_bin);
} else {
GST_DEBUG_OBJECT (decode_bin,
"Queue is full but other queues are not empty, not doing anything");
}
return;
/* errors */
too_large:
{
GST_WARNING_OBJECT (decode_bin,
"Queue is bigger than 20Mbytes, something else is going wrong");
return;
}
}
/* This function will be called when a dynamic pad is created on an element.
* We try to continue autoplugging on this new pad. */
static void
new_pad (GstElement * element, GstPad * pad, GstDynamic * dynamic)
{
GstDecodeBin *decode_bin = dynamic->decode_bin;
GstCaps *caps;
gboolean more;
GST_OBJECT_LOCK (decode_bin);
if (decode_bin->shutting_down)
goto shutting_down1;
GST_OBJECT_UNLOCK (decode_bin);
GST_STATE_LOCK (decode_bin);
if (decode_bin->shutting_down)
goto shutting_down2;
/* see if any more pending dynamic connections exist */
more = gst_decode_bin_is_dynamic (decode_bin);
caps = gst_pad_get_caps (pad);
close_pad_link (element, pad, caps, decode_bin, more);
if (caps)
gst_caps_unref (caps);
GST_STATE_UNLOCK (decode_bin);
return;
shutting_down1:
{
GST_DEBUG_OBJECT (decode_bin, "we are shutting down");
GST_OBJECT_UNLOCK (decode_bin);
return;
}
shutting_down2:
{
GST_DEBUG_OBJECT (decode_bin, "we are shutting down");
GST_STATE_UNLOCK (decode_bin);
return;
}
}
static void
dynamic_remove (GstDynamic * dynamic)
{
GstDecodeBin *decode_bin = dynamic->decode_bin;
/* remove the dynamic from the list of dynamics */
decode_bin->dynamics = g_list_remove (decode_bin->dynamics, dynamic);
dynamic_free (dynamic);
/* if we have no more dynamic elements, we have no chance of creating
* more pads, so we fire the no_more_pads signal */
if (decode_bin->dynamics == NULL) {
if (decode_bin->numwaiting == 0) {
GST_DEBUG_OBJECT (decode_bin,
"no more dynamic elements, removing fakesink");
remove_fakesink (decode_bin);
}
GST_DEBUG_OBJECT (decode_bin,
"no more dynamic elements, signaling no_more_pads");
gst_element_no_more_pads (GST_ELEMENT (decode_bin));
} else {
GST_DEBUG_OBJECT (decode_bin, "we have more dynamic elements");
}
}
/* this signal is fired when an element signals the no_more_pads signal.
* This means that the element will not generate more dynamic pads and
* we can remove the element from the list of dynamic elements. When we
* have no more dynamic elements in the pipeline, we can fire a no_more_pads
* signal ourselves. */
static void
no_more_pads (GstElement * element, GstDynamic * dynamic)
{
GST_DEBUG_OBJECT (dynamic->decode_bin, "no more pads on element %s",
GST_ELEMENT_NAME (element));
dynamic_remove (dynamic);
}
static void
new_caps (GstPad * pad, GParamSpec * unused, GstDynamic * dynamic)
{
GST_DEBUG_OBJECT (dynamic->decode_bin, "delayed link triggered");
new_pad (dynamic->element, pad, dynamic);
/* assume it worked and remove the dynamic */
dynamic_remove (dynamic);
return;
}
static gboolean
is_our_kid (GstElement * e, GstDecodeBin * decode_bin)
{
gboolean ret;
GstElement *parent;
parent = (GstElement *) gst_object_get_parent ((GstObject *) e);
ret = (parent == (GstElement *) decode_bin);
if (parent)
gst_object_unref ((GstObject *) parent);
return ret;
}
static gboolean
elem_is_dynamic (GstElement * element, GstDecodeBin * decode_bin)
{
GList *pads;
/* loop over all the padtemplates */
for (pads = GST_ELEMENT_GET_CLASS (element)->padtemplates; pads;
pads = g_list_next (pads)) {
GstPadTemplate *templ = GST_PAD_TEMPLATE (pads->data);
const gchar *templ_name;
/* we are only interested in source pads */
if (GST_PAD_TEMPLATE_DIRECTION (templ) != GST_PAD_SRC)
continue;
templ_name = GST_PAD_TEMPLATE_NAME_TEMPLATE (templ);
GST_DEBUG_OBJECT (decode_bin, "got a source pad template %s", templ_name);
/* figure out what kind of pad this is */
switch (GST_PAD_TEMPLATE_PRESENCE (templ)) {
case GST_PAD_SOMETIMES:
{
/* try to get the pad to see if it is already created or
* not */
GstPad *pad = gst_element_get_static_pad (element, templ_name);
if (pad) {
GST_DEBUG_OBJECT (decode_bin, "got the pad for sometimes template %s",
templ_name);
gst_object_unref (pad);
} else {
GST_DEBUG_OBJECT (decode_bin,
"did not get the sometimes pad of template %s", templ_name);
/* we have an element that will create dynamic pads */
return TRUE;
}
break;
}
default:
/* Don't care about ALWAYS or REQUEST pads */
break;
}
}
return FALSE;
}
/* This function will be called when a pad is disconnected for some reason */
static void
unlinked (GstPad * pad, GstPad * peerpad, GstDecodeBin * decode_bin)
{
GstElement *element, *peer;
/* inactivate pad */
gst_pad_set_active (pad, GST_ACTIVATE_NONE);
peer = gst_pad_get_parent_element (peerpad);
if (!is_our_kid (peer, decode_bin))
goto exit;
GST_DEBUG_OBJECT (decode_bin, "pad %s:%s removal while alive - chained?",
GST_DEBUG_PAD_NAME (pad));
/* remove all elements linked to the peerpad */
remove_element_chain (decode_bin, peerpad);
/* Re-add as a dynamic element if needed, via close_link */
element = gst_pad_get_parent_element (pad);
if (element) {
if (elem_is_dynamic (element, decode_bin))
dynamic_add (element, NULL, decode_bin);
gst_object_unref (element);
}
exit:
gst_object_unref (peer);
}
/* this function inspects the given element and tries to connect something
* on the srcpads. If there are dynamic pads, it sets up a signal handler to
* continue autoplugging when they become available */
static void
close_link (GstElement * element, GstDecodeBin * decode_bin)
{
GList *pads;
gboolean dynamic = FALSE;
GList *to_connect = NULL;
gboolean more;
GST_DEBUG_OBJECT (decode_bin, "closing links with element %s",
GST_ELEMENT_NAME (element));
/* loop over all the padtemplates */
for (pads = GST_ELEMENT_GET_CLASS (element)->padtemplates; pads;
pads = g_list_next (pads)) {
GstPadTemplate *templ = GST_PAD_TEMPLATE (pads->data);
const gchar *templ_name;
/* we are only interested in source pads */
if (GST_PAD_TEMPLATE_DIRECTION (templ) != GST_PAD_SRC)
continue;
templ_name = GST_PAD_TEMPLATE_NAME_TEMPLATE (templ);
GST_DEBUG_OBJECT (decode_bin, "got a source pad template %s", templ_name);
/* figure out what kind of pad this is */
switch (GST_PAD_TEMPLATE_PRESENCE (templ)) {
case GST_PAD_ALWAYS:
{
/* get the pad that we need to autoplug */
GstPad *pad = gst_element_get_static_pad (element, templ_name);
if (pad) {
GST_DEBUG_OBJECT (decode_bin, "got the pad for always template %s",
templ_name);
/* here is the pad, we need to autoplug it */
to_connect = g_list_prepend (to_connect, pad);
} else {
/* strange, pad is marked as always but it's not
* there. Fix the element */
GST_WARNING_OBJECT (decode_bin,
"could not get the pad for always template %s", templ_name);
}
break;
}
case GST_PAD_SOMETIMES:
{
/* try to get the pad to see if it is already created or
* not */
GstPad *pad = gst_element_get_static_pad (element, templ_name);
if (pad) {
GST_DEBUG_OBJECT (decode_bin, "got the pad for sometimes template %s",
templ_name);
/* the pad is created, we need to autoplug it */
to_connect = g_list_prepend (to_connect, pad);
} else {
GST_DEBUG_OBJECT (decode_bin,
"did not get the sometimes pad of template %s", templ_name);
/* we have an element that will create dynamic pads */
dynamic = TRUE;
}
break;
}
case GST_PAD_REQUEST:
/* ignore request pads */
GST_DEBUG_OBJECT (decode_bin, "ignoring request padtemplate %s",
templ_name);
break;
}
}
if (dynamic) {
GST_DEBUG_OBJECT (decode_bin, "got a dynamic element here");
/* ok, this element has dynamic pads, set up the signal handlers to be
* notified of them */
dynamic_add (element, NULL, decode_bin);
}
/* Check if this is an element with more than 1 pad. If this element
* has more than 1 pad, we need to be carefull not to signal the
* no_more_pads signal after connecting the first pad. */
more = g_list_length (to_connect) > 1;
/* now loop over all the pads we need to connect */
for (pads = to_connect; pads; pads = g_list_next (pads)) {
GstPad *pad = GST_PAD_CAST (pads->data);
GstCaps *caps;
/* we have more pads if we have more than 1 pad to connect or
* dynamics. If we have only 1 pad and no dynamics, more will be
* set to FALSE and the no-more-pads signal will be fired. Note
* that this can change after the close_pad_link call. */
more |= gst_decode_bin_is_dynamic (decode_bin);
GST_DEBUG_OBJECT (decode_bin, "closing pad link for %s",
GST_OBJECT_NAME (pad));
/* continue autoplugging on the pads */
caps = gst_pad_get_caps (pad);
close_pad_link (element, pad, caps, decode_bin, more);
if (caps)
gst_caps_unref (caps);
gst_object_unref (pad);
}
g_list_free (to_connect);
}
/* this is the signal handler for the typefind element have_type signal.
* It tries to continue autoplugging on the typefind src pad */
static void
type_found (GstElement * typefind, guint probability, GstCaps * caps,
GstDecodeBin * decode_bin)
{
gboolean dynamic;
GstPad *pad;
GST_DEBUG_OBJECT (decode_bin, "typefind found caps %" GST_PTR_FORMAT, caps);
GST_OBJECT_LOCK (decode_bin);
if (decode_bin->shutting_down)
goto shutting_down;
GST_OBJECT_UNLOCK (decode_bin);
GST_STATE_LOCK (decode_bin);
if (decode_bin->shutting_down)
goto exit;
/* don't need the typefind anymore if we already found a type, we're not going
* to be able to do anything with it anyway except for generating errors */
if (decode_bin->have_type)
goto exit;
decode_bin->have_type = TRUE;
/* special-case text/plain: we only want to accept it as a raw type if it
* comes from a subtitle parser element or a demuxer, but not if it is the
* type of the entire stream, in which case we just want to error out */
if (typefind == decode_bin->typefind &&
gst_structure_has_name (gst_caps_get_structure (caps, 0), "text/plain")) {
gst_element_no_more_pads (GST_ELEMENT (decode_bin));
/* we can't handle this type of stream */
GST_ELEMENT_ERROR (decode_bin, STREAM, WRONG_TYPE,
(_("This appears to be a text file")),
("decodebin cannot decode plain text files"));
goto exit;
}
/* autoplug the new pad with the caps that the signal gave us. */
pad = gst_element_get_static_pad (typefind, "src");
close_pad_link (typefind, pad, caps, decode_bin, FALSE);
gst_object_unref (pad);
dynamic = gst_decode_bin_is_dynamic (decode_bin);
if (dynamic == FALSE) {
GST_DEBUG_OBJECT (decode_bin, "we have no dynamic elements anymore");
/* if we have no dynamic elements, we know that no new pads
* will be created and we can signal out no_more_pads signal */
gst_element_no_more_pads (GST_ELEMENT (decode_bin));
} else {
/* more dynamic elements exist that could create new pads */
GST_DEBUG_OBJECT (decode_bin, "we have more dynamic elements");
}
exit:
GST_STATE_UNLOCK (decode_bin);
return;
shutting_down:
{
GST_DEBUG_OBJECT (decode_bin, "we are shutting down");
GST_OBJECT_UNLOCK (decode_bin);
return;
}
}
static void
disconnect_unlinked_signals (GstDecodeBin * decode_bin, GstElement * element)
{
GstIterator *pad_it = NULL;
gboolean done = FALSE;
pad_it = gst_element_iterate_src_pads (element);
while (!done) {
GstPad *pad = NULL;
switch (gst_iterator_next (pad_it, (gpointer) & pad)) {
case GST_ITERATOR_OK:
g_signal_handlers_disconnect_by_func (pad, (gpointer) unlinked,
decode_bin);
gst_object_unref (pad);
break;
case GST_ITERATOR_RESYNC:
gst_iterator_resync (pad_it);
break;
default:
done = TRUE;
break;
}
}
gst_iterator_free (pad_it);
}
static void
cleanup_decodebin (GstDecodeBin * decode_bin)
{
GstIterator *elem_it = NULL, *gpad_it = NULL;
GstPad *typefind_pad = NULL;
gboolean done = FALSE;
g_return_if_fail (GST_IS_DECODE_BIN (decode_bin));
GST_DEBUG_OBJECT (decode_bin, "cleaning up decodebin");
typefind_pad = gst_element_get_static_pad (decode_bin->typefind, "src");
if (GST_IS_PAD (typefind_pad)) {
g_signal_handlers_block_by_func (typefind_pad, (gpointer) unlinked,
decode_bin);
}
elem_it = gst_bin_iterate_elements (GST_BIN (decode_bin));
while (!done) {
GstElement *element = NULL;
switch (gst_iterator_next (elem_it, (gpointer) & element)) {
case GST_ITERATOR_OK:
if (element != decode_bin->typefind && element != decode_bin->fakesink) {
GST_DEBUG_OBJECT (element, "removing autoplugged element");
disconnect_unlinked_signals (decode_bin, element);
gst_element_set_state (element, GST_STATE_NULL);
gst_bin_remove (GST_BIN (decode_bin), element);
}
gst_object_unref (element);
break;
case GST_ITERATOR_RESYNC:
gst_iterator_resync (elem_it);
break;
case GST_ITERATOR_ERROR:
done = TRUE;
break;
case GST_ITERATOR_DONE:
done = TRUE;
break;
}
}
gst_iterator_free (elem_it);
done = FALSE;
gpad_it = gst_element_iterate_pads (GST_ELEMENT (decode_bin));
while (!done) {
GstPad *pad = NULL;
switch (gst_iterator_next (gpad_it, (gpointer) & pad)) {
case GST_ITERATOR_OK:
GST_DEBUG_OBJECT (pad, "inspecting pad %s:%s",
GST_DEBUG_PAD_NAME (pad));
if (GST_IS_GHOST_PAD (pad) && GST_PAD_IS_SRC (pad)) {
GST_DEBUG_OBJECT (pad, "removing ghost pad");
gst_element_remove_pad (GST_ELEMENT (decode_bin), pad);
}
gst_object_unref (pad);
break;
case GST_ITERATOR_RESYNC:
gst_iterator_resync (gpad_it);
break;
case GST_ITERATOR_ERROR:
done = TRUE;
break;
case GST_ITERATOR_DONE:
done = TRUE;
break;
}
}
gst_iterator_free (gpad_it);
if (GST_IS_PAD (typefind_pad)) {
g_signal_handlers_unblock_by_func (typefind_pad, (gpointer) unlinked,
decode_bin);
g_signal_handlers_disconnect_by_func (typefind_pad, (gpointer) unlinked,
decode_bin);
gst_object_unref (typefind_pad);
}
}
static GstStateChangeReturn
gst_decode_bin_change_state (GstElement * element, GstStateChange transition)
{
GstStateChangeReturn ret;
GstDecodeBin *decode_bin;
decode_bin = GST_DECODE_BIN (element);
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:
decode_bin->numpads = 0;
decode_bin->numwaiting = 0;
decode_bin->dynamics = NULL;
if (decode_bin->typefind == NULL)
goto missing_typefind;
break;
case GST_STATE_CHANGE_READY_TO_PAUSED:
GST_OBJECT_LOCK (decode_bin);
decode_bin->shutting_down = FALSE;
decode_bin->have_type = FALSE;
GST_OBJECT_UNLOCK (decode_bin);
if (!add_fakesink (decode_bin))
goto missing_fakesink;
break;
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
break;
case GST_STATE_CHANGE_PAUSED_TO_READY:
GST_OBJECT_LOCK (decode_bin);
decode_bin->shutting_down = TRUE;
GST_OBJECT_UNLOCK (decode_bin);
break;
default:
break;
}
ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
if (ret == GST_STATE_CHANGE_FAILURE)
return ret;
switch (transition) {
case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
break;
case GST_STATE_CHANGE_PAUSED_TO_READY:
case GST_STATE_CHANGE_READY_TO_NULL:
free_dynamics (decode_bin);
free_pad_probes (decode_bin);
cleanup_decodebin (decode_bin);
break;
default:
break;
}
return ret;
/* ERRORS */
missing_typefind:
{
gst_element_post_message (element,
gst_missing_element_message_new (element, "typefind"));
GST_ELEMENT_ERROR (element, CORE, MISSING_PLUGIN, (NULL), ("no typefind!"));
return GST_STATE_CHANGE_FAILURE;
}
missing_fakesink:
{
gst_element_post_message (element,
gst_missing_element_message_new (element, "fakesink"));
GST_ELEMENT_ERROR (element, CORE, MISSING_PLUGIN, (NULL), ("no fakesink!"));
return GST_STATE_CHANGE_FAILURE;
}
}
static gboolean
plugin_init (GstPlugin * plugin)
{
GST_DEBUG_CATEGORY_INIT (gst_decode_bin_debug, "decodebin", 0, "decoder bin");
#ifdef ENABLE_NLS
GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE,
LOCALEDIR);
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
#endif /* ENABLE_NLS */
return gst_element_register (plugin, "decodebin", GST_RANK_NONE,
GST_TYPE_DECODE_BIN);
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"decodebin",
"decoder bin", plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME,
GST_PACKAGE_ORIGIN)
| gpl-2.0 |
mk01/linux-fslc | kernel/trace/trace_events.c | 77901 | /*
* event tracer
*
* Copyright (C) 2008 Red Hat Inc, Steven Rostedt <[email protected]>
*
* - Added format output of fields of the trace point.
* This was based off of work by Tom Zanussi <[email protected]>.
*
*/
#define pr_fmt(fmt) fmt
#include <linux/workqueue.h>
#include <linux/spinlock.h>
#include <linux/kthread.h>
#include <linux/tracefs.h>
#include <linux/uaccess.h>
#include <linux/module.h>
#include <linux/ctype.h>
#include <linux/sort.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <trace/events/sched.h>
#include <asm/setup.h>
#include "trace_output.h"
#undef TRACE_SYSTEM
#define TRACE_SYSTEM "TRACE_SYSTEM"
DEFINE_MUTEX(event_mutex);
LIST_HEAD(ftrace_events);
static LIST_HEAD(ftrace_generic_fields);
static LIST_HEAD(ftrace_common_fields);
#define GFP_TRACE (GFP_KERNEL | __GFP_ZERO)
static struct kmem_cache *field_cachep;
static struct kmem_cache *file_cachep;
static inline int system_refcount(struct event_subsystem *system)
{
return system->ref_count;
}
static int system_refcount_inc(struct event_subsystem *system)
{
return system->ref_count++;
}
static int system_refcount_dec(struct event_subsystem *system)
{
return --system->ref_count;
}
/* Double loops, do not use break, only goto's work */
#define do_for_each_event_file(tr, file) \
list_for_each_entry(tr, &ftrace_trace_arrays, list) { \
list_for_each_entry(file, &tr->events, list)
#define do_for_each_event_file_safe(tr, file) \
list_for_each_entry(tr, &ftrace_trace_arrays, list) { \
struct trace_event_file *___n; \
list_for_each_entry_safe(file, ___n, &tr->events, list)
#define while_for_each_event_file() \
}
static struct list_head *
trace_get_fields(struct trace_event_call *event_call)
{
if (!event_call->class->get_fields)
return &event_call->class->fields;
return event_call->class->get_fields(event_call);
}
static struct ftrace_event_field *
__find_event_field(struct list_head *head, char *name)
{
struct ftrace_event_field *field;
list_for_each_entry(field, head, link) {
if (!strcmp(field->name, name))
return field;
}
return NULL;
}
struct ftrace_event_field *
trace_find_event_field(struct trace_event_call *call, char *name)
{
struct ftrace_event_field *field;
struct list_head *head;
head = trace_get_fields(call);
field = __find_event_field(head, name);
if (field)
return field;
field = __find_event_field(&ftrace_generic_fields, name);
if (field)
return field;
return __find_event_field(&ftrace_common_fields, name);
}
static int __trace_define_field(struct list_head *head, const char *type,
const char *name, int offset, int size,
int is_signed, int filter_type)
{
struct ftrace_event_field *field;
field = kmem_cache_alloc(field_cachep, GFP_TRACE);
if (!field)
return -ENOMEM;
field->name = name;
field->type = type;
if (filter_type == FILTER_OTHER)
field->filter_type = filter_assign_type(type);
else
field->filter_type = filter_type;
field->offset = offset;
field->size = size;
field->is_signed = is_signed;
list_add(&field->link, head);
return 0;
}
int trace_define_field(struct trace_event_call *call, const char *type,
const char *name, int offset, int size, int is_signed,
int filter_type)
{
struct list_head *head;
if (WARN_ON(!call->class))
return 0;
head = trace_get_fields(call);
return __trace_define_field(head, type, name, offset, size,
is_signed, filter_type);
}
EXPORT_SYMBOL_GPL(trace_define_field);
#define __generic_field(type, item, filter_type) \
ret = __trace_define_field(&ftrace_generic_fields, #type, \
#item, 0, 0, is_signed_type(type), \
filter_type); \
if (ret) \
return ret;
#define __common_field(type, item) \
ret = __trace_define_field(&ftrace_common_fields, #type, \
"common_" #item, \
offsetof(typeof(ent), item), \
sizeof(ent.item), \
is_signed_type(type), FILTER_OTHER); \
if (ret) \
return ret;
static int trace_define_generic_fields(void)
{
int ret;
__generic_field(int, CPU, FILTER_CPU);
__generic_field(int, cpu, FILTER_CPU);
__generic_field(char *, COMM, FILTER_COMM);
__generic_field(char *, comm, FILTER_COMM);
return ret;
}
static int trace_define_common_fields(void)
{
int ret;
struct trace_entry ent;
__common_field(unsigned short, type);
__common_field(unsigned char, flags);
__common_field(unsigned char, preempt_count);
__common_field(int, pid);
__common_field(unsigned short, migrate_disable);
__common_field(unsigned short, padding);
return ret;
}
static void trace_destroy_fields(struct trace_event_call *call)
{
struct ftrace_event_field *field, *next;
struct list_head *head;
head = trace_get_fields(call);
list_for_each_entry_safe(field, next, head, link) {
list_del(&field->link);
kmem_cache_free(field_cachep, field);
}
}
/*
* run-time version of trace_event_get_offsets_<call>() that returns the last
* accessible offset of trace fields excluding __dynamic_array bytes
*/
int trace_event_get_offsets(struct trace_event_call *call)
{
struct ftrace_event_field *tail;
struct list_head *head;
head = trace_get_fields(call);
/*
* head->next points to the last field with the largest offset,
* since it was added last by trace_define_field()
*/
tail = list_first_entry(head, struct ftrace_event_field, link);
return tail->offset + tail->size;
}
int trace_event_raw_init(struct trace_event_call *call)
{
int id;
id = register_trace_event(&call->event);
if (!id)
return -ENODEV;
return 0;
}
EXPORT_SYMBOL_GPL(trace_event_raw_init);
bool trace_event_ignore_this_pid(struct trace_event_file *trace_file)
{
struct trace_array *tr = trace_file->tr;
struct trace_array_cpu *data;
struct trace_pid_list *pid_list;
pid_list = rcu_dereference_sched(tr->filtered_pids);
if (!pid_list)
return false;
data = this_cpu_ptr(tr->trace_buffer.data);
return data->ignore_pid;
}
EXPORT_SYMBOL_GPL(trace_event_ignore_this_pid);
void *trace_event_buffer_reserve(struct trace_event_buffer *fbuffer,
struct trace_event_file *trace_file,
unsigned long len)
{
struct trace_event_call *event_call = trace_file->event_call;
if ((trace_file->flags & EVENT_FILE_FL_PID_FILTER) &&
trace_event_ignore_this_pid(trace_file))
return NULL;
local_save_flags(fbuffer->flags);
fbuffer->pc = preempt_count();
/*
* If CONFIG_PREEMPT is enabled, then the tracepoint itself disables
* preemption (adding one to the preempt_count). Since we are
* interested in the preempt_count at the time the tracepoint was
* hit, we need to subtract one to offset the increment.
*/
if (IS_ENABLED(CONFIG_PREEMPT))
fbuffer->pc--;
fbuffer->trace_file = trace_file;
fbuffer->event =
trace_event_buffer_lock_reserve(&fbuffer->buffer, trace_file,
event_call->event.type, len,
fbuffer->flags, fbuffer->pc);
if (!fbuffer->event)
return NULL;
fbuffer->entry = ring_buffer_event_data(fbuffer->event);
return fbuffer->entry;
}
EXPORT_SYMBOL_GPL(trace_event_buffer_reserve);
static DEFINE_SPINLOCK(tracepoint_iter_lock);
static void output_printk(struct trace_event_buffer *fbuffer)
{
struct trace_event_call *event_call;
struct trace_event *event;
unsigned long flags;
struct trace_iterator *iter = tracepoint_print_iter;
if (!iter)
return;
event_call = fbuffer->trace_file->event_call;
if (!event_call || !event_call->event.funcs ||
!event_call->event.funcs->trace)
return;
event = &fbuffer->trace_file->event_call->event;
spin_lock_irqsave(&tracepoint_iter_lock, flags);
trace_seq_init(&iter->seq);
iter->ent = fbuffer->entry;
event_call->event.funcs->trace(iter, 0, event);
trace_seq_putc(&iter->seq, 0);
printk("%s", iter->seq.buffer);
spin_unlock_irqrestore(&tracepoint_iter_lock, flags);
}
void trace_event_buffer_commit(struct trace_event_buffer *fbuffer)
{
if (tracepoint_printk)
output_printk(fbuffer);
event_trigger_unlock_commit(fbuffer->trace_file, fbuffer->buffer,
fbuffer->event, fbuffer->entry,
fbuffer->flags, fbuffer->pc);
}
EXPORT_SYMBOL_GPL(trace_event_buffer_commit);
int trace_event_reg(struct trace_event_call *call,
enum trace_reg type, void *data)
{
struct trace_event_file *file = data;
WARN_ON(!(call->flags & TRACE_EVENT_FL_TRACEPOINT));
switch (type) {
case TRACE_REG_REGISTER:
return tracepoint_probe_register(call->tp,
call->class->probe,
file);
case TRACE_REG_UNREGISTER:
tracepoint_probe_unregister(call->tp,
call->class->probe,
file);
return 0;
#ifdef CONFIG_PERF_EVENTS
case TRACE_REG_PERF_REGISTER:
return tracepoint_probe_register(call->tp,
call->class->perf_probe,
call);
case TRACE_REG_PERF_UNREGISTER:
tracepoint_probe_unregister(call->tp,
call->class->perf_probe,
call);
return 0;
case TRACE_REG_PERF_OPEN:
case TRACE_REG_PERF_CLOSE:
case TRACE_REG_PERF_ADD:
case TRACE_REG_PERF_DEL:
return 0;
#endif
}
return 0;
}
EXPORT_SYMBOL_GPL(trace_event_reg);
void trace_event_enable_cmd_record(bool enable)
{
struct trace_event_file *file;
struct trace_array *tr;
mutex_lock(&event_mutex);
do_for_each_event_file(tr, file) {
if (!(file->flags & EVENT_FILE_FL_ENABLED))
continue;
if (enable) {
tracing_start_cmdline_record();
set_bit(EVENT_FILE_FL_RECORDED_CMD_BIT, &file->flags);
} else {
tracing_stop_cmdline_record();
clear_bit(EVENT_FILE_FL_RECORDED_CMD_BIT, &file->flags);
}
} while_for_each_event_file();
mutex_unlock(&event_mutex);
}
static int __ftrace_event_enable_disable(struct trace_event_file *file,
int enable, int soft_disable)
{
struct trace_event_call *call = file->event_call;
struct trace_array *tr = file->tr;
unsigned long file_flags = file->flags;
int ret = 0;
int disable;
switch (enable) {
case 0:
/*
* When soft_disable is set and enable is cleared, the sm_ref
* reference counter is decremented. If it reaches 0, we want
* to clear the SOFT_DISABLED flag but leave the event in the
* state that it was. That is, if the event was enabled and
* SOFT_DISABLED isn't set, then do nothing. But if SOFT_DISABLED
* is set we do not want the event to be enabled before we
* clear the bit.
*
* When soft_disable is not set but the SOFT_MODE flag is,
* we do nothing. Do not disable the tracepoint, otherwise
* "soft enable"s (clearing the SOFT_DISABLED bit) wont work.
*/
if (soft_disable) {
if (atomic_dec_return(&file->sm_ref) > 0)
break;
disable = file->flags & EVENT_FILE_FL_SOFT_DISABLED;
clear_bit(EVENT_FILE_FL_SOFT_MODE_BIT, &file->flags);
} else
disable = !(file->flags & EVENT_FILE_FL_SOFT_MODE);
if (disable && (file->flags & EVENT_FILE_FL_ENABLED)) {
clear_bit(EVENT_FILE_FL_ENABLED_BIT, &file->flags);
if (file->flags & EVENT_FILE_FL_RECORDED_CMD) {
tracing_stop_cmdline_record();
clear_bit(EVENT_FILE_FL_RECORDED_CMD_BIT, &file->flags);
}
call->class->reg(call, TRACE_REG_UNREGISTER, file);
}
/* If in SOFT_MODE, just set the SOFT_DISABLE_BIT, else clear it */
if (file->flags & EVENT_FILE_FL_SOFT_MODE)
set_bit(EVENT_FILE_FL_SOFT_DISABLED_BIT, &file->flags);
else
clear_bit(EVENT_FILE_FL_SOFT_DISABLED_BIT, &file->flags);
break;
case 1:
/*
* When soft_disable is set and enable is set, we want to
* register the tracepoint for the event, but leave the event
* as is. That means, if the event was already enabled, we do
* nothing (but set SOFT_MODE). If the event is disabled, we
* set SOFT_DISABLED before enabling the event tracepoint, so
* it still seems to be disabled.
*/
if (!soft_disable)
clear_bit(EVENT_FILE_FL_SOFT_DISABLED_BIT, &file->flags);
else {
if (atomic_inc_return(&file->sm_ref) > 1)
break;
set_bit(EVENT_FILE_FL_SOFT_MODE_BIT, &file->flags);
}
if (!(file->flags & EVENT_FILE_FL_ENABLED)) {
/* Keep the event disabled, when going to SOFT_MODE. */
if (soft_disable)
set_bit(EVENT_FILE_FL_SOFT_DISABLED_BIT, &file->flags);
if (tr->trace_flags & TRACE_ITER_RECORD_CMD) {
tracing_start_cmdline_record();
set_bit(EVENT_FILE_FL_RECORDED_CMD_BIT, &file->flags);
}
ret = call->class->reg(call, TRACE_REG_REGISTER, file);
if (ret) {
tracing_stop_cmdline_record();
pr_info("event trace: Could not enable event "
"%s\n", trace_event_name(call));
break;
}
set_bit(EVENT_FILE_FL_ENABLED_BIT, &file->flags);
/* WAS_ENABLED gets set but never cleared. */
call->flags |= TRACE_EVENT_FL_WAS_ENABLED;
}
break;
}
/* Enable or disable use of trace_buffered_event */
if ((file_flags & EVENT_FILE_FL_SOFT_DISABLED) !=
(file->flags & EVENT_FILE_FL_SOFT_DISABLED)) {
if (file->flags & EVENT_FILE_FL_SOFT_DISABLED)
trace_buffered_event_enable();
else
trace_buffered_event_disable();
}
return ret;
}
int trace_event_enable_disable(struct trace_event_file *file,
int enable, int soft_disable)
{
return __ftrace_event_enable_disable(file, enable, soft_disable);
}
static int ftrace_event_enable_disable(struct trace_event_file *file,
int enable)
{
return __ftrace_event_enable_disable(file, enable, 0);
}
static void ftrace_clear_events(struct trace_array *tr)
{
struct trace_event_file *file;
mutex_lock(&event_mutex);
list_for_each_entry(file, &tr->events, list) {
ftrace_event_enable_disable(file, 0);
}
mutex_unlock(&event_mutex);
}
static void
event_filter_pid_sched_process_exit(void *data, struct task_struct *task)
{
struct trace_pid_list *pid_list;
struct trace_array *tr = data;
pid_list = rcu_dereference_sched(tr->filtered_pids);
trace_filter_add_remove_task(pid_list, NULL, task);
}
static void
event_filter_pid_sched_process_fork(void *data,
struct task_struct *self,
struct task_struct *task)
{
struct trace_pid_list *pid_list;
struct trace_array *tr = data;
pid_list = rcu_dereference_sched(tr->filtered_pids);
trace_filter_add_remove_task(pid_list, self, task);
}
void trace_event_follow_fork(struct trace_array *tr, bool enable)
{
if (enable) {
register_trace_prio_sched_process_fork(event_filter_pid_sched_process_fork,
tr, INT_MIN);
register_trace_prio_sched_process_exit(event_filter_pid_sched_process_exit,
tr, INT_MAX);
} else {
unregister_trace_sched_process_fork(event_filter_pid_sched_process_fork,
tr);
unregister_trace_sched_process_exit(event_filter_pid_sched_process_exit,
tr);
}
}
static void
event_filter_pid_sched_switch_probe_pre(void *data, bool preempt,
struct task_struct *prev, struct task_struct *next)
{
struct trace_array *tr = data;
struct trace_pid_list *pid_list;
pid_list = rcu_dereference_sched(tr->filtered_pids);
this_cpu_write(tr->trace_buffer.data->ignore_pid,
trace_ignore_this_task(pid_list, prev) &&
trace_ignore_this_task(pid_list, next));
}
static void
event_filter_pid_sched_switch_probe_post(void *data, bool preempt,
struct task_struct *prev, struct task_struct *next)
{
struct trace_array *tr = data;
struct trace_pid_list *pid_list;
pid_list = rcu_dereference_sched(tr->filtered_pids);
this_cpu_write(tr->trace_buffer.data->ignore_pid,
trace_ignore_this_task(pid_list, next));
}
static void
event_filter_pid_sched_wakeup_probe_pre(void *data, struct task_struct *task)
{
struct trace_array *tr = data;
struct trace_pid_list *pid_list;
/* Nothing to do if we are already tracing */
if (!this_cpu_read(tr->trace_buffer.data->ignore_pid))
return;
pid_list = rcu_dereference_sched(tr->filtered_pids);
this_cpu_write(tr->trace_buffer.data->ignore_pid,
trace_ignore_this_task(pid_list, task));
}
static void
event_filter_pid_sched_wakeup_probe_post(void *data, struct task_struct *task)
{
struct trace_array *tr = data;
struct trace_pid_list *pid_list;
/* Nothing to do if we are not tracing */
if (this_cpu_read(tr->trace_buffer.data->ignore_pid))
return;
pid_list = rcu_dereference_sched(tr->filtered_pids);
/* Set tracing if current is enabled */
this_cpu_write(tr->trace_buffer.data->ignore_pid,
trace_ignore_this_task(pid_list, current));
}
static void __ftrace_clear_event_pids(struct trace_array *tr)
{
struct trace_pid_list *pid_list;
struct trace_event_file *file;
int cpu;
pid_list = rcu_dereference_protected(tr->filtered_pids,
lockdep_is_held(&event_mutex));
if (!pid_list)
return;
unregister_trace_sched_switch(event_filter_pid_sched_switch_probe_pre, tr);
unregister_trace_sched_switch(event_filter_pid_sched_switch_probe_post, tr);
unregister_trace_sched_wakeup(event_filter_pid_sched_wakeup_probe_pre, tr);
unregister_trace_sched_wakeup(event_filter_pid_sched_wakeup_probe_post, tr);
unregister_trace_sched_wakeup_new(event_filter_pid_sched_wakeup_probe_pre, tr);
unregister_trace_sched_wakeup_new(event_filter_pid_sched_wakeup_probe_post, tr);
unregister_trace_sched_waking(event_filter_pid_sched_wakeup_probe_pre, tr);
unregister_trace_sched_waking(event_filter_pid_sched_wakeup_probe_post, tr);
list_for_each_entry(file, &tr->events, list) {
clear_bit(EVENT_FILE_FL_PID_FILTER_BIT, &file->flags);
}
for_each_possible_cpu(cpu)
per_cpu_ptr(tr->trace_buffer.data, cpu)->ignore_pid = false;
rcu_assign_pointer(tr->filtered_pids, NULL);
/* Wait till all users are no longer using pid filtering */
synchronize_sched();
trace_free_pid_list(pid_list);
}
static void ftrace_clear_event_pids(struct trace_array *tr)
{
mutex_lock(&event_mutex);
__ftrace_clear_event_pids(tr);
mutex_unlock(&event_mutex);
}
static void __put_system(struct event_subsystem *system)
{
struct event_filter *filter = system->filter;
WARN_ON_ONCE(system_refcount(system) == 0);
if (system_refcount_dec(system))
return;
list_del(&system->list);
if (filter) {
kfree(filter->filter_string);
kfree(filter);
}
kfree_const(system->name);
kfree(system);
}
static void __get_system(struct event_subsystem *system)
{
WARN_ON_ONCE(system_refcount(system) == 0);
system_refcount_inc(system);
}
static void __get_system_dir(struct trace_subsystem_dir *dir)
{
WARN_ON_ONCE(dir->ref_count == 0);
dir->ref_count++;
__get_system(dir->subsystem);
}
static void __put_system_dir(struct trace_subsystem_dir *dir)
{
WARN_ON_ONCE(dir->ref_count == 0);
/* If the subsystem is about to be freed, the dir must be too */
WARN_ON_ONCE(system_refcount(dir->subsystem) == 1 && dir->ref_count != 1);
__put_system(dir->subsystem);
if (!--dir->ref_count)
kfree(dir);
}
static void put_system(struct trace_subsystem_dir *dir)
{
mutex_lock(&event_mutex);
__put_system_dir(dir);
mutex_unlock(&event_mutex);
}
static void remove_subsystem(struct trace_subsystem_dir *dir)
{
if (!dir)
return;
if (!--dir->nr_events) {
tracefs_remove_recursive(dir->entry);
list_del(&dir->list);
__put_system_dir(dir);
}
}
static void remove_event_file_dir(struct trace_event_file *file)
{
struct dentry *dir = file->dir;
struct dentry *child;
if (dir) {
spin_lock(&dir->d_lock); /* probably unneeded */
list_for_each_entry(child, &dir->d_subdirs, d_child) {
if (d_really_is_positive(child)) /* probably unneeded */
d_inode(child)->i_private = NULL;
}
spin_unlock(&dir->d_lock);
tracefs_remove_recursive(dir);
}
list_del(&file->list);
remove_subsystem(file->system);
free_event_filter(file->filter);
kmem_cache_free(file_cachep, file);
}
/*
* __ftrace_set_clr_event(NULL, NULL, NULL, set) will set/unset all events.
*/
static int
__ftrace_set_clr_event_nolock(struct trace_array *tr, const char *match,
const char *sub, const char *event, int set)
{
struct trace_event_file *file;
struct trace_event_call *call;
const char *name;
int ret = -EINVAL;
list_for_each_entry(file, &tr->events, list) {
call = file->event_call;
name = trace_event_name(call);
if (!name || !call->class || !call->class->reg)
continue;
if (call->flags & TRACE_EVENT_FL_IGNORE_ENABLE)
continue;
if (match &&
strcmp(match, name) != 0 &&
strcmp(match, call->class->system) != 0)
continue;
if (sub && strcmp(sub, call->class->system) != 0)
continue;
if (event && strcmp(event, name) != 0)
continue;
ftrace_event_enable_disable(file, set);
ret = 0;
}
return ret;
}
static int __ftrace_set_clr_event(struct trace_array *tr, const char *match,
const char *sub, const char *event, int set)
{
int ret;
mutex_lock(&event_mutex);
ret = __ftrace_set_clr_event_nolock(tr, match, sub, event, set);
mutex_unlock(&event_mutex);
return ret;
}
static int ftrace_set_clr_event(struct trace_array *tr, char *buf, int set)
{
char *event = NULL, *sub = NULL, *match;
int ret;
/*
* The buf format can be <subsystem>:<event-name>
* *:<event-name> means any event by that name.
* :<event-name> is the same.
*
* <subsystem>:* means all events in that subsystem
* <subsystem>: means the same.
*
* <name> (no ':') means all events in a subsystem with
* the name <name> or any event that matches <name>
*/
match = strsep(&buf, ":");
if (buf) {
sub = match;
event = buf;
match = NULL;
if (!strlen(sub) || strcmp(sub, "*") == 0)
sub = NULL;
if (!strlen(event) || strcmp(event, "*") == 0)
event = NULL;
}
ret = __ftrace_set_clr_event(tr, match, sub, event, set);
/* Put back the colon to allow this to be called again */
if (buf)
*(buf - 1) = ':';
return ret;
}
/**
* trace_set_clr_event - enable or disable an event
* @system: system name to match (NULL for any system)
* @event: event name to match (NULL for all events, within system)
* @set: 1 to enable, 0 to disable
*
* This is a way for other parts of the kernel to enable or disable
* event recording.
*
* Returns 0 on success, -EINVAL if the parameters do not match any
* registered events.
*/
int trace_set_clr_event(const char *system, const char *event, int set)
{
struct trace_array *tr = top_trace_array();
if (!tr)
return -ENODEV;
return __ftrace_set_clr_event(tr, NULL, system, event, set);
}
EXPORT_SYMBOL_GPL(trace_set_clr_event);
/* 128 should be much more than enough */
#define EVENT_BUF_SIZE 127
static ssize_t
ftrace_event_write(struct file *file, const char __user *ubuf,
size_t cnt, loff_t *ppos)
{
struct trace_parser parser;
struct seq_file *m = file->private_data;
struct trace_array *tr = m->private;
ssize_t read, ret;
if (!cnt)
return 0;
ret = tracing_update_buffers();
if (ret < 0)
return ret;
if (trace_parser_get_init(&parser, EVENT_BUF_SIZE + 1))
return -ENOMEM;
read = trace_get_user(&parser, ubuf, cnt, ppos);
if (read >= 0 && trace_parser_loaded((&parser))) {
int set = 1;
if (*parser.buffer == '!')
set = 0;
parser.buffer[parser.idx] = 0;
ret = ftrace_set_clr_event(tr, parser.buffer + !set, set);
if (ret)
goto out_put;
}
ret = read;
out_put:
trace_parser_put(&parser);
return ret;
}
static void *
t_next(struct seq_file *m, void *v, loff_t *pos)
{
struct trace_event_file *file = v;
struct trace_event_call *call;
struct trace_array *tr = m->private;
(*pos)++;
list_for_each_entry_continue(file, &tr->events, list) {
call = file->event_call;
/*
* The ftrace subsystem is for showing formats only.
* They can not be enabled or disabled via the event files.
*/
if (call->class && call->class->reg &&
!(call->flags & TRACE_EVENT_FL_IGNORE_ENABLE))
return file;
}
return NULL;
}
static void *t_start(struct seq_file *m, loff_t *pos)
{
struct trace_event_file *file;
struct trace_array *tr = m->private;
loff_t l;
mutex_lock(&event_mutex);
file = list_entry(&tr->events, struct trace_event_file, list);
for (l = 0; l <= *pos; ) {
file = t_next(m, file, &l);
if (!file)
break;
}
return file;
}
static void *
s_next(struct seq_file *m, void *v, loff_t *pos)
{
struct trace_event_file *file = v;
struct trace_array *tr = m->private;
(*pos)++;
list_for_each_entry_continue(file, &tr->events, list) {
if (file->flags & EVENT_FILE_FL_ENABLED)
return file;
}
return NULL;
}
static void *s_start(struct seq_file *m, loff_t *pos)
{
struct trace_event_file *file;
struct trace_array *tr = m->private;
loff_t l;
mutex_lock(&event_mutex);
file = list_entry(&tr->events, struct trace_event_file, list);
for (l = 0; l <= *pos; ) {
file = s_next(m, file, &l);
if (!file)
break;
}
return file;
}
static int t_show(struct seq_file *m, void *v)
{
struct trace_event_file *file = v;
struct trace_event_call *call = file->event_call;
if (strcmp(call->class->system, TRACE_SYSTEM) != 0)
seq_printf(m, "%s:", call->class->system);
seq_printf(m, "%s\n", trace_event_name(call));
return 0;
}
static void t_stop(struct seq_file *m, void *p)
{
mutex_unlock(&event_mutex);
}
static void *
p_next(struct seq_file *m, void *v, loff_t *pos)
{
struct trace_array *tr = m->private;
struct trace_pid_list *pid_list = rcu_dereference_sched(tr->filtered_pids);
return trace_pid_next(pid_list, v, pos);
}
static void *p_start(struct seq_file *m, loff_t *pos)
__acquires(RCU)
{
struct trace_pid_list *pid_list;
struct trace_array *tr = m->private;
/*
* Grab the mutex, to keep calls to p_next() having the same
* tr->filtered_pids as p_start() has.
* If we just passed the tr->filtered_pids around, then RCU would
* have been enough, but doing that makes things more complex.
*/
mutex_lock(&event_mutex);
rcu_read_lock_sched();
pid_list = rcu_dereference_sched(tr->filtered_pids);
if (!pid_list)
return NULL;
return trace_pid_start(pid_list, pos);
}
static void p_stop(struct seq_file *m, void *p)
__releases(RCU)
{
rcu_read_unlock_sched();
mutex_unlock(&event_mutex);
}
static ssize_t
event_enable_read(struct file *filp, char __user *ubuf, size_t cnt,
loff_t *ppos)
{
struct trace_event_file *file;
unsigned long flags;
char buf[4] = "0";
mutex_lock(&event_mutex);
file = event_file_data(filp);
if (likely(file))
flags = file->flags;
mutex_unlock(&event_mutex);
if (!file)
return -ENODEV;
if (flags & EVENT_FILE_FL_ENABLED &&
!(flags & EVENT_FILE_FL_SOFT_DISABLED))
strcpy(buf, "1");
if (flags & EVENT_FILE_FL_SOFT_DISABLED ||
flags & EVENT_FILE_FL_SOFT_MODE)
strcat(buf, "*");
strcat(buf, "\n");
return simple_read_from_buffer(ubuf, cnt, ppos, buf, strlen(buf));
}
static ssize_t
event_enable_write(struct file *filp, const char __user *ubuf, size_t cnt,
loff_t *ppos)
{
struct trace_event_file *file;
unsigned long val;
int ret;
ret = kstrtoul_from_user(ubuf, cnt, 10, &val);
if (ret)
return ret;
ret = tracing_update_buffers();
if (ret < 0)
return ret;
switch (val) {
case 0:
case 1:
ret = -ENODEV;
mutex_lock(&event_mutex);
file = event_file_data(filp);
if (likely(file))
ret = ftrace_event_enable_disable(file, val);
mutex_unlock(&event_mutex);
break;
default:
return -EINVAL;
}
*ppos += cnt;
return ret ? ret : cnt;
}
static ssize_t
system_enable_read(struct file *filp, char __user *ubuf, size_t cnt,
loff_t *ppos)
{
const char set_to_char[4] = { '?', '0', '1', 'X' };
struct trace_subsystem_dir *dir = filp->private_data;
struct event_subsystem *system = dir->subsystem;
struct trace_event_call *call;
struct trace_event_file *file;
struct trace_array *tr = dir->tr;
char buf[2];
int set = 0;
int ret;
mutex_lock(&event_mutex);
list_for_each_entry(file, &tr->events, list) {
call = file->event_call;
if (!trace_event_name(call) || !call->class || !call->class->reg)
continue;
if (system && strcmp(call->class->system, system->name) != 0)
continue;
/*
* We need to find out if all the events are set
* or if all events or cleared, or if we have
* a mixture.
*/
set |= (1 << !!(file->flags & EVENT_FILE_FL_ENABLED));
/*
* If we have a mixture, no need to look further.
*/
if (set == 3)
break;
}
mutex_unlock(&event_mutex);
buf[0] = set_to_char[set];
buf[1] = '\n';
ret = simple_read_from_buffer(ubuf, cnt, ppos, buf, 2);
return ret;
}
static ssize_t
system_enable_write(struct file *filp, const char __user *ubuf, size_t cnt,
loff_t *ppos)
{
struct trace_subsystem_dir *dir = filp->private_data;
struct event_subsystem *system = dir->subsystem;
const char *name = NULL;
unsigned long val;
ssize_t ret;
ret = kstrtoul_from_user(ubuf, cnt, 10, &val);
if (ret)
return ret;
ret = tracing_update_buffers();
if (ret < 0)
return ret;
if (val != 0 && val != 1)
return -EINVAL;
/*
* Opening of "enable" adds a ref count to system,
* so the name is safe to use.
*/
if (system)
name = system->name;
ret = __ftrace_set_clr_event(dir->tr, NULL, name, NULL, val);
if (ret)
goto out;
ret = cnt;
out:
*ppos += cnt;
return ret;
}
enum {
FORMAT_HEADER = 1,
FORMAT_FIELD_SEPERATOR = 2,
FORMAT_PRINTFMT = 3,
};
static void *f_next(struct seq_file *m, void *v, loff_t *pos)
{
struct trace_event_call *call = event_file_data(m->private);
struct list_head *common_head = &ftrace_common_fields;
struct list_head *head = trace_get_fields(call);
struct list_head *node = v;
(*pos)++;
switch ((unsigned long)v) {
case FORMAT_HEADER:
node = common_head;
break;
case FORMAT_FIELD_SEPERATOR:
node = head;
break;
case FORMAT_PRINTFMT:
/* all done */
return NULL;
}
node = node->prev;
if (node == common_head)
return (void *)FORMAT_FIELD_SEPERATOR;
else if (node == head)
return (void *)FORMAT_PRINTFMT;
else
return node;
}
static int f_show(struct seq_file *m, void *v)
{
struct trace_event_call *call = event_file_data(m->private);
struct ftrace_event_field *field;
const char *array_descriptor;
switch ((unsigned long)v) {
case FORMAT_HEADER:
seq_printf(m, "name: %s\n", trace_event_name(call));
seq_printf(m, "ID: %d\n", call->event.type);
seq_puts(m, "format:\n");
return 0;
case FORMAT_FIELD_SEPERATOR:
seq_putc(m, '\n');
return 0;
case FORMAT_PRINTFMT:
seq_printf(m, "\nprint fmt: %s\n",
call->print_fmt);
return 0;
}
field = list_entry(v, struct ftrace_event_field, link);
/*
* Smartly shows the array type(except dynamic array).
* Normal:
* field:TYPE VAR
* If TYPE := TYPE[LEN], it is shown:
* field:TYPE VAR[LEN]
*/
array_descriptor = strchr(field->type, '[');
if (!strncmp(field->type, "__data_loc", 10))
array_descriptor = NULL;
if (!array_descriptor)
seq_printf(m, "\tfield:%s %s;\toffset:%u;\tsize:%u;\tsigned:%d;\n",
field->type, field->name, field->offset,
field->size, !!field->is_signed);
else
seq_printf(m, "\tfield:%.*s %s%s;\toffset:%u;\tsize:%u;\tsigned:%d;\n",
(int)(array_descriptor - field->type),
field->type, field->name,
array_descriptor, field->offset,
field->size, !!field->is_signed);
return 0;
}
static void *f_start(struct seq_file *m, loff_t *pos)
{
void *p = (void *)FORMAT_HEADER;
loff_t l = 0;
/* ->stop() is called even if ->start() fails */
mutex_lock(&event_mutex);
if (!event_file_data(m->private))
return ERR_PTR(-ENODEV);
while (l < *pos && p)
p = f_next(m, p, &l);
return p;
}
static void f_stop(struct seq_file *m, void *p)
{
mutex_unlock(&event_mutex);
}
static const struct seq_operations trace_format_seq_ops = {
.start = f_start,
.next = f_next,
.stop = f_stop,
.show = f_show,
};
static int trace_format_open(struct inode *inode, struct file *file)
{
struct seq_file *m;
int ret;
ret = seq_open(file, &trace_format_seq_ops);
if (ret < 0)
return ret;
m = file->private_data;
m->private = file;
return 0;
}
static ssize_t
event_id_read(struct file *filp, char __user *ubuf, size_t cnt, loff_t *ppos)
{
int id = (long)event_file_data(filp);
char buf[32];
int len;
if (*ppos)
return 0;
if (unlikely(!id))
return -ENODEV;
len = sprintf(buf, "%d\n", id);
return simple_read_from_buffer(ubuf, cnt, ppos, buf, len);
}
static ssize_t
event_filter_read(struct file *filp, char __user *ubuf, size_t cnt,
loff_t *ppos)
{
struct trace_event_file *file;
struct trace_seq *s;
int r = -ENODEV;
if (*ppos)
return 0;
s = kmalloc(sizeof(*s), GFP_KERNEL);
if (!s)
return -ENOMEM;
trace_seq_init(s);
mutex_lock(&event_mutex);
file = event_file_data(filp);
if (file)
print_event_filter(file, s);
mutex_unlock(&event_mutex);
if (file)
r = simple_read_from_buffer(ubuf, cnt, ppos,
s->buffer, trace_seq_used(s));
kfree(s);
return r;
}
static ssize_t
event_filter_write(struct file *filp, const char __user *ubuf, size_t cnt,
loff_t *ppos)
{
struct trace_event_file *file;
char *buf;
int err = -ENODEV;
if (cnt >= PAGE_SIZE)
return -EINVAL;
buf = memdup_user_nul(ubuf, cnt);
if (IS_ERR(buf))
return PTR_ERR(buf);
mutex_lock(&event_mutex);
file = event_file_data(filp);
if (file)
err = apply_event_filter(file, buf);
mutex_unlock(&event_mutex);
kfree(buf);
if (err < 0)
return err;
*ppos += cnt;
return cnt;
}
static LIST_HEAD(event_subsystems);
static int subsystem_open(struct inode *inode, struct file *filp)
{
struct event_subsystem *system = NULL;
struct trace_subsystem_dir *dir = NULL; /* Initialize for gcc */
struct trace_array *tr;
int ret;
if (tracing_is_disabled())
return -ENODEV;
/* Make sure the system still exists */
mutex_lock(&trace_types_lock);
mutex_lock(&event_mutex);
list_for_each_entry(tr, &ftrace_trace_arrays, list) {
list_for_each_entry(dir, &tr->systems, list) {
if (dir == inode->i_private) {
/* Don't open systems with no events */
if (dir->nr_events) {
__get_system_dir(dir);
system = dir->subsystem;
}
goto exit_loop;
}
}
}
exit_loop:
mutex_unlock(&event_mutex);
mutex_unlock(&trace_types_lock);
if (!system)
return -ENODEV;
/* Some versions of gcc think dir can be uninitialized here */
WARN_ON(!dir);
/* Still need to increment the ref count of the system */
if (trace_array_get(tr) < 0) {
put_system(dir);
return -ENODEV;
}
ret = tracing_open_generic(inode, filp);
if (ret < 0) {
trace_array_put(tr);
put_system(dir);
}
return ret;
}
static int system_tr_open(struct inode *inode, struct file *filp)
{
struct trace_subsystem_dir *dir;
struct trace_array *tr = inode->i_private;
int ret;
if (tracing_is_disabled())
return -ENODEV;
if (trace_array_get(tr) < 0)
return -ENODEV;
/* Make a temporary dir that has no system but points to tr */
dir = kzalloc(sizeof(*dir), GFP_KERNEL);
if (!dir) {
trace_array_put(tr);
return -ENOMEM;
}
dir->tr = tr;
ret = tracing_open_generic(inode, filp);
if (ret < 0) {
trace_array_put(tr);
kfree(dir);
return ret;
}
filp->private_data = dir;
return 0;
}
static int subsystem_release(struct inode *inode, struct file *file)
{
struct trace_subsystem_dir *dir = file->private_data;
trace_array_put(dir->tr);
/*
* If dir->subsystem is NULL, then this is a temporary
* descriptor that was made for a trace_array to enable
* all subsystems.
*/
if (dir->subsystem)
put_system(dir);
else
kfree(dir);
return 0;
}
static ssize_t
subsystem_filter_read(struct file *filp, char __user *ubuf, size_t cnt,
loff_t *ppos)
{
struct trace_subsystem_dir *dir = filp->private_data;
struct event_subsystem *system = dir->subsystem;
struct trace_seq *s;
int r;
if (*ppos)
return 0;
s = kmalloc(sizeof(*s), GFP_KERNEL);
if (!s)
return -ENOMEM;
trace_seq_init(s);
print_subsystem_event_filter(system, s);
r = simple_read_from_buffer(ubuf, cnt, ppos,
s->buffer, trace_seq_used(s));
kfree(s);
return r;
}
static ssize_t
subsystem_filter_write(struct file *filp, const char __user *ubuf, size_t cnt,
loff_t *ppos)
{
struct trace_subsystem_dir *dir = filp->private_data;
char *buf;
int err;
if (cnt >= PAGE_SIZE)
return -EINVAL;
buf = memdup_user_nul(ubuf, cnt);
if (IS_ERR(buf))
return PTR_ERR(buf);
err = apply_subsystem_event_filter(dir, buf);
kfree(buf);
if (err < 0)
return err;
*ppos += cnt;
return cnt;
}
static ssize_t
show_header(struct file *filp, char __user *ubuf, size_t cnt, loff_t *ppos)
{
int (*func)(struct trace_seq *s) = filp->private_data;
struct trace_seq *s;
int r;
if (*ppos)
return 0;
s = kmalloc(sizeof(*s), GFP_KERNEL);
if (!s)
return -ENOMEM;
trace_seq_init(s);
func(s);
r = simple_read_from_buffer(ubuf, cnt, ppos,
s->buffer, trace_seq_used(s));
kfree(s);
return r;
}
static void ignore_task_cpu(void *data)
{
struct trace_array *tr = data;
struct trace_pid_list *pid_list;
/*
* This function is called by on_each_cpu() while the
* event_mutex is held.
*/
pid_list = rcu_dereference_protected(tr->filtered_pids,
mutex_is_locked(&event_mutex));
this_cpu_write(tr->trace_buffer.data->ignore_pid,
trace_ignore_this_task(pid_list, current));
}
static ssize_t
ftrace_event_pid_write(struct file *filp, const char __user *ubuf,
size_t cnt, loff_t *ppos)
{
struct seq_file *m = filp->private_data;
struct trace_array *tr = m->private;
struct trace_pid_list *filtered_pids = NULL;
struct trace_pid_list *pid_list;
struct trace_event_file *file;
ssize_t ret;
if (!cnt)
return 0;
ret = tracing_update_buffers();
if (ret < 0)
return ret;
mutex_lock(&event_mutex);
filtered_pids = rcu_dereference_protected(tr->filtered_pids,
lockdep_is_held(&event_mutex));
ret = trace_pid_write(filtered_pids, &pid_list, ubuf, cnt);
if (ret < 0)
goto out;
rcu_assign_pointer(tr->filtered_pids, pid_list);
list_for_each_entry(file, &tr->events, list) {
set_bit(EVENT_FILE_FL_PID_FILTER_BIT, &file->flags);
}
if (filtered_pids) {
synchronize_sched();
trace_free_pid_list(filtered_pids);
} else if (pid_list) {
/*
* Register a probe that is called before all other probes
* to set ignore_pid if next or prev do not match.
* Register a probe this is called after all other probes
* to only keep ignore_pid set if next pid matches.
*/
register_trace_prio_sched_switch(event_filter_pid_sched_switch_probe_pre,
tr, INT_MAX);
register_trace_prio_sched_switch(event_filter_pid_sched_switch_probe_post,
tr, 0);
register_trace_prio_sched_wakeup(event_filter_pid_sched_wakeup_probe_pre,
tr, INT_MAX);
register_trace_prio_sched_wakeup(event_filter_pid_sched_wakeup_probe_post,
tr, 0);
register_trace_prio_sched_wakeup_new(event_filter_pid_sched_wakeup_probe_pre,
tr, INT_MAX);
register_trace_prio_sched_wakeup_new(event_filter_pid_sched_wakeup_probe_post,
tr, 0);
register_trace_prio_sched_waking(event_filter_pid_sched_wakeup_probe_pre,
tr, INT_MAX);
register_trace_prio_sched_waking(event_filter_pid_sched_wakeup_probe_post,
tr, 0);
}
/*
* Ignoring of pids is done at task switch. But we have to
* check for those tasks that are currently running.
* Always do this in case a pid was appended or removed.
*/
on_each_cpu(ignore_task_cpu, tr, 1);
out:
mutex_unlock(&event_mutex);
if (ret > 0)
*ppos += ret;
return ret;
}
static int ftrace_event_avail_open(struct inode *inode, struct file *file);
static int ftrace_event_set_open(struct inode *inode, struct file *file);
static int ftrace_event_set_pid_open(struct inode *inode, struct file *file);
static int ftrace_event_release(struct inode *inode, struct file *file);
static const struct seq_operations show_event_seq_ops = {
.start = t_start,
.next = t_next,
.show = t_show,
.stop = t_stop,
};
static const struct seq_operations show_set_event_seq_ops = {
.start = s_start,
.next = s_next,
.show = t_show,
.stop = t_stop,
};
static const struct seq_operations show_set_pid_seq_ops = {
.start = p_start,
.next = p_next,
.show = trace_pid_show,
.stop = p_stop,
};
static const struct file_operations ftrace_avail_fops = {
.open = ftrace_event_avail_open,
.read = seq_read,
.llseek = seq_lseek,
.release = seq_release,
};
static const struct file_operations ftrace_set_event_fops = {
.open = ftrace_event_set_open,
.read = seq_read,
.write = ftrace_event_write,
.llseek = seq_lseek,
.release = ftrace_event_release,
};
static const struct file_operations ftrace_set_event_pid_fops = {
.open = ftrace_event_set_pid_open,
.read = seq_read,
.write = ftrace_event_pid_write,
.llseek = seq_lseek,
.release = ftrace_event_release,
};
static const struct file_operations ftrace_enable_fops = {
.open = tracing_open_generic,
.read = event_enable_read,
.write = event_enable_write,
.llseek = default_llseek,
};
static const struct file_operations ftrace_event_format_fops = {
.open = trace_format_open,
.read = seq_read,
.llseek = seq_lseek,
.release = seq_release,
};
static const struct file_operations ftrace_event_id_fops = {
.read = event_id_read,
.llseek = default_llseek,
};
static const struct file_operations ftrace_event_filter_fops = {
.open = tracing_open_generic,
.read = event_filter_read,
.write = event_filter_write,
.llseek = default_llseek,
};
static const struct file_operations ftrace_subsystem_filter_fops = {
.open = subsystem_open,
.read = subsystem_filter_read,
.write = subsystem_filter_write,
.llseek = default_llseek,
.release = subsystem_release,
};
static const struct file_operations ftrace_system_enable_fops = {
.open = subsystem_open,
.read = system_enable_read,
.write = system_enable_write,
.llseek = default_llseek,
.release = subsystem_release,
};
static const struct file_operations ftrace_tr_enable_fops = {
.open = system_tr_open,
.read = system_enable_read,
.write = system_enable_write,
.llseek = default_llseek,
.release = subsystem_release,
};
static const struct file_operations ftrace_show_header_fops = {
.open = tracing_open_generic,
.read = show_header,
.llseek = default_llseek,
};
static int
ftrace_event_open(struct inode *inode, struct file *file,
const struct seq_operations *seq_ops)
{
struct seq_file *m;
int ret;
ret = seq_open(file, seq_ops);
if (ret < 0)
return ret;
m = file->private_data;
/* copy tr over to seq ops */
m->private = inode->i_private;
return ret;
}
static int ftrace_event_release(struct inode *inode, struct file *file)
{
struct trace_array *tr = inode->i_private;
trace_array_put(tr);
return seq_release(inode, file);
}
static int
ftrace_event_avail_open(struct inode *inode, struct file *file)
{
const struct seq_operations *seq_ops = &show_event_seq_ops;
return ftrace_event_open(inode, file, seq_ops);
}
static int
ftrace_event_set_open(struct inode *inode, struct file *file)
{
const struct seq_operations *seq_ops = &show_set_event_seq_ops;
struct trace_array *tr = inode->i_private;
int ret;
if (trace_array_get(tr) < 0)
return -ENODEV;
if ((file->f_mode & FMODE_WRITE) &&
(file->f_flags & O_TRUNC))
ftrace_clear_events(tr);
ret = ftrace_event_open(inode, file, seq_ops);
if (ret < 0)
trace_array_put(tr);
return ret;
}
static int
ftrace_event_set_pid_open(struct inode *inode, struct file *file)
{
const struct seq_operations *seq_ops = &show_set_pid_seq_ops;
struct trace_array *tr = inode->i_private;
int ret;
if (trace_array_get(tr) < 0)
return -ENODEV;
if ((file->f_mode & FMODE_WRITE) &&
(file->f_flags & O_TRUNC))
ftrace_clear_event_pids(tr);
ret = ftrace_event_open(inode, file, seq_ops);
if (ret < 0)
trace_array_put(tr);
return ret;
}
static struct event_subsystem *
create_new_subsystem(const char *name)
{
struct event_subsystem *system;
/* need to create new entry */
system = kmalloc(sizeof(*system), GFP_KERNEL);
if (!system)
return NULL;
system->ref_count = 1;
/* Only allocate if dynamic (kprobes and modules) */
system->name = kstrdup_const(name, GFP_KERNEL);
if (!system->name)
goto out_free;
system->filter = NULL;
system->filter = kzalloc(sizeof(struct event_filter), GFP_KERNEL);
if (!system->filter)
goto out_free;
list_add(&system->list, &event_subsystems);
return system;
out_free:
kfree_const(system->name);
kfree(system);
return NULL;
}
static struct dentry *
event_subsystem_dir(struct trace_array *tr, const char *name,
struct trace_event_file *file, struct dentry *parent)
{
struct trace_subsystem_dir *dir;
struct event_subsystem *system;
struct dentry *entry;
/* First see if we did not already create this dir */
list_for_each_entry(dir, &tr->systems, list) {
system = dir->subsystem;
if (strcmp(system->name, name) == 0) {
dir->nr_events++;
file->system = dir;
return dir->entry;
}
}
/* Now see if the system itself exists. */
list_for_each_entry(system, &event_subsystems, list) {
if (strcmp(system->name, name) == 0)
break;
}
/* Reset system variable when not found */
if (&system->list == &event_subsystems)
system = NULL;
dir = kmalloc(sizeof(*dir), GFP_KERNEL);
if (!dir)
goto out_fail;
if (!system) {
system = create_new_subsystem(name);
if (!system)
goto out_free;
} else
__get_system(system);
dir->entry = tracefs_create_dir(name, parent);
if (!dir->entry) {
pr_warn("Failed to create system directory %s\n", name);
__put_system(system);
goto out_free;
}
dir->tr = tr;
dir->ref_count = 1;
dir->nr_events = 1;
dir->subsystem = system;
file->system = dir;
entry = tracefs_create_file("filter", 0644, dir->entry, dir,
&ftrace_subsystem_filter_fops);
if (!entry) {
kfree(system->filter);
system->filter = NULL;
pr_warn("Could not create tracefs '%s/filter' entry\n", name);
}
trace_create_file("enable", 0644, dir->entry, dir,
&ftrace_system_enable_fops);
list_add(&dir->list, &tr->systems);
return dir->entry;
out_free:
kfree(dir);
out_fail:
/* Only print this message if failed on memory allocation */
if (!dir || !system)
pr_warn("No memory to create event subsystem %s\n", name);
return NULL;
}
static int
event_create_dir(struct dentry *parent, struct trace_event_file *file)
{
struct trace_event_call *call = file->event_call;
struct trace_array *tr = file->tr;
struct list_head *head;
struct dentry *d_events;
const char *name;
int ret;
/*
* If the trace point header did not define TRACE_SYSTEM
* then the system would be called "TRACE_SYSTEM".
*/
if (strcmp(call->class->system, TRACE_SYSTEM) != 0) {
d_events = event_subsystem_dir(tr, call->class->system, file, parent);
if (!d_events)
return -ENOMEM;
} else
d_events = parent;
name = trace_event_name(call);
file->dir = tracefs_create_dir(name, d_events);
if (!file->dir) {
pr_warn("Could not create tracefs '%s' directory\n", name);
return -1;
}
if (call->class->reg && !(call->flags & TRACE_EVENT_FL_IGNORE_ENABLE))
trace_create_file("enable", 0644, file->dir, file,
&ftrace_enable_fops);
#ifdef CONFIG_PERF_EVENTS
if (call->event.type && call->class->reg)
trace_create_file("id", 0444, file->dir,
(void *)(long)call->event.type,
&ftrace_event_id_fops);
#endif
/*
* Other events may have the same class. Only update
* the fields if they are not already defined.
*/
head = trace_get_fields(call);
if (list_empty(head)) {
ret = call->class->define_fields(call);
if (ret < 0) {
pr_warn("Could not initialize trace point events/%s\n",
name);
return -1;
}
}
trace_create_file("filter", 0644, file->dir, file,
&ftrace_event_filter_fops);
/*
* Only event directories that can be enabled should have
* triggers.
*/
if (!(call->flags & TRACE_EVENT_FL_IGNORE_ENABLE))
trace_create_file("trigger", 0644, file->dir, file,
&event_trigger_fops);
#ifdef CONFIG_HIST_TRIGGERS
trace_create_file("hist", 0444, file->dir, file,
&event_hist_fops);
#endif
trace_create_file("format", 0444, file->dir, call,
&ftrace_event_format_fops);
return 0;
}
static void remove_event_from_tracers(struct trace_event_call *call)
{
struct trace_event_file *file;
struct trace_array *tr;
do_for_each_event_file_safe(tr, file) {
if (file->event_call != call)
continue;
remove_event_file_dir(file);
/*
* The do_for_each_event_file_safe() is
* a double loop. After finding the call for this
* trace_array, we use break to jump to the next
* trace_array.
*/
break;
} while_for_each_event_file();
}
static void event_remove(struct trace_event_call *call)
{
struct trace_array *tr;
struct trace_event_file *file;
do_for_each_event_file(tr, file) {
if (file->event_call != call)
continue;
ftrace_event_enable_disable(file, 0);
/*
* The do_for_each_event_file() is
* a double loop. After finding the call for this
* trace_array, we use break to jump to the next
* trace_array.
*/
break;
} while_for_each_event_file();
if (call->event.funcs)
__unregister_trace_event(&call->event);
remove_event_from_tracers(call);
list_del(&call->list);
}
static int event_init(struct trace_event_call *call)
{
int ret = 0;
const char *name;
name = trace_event_name(call);
if (WARN_ON(!name))
return -EINVAL;
if (call->class->raw_init) {
ret = call->class->raw_init(call);
if (ret < 0 && ret != -ENOSYS)
pr_warn("Could not initialize trace events/%s\n", name);
}
return ret;
}
static int
__register_event(struct trace_event_call *call, struct module *mod)
{
int ret;
ret = event_init(call);
if (ret < 0)
return ret;
list_add(&call->list, &ftrace_events);
call->mod = mod;
return 0;
}
static char *enum_replace(char *ptr, struct trace_enum_map *map, int len)
{
int rlen;
int elen;
/* Find the length of the enum value as a string */
elen = snprintf(ptr, 0, "%ld", map->enum_value);
/* Make sure there's enough room to replace the string with the value */
if (len < elen)
return NULL;
snprintf(ptr, elen + 1, "%ld", map->enum_value);
/* Get the rest of the string of ptr */
rlen = strlen(ptr + len);
memmove(ptr + elen, ptr + len, rlen);
/* Make sure we end the new string */
ptr[elen + rlen] = 0;
return ptr + elen;
}
static void update_event_printk(struct trace_event_call *call,
struct trace_enum_map *map)
{
char *ptr;
int quote = 0;
int len = strlen(map->enum_string);
for (ptr = call->print_fmt; *ptr; ptr++) {
if (*ptr == '\\') {
ptr++;
/* paranoid */
if (!*ptr)
break;
continue;
}
if (*ptr == '"') {
quote ^= 1;
continue;
}
if (quote)
continue;
if (isdigit(*ptr)) {
/* skip numbers */
do {
ptr++;
/* Check for alpha chars like ULL */
} while (isalnum(*ptr));
if (!*ptr)
break;
/*
* A number must have some kind of delimiter after
* it, and we can ignore that too.
*/
continue;
}
if (isalpha(*ptr) || *ptr == '_') {
if (strncmp(map->enum_string, ptr, len) == 0 &&
!isalnum(ptr[len]) && ptr[len] != '_') {
ptr = enum_replace(ptr, map, len);
/* Hmm, enum string smaller than value */
if (WARN_ON_ONCE(!ptr))
return;
/*
* No need to decrement here, as enum_replace()
* returns the pointer to the character passed
* the enum, and two enums can not be placed
* back to back without something in between.
* We can skip that something in between.
*/
continue;
}
skip_more:
do {
ptr++;
} while (isalnum(*ptr) || *ptr == '_');
if (!*ptr)
break;
/*
* If what comes after this variable is a '.' or
* '->' then we can continue to ignore that string.
*/
if (*ptr == '.' || (ptr[0] == '-' && ptr[1] == '>')) {
ptr += *ptr == '.' ? 1 : 2;
if (!*ptr)
break;
goto skip_more;
}
/*
* Once again, we can skip the delimiter that came
* after the string.
*/
continue;
}
}
}
void trace_event_enum_update(struct trace_enum_map **map, int len)
{
struct trace_event_call *call, *p;
const char *last_system = NULL;
int last_i;
int i;
down_write(&trace_event_sem);
list_for_each_entry_safe(call, p, &ftrace_events, list) {
/* events are usually grouped together with systems */
if (!last_system || call->class->system != last_system) {
last_i = 0;
last_system = call->class->system;
}
for (i = last_i; i < len; i++) {
if (call->class->system == map[i]->system) {
/* Save the first system if need be */
if (!last_i)
last_i = i;
update_event_printk(call, map[i]);
}
}
}
up_write(&trace_event_sem);
}
static struct trace_event_file *
trace_create_new_event(struct trace_event_call *call,
struct trace_array *tr)
{
struct trace_event_file *file;
file = kmem_cache_alloc(file_cachep, GFP_TRACE);
if (!file)
return NULL;
file->event_call = call;
file->tr = tr;
atomic_set(&file->sm_ref, 0);
atomic_set(&file->tm_ref, 0);
INIT_LIST_HEAD(&file->triggers);
list_add(&file->list, &tr->events);
return file;
}
/* Add an event to a trace directory */
static int
__trace_add_new_event(struct trace_event_call *call, struct trace_array *tr)
{
struct trace_event_file *file;
file = trace_create_new_event(call, tr);
if (!file)
return -ENOMEM;
return event_create_dir(tr->event_dir, file);
}
/*
* Just create a decriptor for early init. A descriptor is required
* for enabling events at boot. We want to enable events before
* the filesystem is initialized.
*/
static __init int
__trace_early_add_new_event(struct trace_event_call *call,
struct trace_array *tr)
{
struct trace_event_file *file;
file = trace_create_new_event(call, tr);
if (!file)
return -ENOMEM;
return 0;
}
struct ftrace_module_file_ops;
static void __add_event_to_tracers(struct trace_event_call *call);
/* Add an additional event_call dynamically */
int trace_add_event_call(struct trace_event_call *call)
{
int ret;
mutex_lock(&trace_types_lock);
mutex_lock(&event_mutex);
ret = __register_event(call, NULL);
if (ret >= 0)
__add_event_to_tracers(call);
mutex_unlock(&event_mutex);
mutex_unlock(&trace_types_lock);
return ret;
}
/*
* Must be called under locking of trace_types_lock, event_mutex and
* trace_event_sem.
*/
static void __trace_remove_event_call(struct trace_event_call *call)
{
event_remove(call);
trace_destroy_fields(call);
free_event_filter(call->filter);
call->filter = NULL;
}
static int probe_remove_event_call(struct trace_event_call *call)
{
struct trace_array *tr;
struct trace_event_file *file;
#ifdef CONFIG_PERF_EVENTS
if (call->perf_refcount)
return -EBUSY;
#endif
do_for_each_event_file(tr, file) {
if (file->event_call != call)
continue;
/*
* We can't rely on ftrace_event_enable_disable(enable => 0)
* we are going to do, EVENT_FILE_FL_SOFT_MODE can suppress
* TRACE_REG_UNREGISTER.
*/
if (file->flags & EVENT_FILE_FL_ENABLED)
return -EBUSY;
/*
* The do_for_each_event_file_safe() is
* a double loop. After finding the call for this
* trace_array, we use break to jump to the next
* trace_array.
*/
break;
} while_for_each_event_file();
__trace_remove_event_call(call);
return 0;
}
/* Remove an event_call */
int trace_remove_event_call(struct trace_event_call *call)
{
int ret;
mutex_lock(&trace_types_lock);
mutex_lock(&event_mutex);
down_write(&trace_event_sem);
ret = probe_remove_event_call(call);
up_write(&trace_event_sem);
mutex_unlock(&event_mutex);
mutex_unlock(&trace_types_lock);
return ret;
}
#define for_each_event(event, start, end) \
for (event = start; \
(unsigned long)event < (unsigned long)end; \
event++)
#ifdef CONFIG_MODULES
static void trace_module_add_events(struct module *mod)
{
struct trace_event_call **call, **start, **end;
if (!mod->num_trace_events)
return;
/* Don't add infrastructure for mods without tracepoints */
if (trace_module_has_bad_taint(mod)) {
pr_err("%s: module has bad taint, not creating trace events\n",
mod->name);
return;
}
start = mod->trace_events;
end = mod->trace_events + mod->num_trace_events;
for_each_event(call, start, end) {
__register_event(*call, mod);
__add_event_to_tracers(*call);
}
}
static void trace_module_remove_events(struct module *mod)
{
struct trace_event_call *call, *p;
bool clear_trace = false;
down_write(&trace_event_sem);
list_for_each_entry_safe(call, p, &ftrace_events, list) {
if (call->mod == mod) {
if (call->flags & TRACE_EVENT_FL_WAS_ENABLED)
clear_trace = true;
__trace_remove_event_call(call);
}
}
up_write(&trace_event_sem);
/*
* It is safest to reset the ring buffer if the module being unloaded
* registered any events that were used. The only worry is if
* a new module gets loaded, and takes on the same id as the events
* of this module. When printing out the buffer, traced events left
* over from this module may be passed to the new module events and
* unexpected results may occur.
*/
if (clear_trace)
tracing_reset_all_online_cpus();
}
static int trace_module_notify(struct notifier_block *self,
unsigned long val, void *data)
{
struct module *mod = data;
mutex_lock(&trace_types_lock);
mutex_lock(&event_mutex);
switch (val) {
case MODULE_STATE_COMING:
trace_module_add_events(mod);
break;
case MODULE_STATE_GOING:
trace_module_remove_events(mod);
break;
}
mutex_unlock(&event_mutex);
mutex_unlock(&trace_types_lock);
return 0;
}
static struct notifier_block trace_module_nb = {
.notifier_call = trace_module_notify,
.priority = 1, /* higher than trace.c module notify */
};
#endif /* CONFIG_MODULES */
/* Create a new event directory structure for a trace directory. */
static void
__trace_add_event_dirs(struct trace_array *tr)
{
struct trace_event_call *call;
int ret;
list_for_each_entry(call, &ftrace_events, list) {
ret = __trace_add_new_event(call, tr);
if (ret < 0)
pr_warn("Could not create directory for event %s\n",
trace_event_name(call));
}
}
struct trace_event_file *
find_event_file(struct trace_array *tr, const char *system, const char *event)
{
struct trace_event_file *file;
struct trace_event_call *call;
const char *name;
list_for_each_entry(file, &tr->events, list) {
call = file->event_call;
name = trace_event_name(call);
if (!name || !call->class || !call->class->reg)
continue;
if (call->flags & TRACE_EVENT_FL_IGNORE_ENABLE)
continue;
if (strcmp(event, name) == 0 &&
strcmp(system, call->class->system) == 0)
return file;
}
return NULL;
}
#ifdef CONFIG_DYNAMIC_FTRACE
/* Avoid typos */
#define ENABLE_EVENT_STR "enable_event"
#define DISABLE_EVENT_STR "disable_event"
struct event_probe_data {
struct trace_event_file *file;
unsigned long count;
int ref;
bool enable;
};
static void
event_enable_probe(unsigned long ip, unsigned long parent_ip, void **_data)
{
struct event_probe_data **pdata = (struct event_probe_data **)_data;
struct event_probe_data *data = *pdata;
if (!data)
return;
if (data->enable)
clear_bit(EVENT_FILE_FL_SOFT_DISABLED_BIT, &data->file->flags);
else
set_bit(EVENT_FILE_FL_SOFT_DISABLED_BIT, &data->file->flags);
}
static void
event_enable_count_probe(unsigned long ip, unsigned long parent_ip, void **_data)
{
struct event_probe_data **pdata = (struct event_probe_data **)_data;
struct event_probe_data *data = *pdata;
if (!data)
return;
if (!data->count)
return;
/* Skip if the event is in a state we want to switch to */
if (data->enable == !(data->file->flags & EVENT_FILE_FL_SOFT_DISABLED))
return;
if (data->count != -1)
(data->count)--;
event_enable_probe(ip, parent_ip, _data);
}
static int
event_enable_print(struct seq_file *m, unsigned long ip,
struct ftrace_probe_ops *ops, void *_data)
{
struct event_probe_data *data = _data;
seq_printf(m, "%ps:", (void *)ip);
seq_printf(m, "%s:%s:%s",
data->enable ? ENABLE_EVENT_STR : DISABLE_EVENT_STR,
data->file->event_call->class->system,
trace_event_name(data->file->event_call));
if (data->count == -1)
seq_puts(m, ":unlimited\n");
else
seq_printf(m, ":count=%ld\n", data->count);
return 0;
}
static int
event_enable_init(struct ftrace_probe_ops *ops, unsigned long ip,
void **_data)
{
struct event_probe_data **pdata = (struct event_probe_data **)_data;
struct event_probe_data *data = *pdata;
data->ref++;
return 0;
}
static void
event_enable_free(struct ftrace_probe_ops *ops, unsigned long ip,
void **_data)
{
struct event_probe_data **pdata = (struct event_probe_data **)_data;
struct event_probe_data *data = *pdata;
if (WARN_ON_ONCE(data->ref <= 0))
return;
data->ref--;
if (!data->ref) {
/* Remove the SOFT_MODE flag */
__ftrace_event_enable_disable(data->file, 0, 1);
module_put(data->file->event_call->mod);
kfree(data);
}
*pdata = NULL;
}
static struct ftrace_probe_ops event_enable_probe_ops = {
.func = event_enable_probe,
.print = event_enable_print,
.init = event_enable_init,
.free = event_enable_free,
};
static struct ftrace_probe_ops event_enable_count_probe_ops = {
.func = event_enable_count_probe,
.print = event_enable_print,
.init = event_enable_init,
.free = event_enable_free,
};
static struct ftrace_probe_ops event_disable_probe_ops = {
.func = event_enable_probe,
.print = event_enable_print,
.init = event_enable_init,
.free = event_enable_free,
};
static struct ftrace_probe_ops event_disable_count_probe_ops = {
.func = event_enable_count_probe,
.print = event_enable_print,
.init = event_enable_init,
.free = event_enable_free,
};
static int
event_enable_func(struct ftrace_hash *hash,
char *glob, char *cmd, char *param, int enabled)
{
struct trace_array *tr = top_trace_array();
struct trace_event_file *file;
struct ftrace_probe_ops *ops;
struct event_probe_data *data;
const char *system;
const char *event;
char *number;
bool enable;
int ret;
if (!tr)
return -ENODEV;
/* hash funcs only work with set_ftrace_filter */
if (!enabled || !param)
return -EINVAL;
system = strsep(¶m, ":");
if (!param)
return -EINVAL;
event = strsep(¶m, ":");
mutex_lock(&event_mutex);
ret = -EINVAL;
file = find_event_file(tr, system, event);
if (!file)
goto out;
enable = strcmp(cmd, ENABLE_EVENT_STR) == 0;
if (enable)
ops = param ? &event_enable_count_probe_ops : &event_enable_probe_ops;
else
ops = param ? &event_disable_count_probe_ops : &event_disable_probe_ops;
if (glob[0] == '!') {
unregister_ftrace_function_probe_func(glob+1, ops);
ret = 0;
goto out;
}
ret = -ENOMEM;
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (!data)
goto out;
data->enable = enable;
data->count = -1;
data->file = file;
if (!param)
goto out_reg;
number = strsep(¶m, ":");
ret = -EINVAL;
if (!strlen(number))
goto out_free;
/*
* We use the callback data field (which is a pointer)
* as our counter.
*/
ret = kstrtoul(number, 0, &data->count);
if (ret)
goto out_free;
out_reg:
/* Don't let event modules unload while probe registered */
ret = try_module_get(file->event_call->mod);
if (!ret) {
ret = -EBUSY;
goto out_free;
}
ret = __ftrace_event_enable_disable(file, 1, 1);
if (ret < 0)
goto out_put;
ret = register_ftrace_function_probe(glob, ops, data);
/*
* The above returns on success the # of functions enabled,
* but if it didn't find any functions it returns zero.
* Consider no functions a failure too.
*/
if (!ret) {
ret = -ENOENT;
goto out_disable;
} else if (ret < 0)
goto out_disable;
/* Just return zero, not the number of enabled functions */
ret = 0;
out:
mutex_unlock(&event_mutex);
return ret;
out_disable:
__ftrace_event_enable_disable(file, 0, 1);
out_put:
module_put(file->event_call->mod);
out_free:
kfree(data);
goto out;
}
static struct ftrace_func_command event_enable_cmd = {
.name = ENABLE_EVENT_STR,
.func = event_enable_func,
};
static struct ftrace_func_command event_disable_cmd = {
.name = DISABLE_EVENT_STR,
.func = event_enable_func,
};
static __init int register_event_cmds(void)
{
int ret;
ret = register_ftrace_command(&event_enable_cmd);
if (WARN_ON(ret < 0))
return ret;
ret = register_ftrace_command(&event_disable_cmd);
if (WARN_ON(ret < 0))
unregister_ftrace_command(&event_enable_cmd);
return ret;
}
#else
static inline int register_event_cmds(void) { return 0; }
#endif /* CONFIG_DYNAMIC_FTRACE */
/*
* The top level array has already had its trace_event_file
* descriptors created in order to allow for early events to
* be recorded. This function is called after the tracefs has been
* initialized, and we now have to create the files associated
* to the events.
*/
static __init void
__trace_early_add_event_dirs(struct trace_array *tr)
{
struct trace_event_file *file;
int ret;
list_for_each_entry(file, &tr->events, list) {
ret = event_create_dir(tr->event_dir, file);
if (ret < 0)
pr_warn("Could not create directory for event %s\n",
trace_event_name(file->event_call));
}
}
/*
* For early boot up, the top trace array requires to have
* a list of events that can be enabled. This must be done before
* the filesystem is set up in order to allow events to be traced
* early.
*/
static __init void
__trace_early_add_events(struct trace_array *tr)
{
struct trace_event_call *call;
int ret;
list_for_each_entry(call, &ftrace_events, list) {
/* Early boot up should not have any modules loaded */
if (WARN_ON_ONCE(call->mod))
continue;
ret = __trace_early_add_new_event(call, tr);
if (ret < 0)
pr_warn("Could not create early event %s\n",
trace_event_name(call));
}
}
/* Remove the event directory structure for a trace directory. */
static void
__trace_remove_event_dirs(struct trace_array *tr)
{
struct trace_event_file *file, *next;
list_for_each_entry_safe(file, next, &tr->events, list)
remove_event_file_dir(file);
}
static void __add_event_to_tracers(struct trace_event_call *call)
{
struct trace_array *tr;
list_for_each_entry(tr, &ftrace_trace_arrays, list)
__trace_add_new_event(call, tr);
}
extern struct trace_event_call *__start_ftrace_events[];
extern struct trace_event_call *__stop_ftrace_events[];
static char bootup_event_buf[COMMAND_LINE_SIZE] __initdata;
static __init int setup_trace_event(char *str)
{
strlcpy(bootup_event_buf, str, COMMAND_LINE_SIZE);
ring_buffer_expanded = true;
tracing_selftest_disabled = true;
return 1;
}
__setup("trace_event=", setup_trace_event);
/* Expects to have event_mutex held when called */
static int
create_event_toplevel_files(struct dentry *parent, struct trace_array *tr)
{
struct dentry *d_events;
struct dentry *entry;
entry = tracefs_create_file("set_event", 0644, parent,
tr, &ftrace_set_event_fops);
if (!entry) {
pr_warn("Could not create tracefs 'set_event' entry\n");
return -ENOMEM;
}
d_events = tracefs_create_dir("events", parent);
if (!d_events) {
pr_warn("Could not create tracefs 'events' directory\n");
return -ENOMEM;
}
entry = tracefs_create_file("set_event_pid", 0644, parent,
tr, &ftrace_set_event_pid_fops);
/* ring buffer internal formats */
trace_create_file("header_page", 0444, d_events,
ring_buffer_print_page_header,
&ftrace_show_header_fops);
trace_create_file("header_event", 0444, d_events,
ring_buffer_print_entry_header,
&ftrace_show_header_fops);
trace_create_file("enable", 0644, d_events,
tr, &ftrace_tr_enable_fops);
tr->event_dir = d_events;
return 0;
}
/**
* event_trace_add_tracer - add a instance of a trace_array to events
* @parent: The parent dentry to place the files/directories for events in
* @tr: The trace array associated with these events
*
* When a new instance is created, it needs to set up its events
* directory, as well as other files associated with events. It also
* creates the event hierachry in the @parent/events directory.
*
* Returns 0 on success.
*/
int event_trace_add_tracer(struct dentry *parent, struct trace_array *tr)
{
int ret;
mutex_lock(&event_mutex);
ret = create_event_toplevel_files(parent, tr);
if (ret)
goto out_unlock;
down_write(&trace_event_sem);
__trace_add_event_dirs(tr);
up_write(&trace_event_sem);
out_unlock:
mutex_unlock(&event_mutex);
return ret;
}
/*
* The top trace array already had its file descriptors created.
* Now the files themselves need to be created.
*/
static __init int
early_event_add_tracer(struct dentry *parent, struct trace_array *tr)
{
int ret;
mutex_lock(&event_mutex);
ret = create_event_toplevel_files(parent, tr);
if (ret)
goto out_unlock;
down_write(&trace_event_sem);
__trace_early_add_event_dirs(tr);
up_write(&trace_event_sem);
out_unlock:
mutex_unlock(&event_mutex);
return ret;
}
int event_trace_del_tracer(struct trace_array *tr)
{
mutex_lock(&event_mutex);
/* Disable any event triggers and associated soft-disabled events */
clear_event_triggers(tr);
/* Clear the pid list */
__ftrace_clear_event_pids(tr);
/* Disable any running events */
__ftrace_set_clr_event_nolock(tr, NULL, NULL, NULL, 0);
/* Access to events are within rcu_read_lock_sched() */
synchronize_sched();
down_write(&trace_event_sem);
__trace_remove_event_dirs(tr);
tracefs_remove_recursive(tr->event_dir);
up_write(&trace_event_sem);
tr->event_dir = NULL;
mutex_unlock(&event_mutex);
return 0;
}
static __init int event_trace_memsetup(void)
{
field_cachep = KMEM_CACHE(ftrace_event_field, SLAB_PANIC);
file_cachep = KMEM_CACHE(trace_event_file, SLAB_PANIC);
return 0;
}
static __init void
early_enable_events(struct trace_array *tr, bool disable_first)
{
char *buf = bootup_event_buf;
char *token;
int ret;
while (true) {
token = strsep(&buf, ",");
if (!token)
break;
if (*token) {
/* Restarting syscalls requires that we stop them first */
if (disable_first)
ftrace_set_clr_event(tr, token, 0);
ret = ftrace_set_clr_event(tr, token, 1);
if (ret)
pr_warn("Failed to enable trace event: %s\n", token);
}
/* Put back the comma to allow this to be called again */
if (buf)
*(buf - 1) = ',';
}
}
static __init int event_trace_enable(void)
{
struct trace_array *tr = top_trace_array();
struct trace_event_call **iter, *call;
int ret;
if (!tr)
return -ENODEV;
for_each_event(iter, __start_ftrace_events, __stop_ftrace_events) {
call = *iter;
ret = event_init(call);
if (!ret)
list_add(&call->list, &ftrace_events);
}
/*
* We need the top trace array to have a working set of trace
* points at early init, before the debug files and directories
* are created. Create the file entries now, and attach them
* to the actual file dentries later.
*/
__trace_early_add_events(tr);
early_enable_events(tr, false);
trace_printk_start_comm();
register_event_cmds();
register_trigger_cmds();
return 0;
}
/*
* event_trace_enable() is called from trace_event_init() first to
* initialize events and perhaps start any events that are on the
* command line. Unfortunately, there are some events that will not
* start this early, like the system call tracepoints that need
* to set the TIF_SYSCALL_TRACEPOINT flag of pid 1. But event_trace_enable()
* is called before pid 1 starts, and this flag is never set, making
* the syscall tracepoint never get reached, but the event is enabled
* regardless (and not doing anything).
*/
static __init int event_trace_enable_again(void)
{
struct trace_array *tr;
tr = top_trace_array();
if (!tr)
return -ENODEV;
early_enable_events(tr, true);
return 0;
}
early_initcall(event_trace_enable_again);
static __init int event_trace_init(void)
{
struct trace_array *tr;
struct dentry *d_tracer;
struct dentry *entry;
int ret;
tr = top_trace_array();
if (!tr)
return -ENODEV;
d_tracer = tracing_init_dentry();
if (IS_ERR(d_tracer))
return 0;
entry = tracefs_create_file("available_events", 0444, d_tracer,
tr, &ftrace_avail_fops);
if (!entry)
pr_warn("Could not create tracefs 'available_events' entry\n");
if (trace_define_generic_fields())
pr_warn("tracing: Failed to allocated generic fields");
if (trace_define_common_fields())
pr_warn("tracing: Failed to allocate common fields");
ret = early_event_add_tracer(d_tracer, tr);
if (ret)
return ret;
#ifdef CONFIG_MODULES
ret = register_module_notifier(&trace_module_nb);
if (ret)
pr_warn("Failed to register trace events module notifier\n");
#endif
return 0;
}
void __init trace_event_init(void)
{
event_trace_memsetup();
init_ftrace_syscalls();
event_trace_enable();
}
fs_initcall(event_trace_init);
#ifdef CONFIG_FTRACE_STARTUP_TEST
static DEFINE_SPINLOCK(test_spinlock);
static DEFINE_SPINLOCK(test_spinlock_irq);
static DEFINE_MUTEX(test_mutex);
static __init void test_work(struct work_struct *dummy)
{
spin_lock(&test_spinlock);
spin_lock_irq(&test_spinlock_irq);
udelay(1);
spin_unlock_irq(&test_spinlock_irq);
spin_unlock(&test_spinlock);
mutex_lock(&test_mutex);
msleep(1);
mutex_unlock(&test_mutex);
}
static __init int event_test_thread(void *unused)
{
void *test_malloc;
test_malloc = kmalloc(1234, GFP_KERNEL);
if (!test_malloc)
pr_info("failed to kmalloc\n");
schedule_on_each_cpu(test_work);
kfree(test_malloc);
set_current_state(TASK_INTERRUPTIBLE);
while (!kthread_should_stop()) {
schedule();
set_current_state(TASK_INTERRUPTIBLE);
}
__set_current_state(TASK_RUNNING);
return 0;
}
/*
* Do various things that may trigger events.
*/
static __init void event_test_stuff(void)
{
struct task_struct *test_thread;
test_thread = kthread_run(event_test_thread, NULL, "test-events");
msleep(1);
kthread_stop(test_thread);
}
/*
* For every trace event defined, we will test each trace point separately,
* and then by groups, and finally all trace points.
*/
static __init void event_trace_self_tests(void)
{
struct trace_subsystem_dir *dir;
struct trace_event_file *file;
struct trace_event_call *call;
struct event_subsystem *system;
struct trace_array *tr;
int ret;
tr = top_trace_array();
if (!tr)
return;
pr_info("Running tests on trace events:\n");
list_for_each_entry(file, &tr->events, list) {
call = file->event_call;
/* Only test those that have a probe */
if (!call->class || !call->class->probe)
continue;
/*
* Testing syscall events here is pretty useless, but
* we still do it if configured. But this is time consuming.
* What we really need is a user thread to perform the
* syscalls as we test.
*/
#ifndef CONFIG_EVENT_TRACE_TEST_SYSCALLS
if (call->class->system &&
strcmp(call->class->system, "syscalls") == 0)
continue;
#endif
pr_info("Testing event %s: ", trace_event_name(call));
/*
* If an event is already enabled, someone is using
* it and the self test should not be on.
*/
if (file->flags & EVENT_FILE_FL_ENABLED) {
pr_warn("Enabled event during self test!\n");
WARN_ON_ONCE(1);
continue;
}
ftrace_event_enable_disable(file, 1);
event_test_stuff();
ftrace_event_enable_disable(file, 0);
pr_cont("OK\n");
}
/* Now test at the sub system level */
pr_info("Running tests on trace event systems:\n");
list_for_each_entry(dir, &tr->systems, list) {
system = dir->subsystem;
/* the ftrace system is special, skip it */
if (strcmp(system->name, "ftrace") == 0)
continue;
pr_info("Testing event system %s: ", system->name);
ret = __ftrace_set_clr_event(tr, NULL, system->name, NULL, 1);
if (WARN_ON_ONCE(ret)) {
pr_warn("error enabling system %s\n",
system->name);
continue;
}
event_test_stuff();
ret = __ftrace_set_clr_event(tr, NULL, system->name, NULL, 0);
if (WARN_ON_ONCE(ret)) {
pr_warn("error disabling system %s\n",
system->name);
continue;
}
pr_cont("OK\n");
}
/* Test with all events enabled */
pr_info("Running tests on all trace events:\n");
pr_info("Testing all events: ");
ret = __ftrace_set_clr_event(tr, NULL, NULL, NULL, 1);
if (WARN_ON_ONCE(ret)) {
pr_warn("error enabling all events\n");
return;
}
event_test_stuff();
/* reset sysname */
ret = __ftrace_set_clr_event(tr, NULL, NULL, NULL, 0);
if (WARN_ON_ONCE(ret)) {
pr_warn("error disabling all events\n");
return;
}
pr_cont("OK\n");
}
#ifdef CONFIG_FUNCTION_TRACER
static DEFINE_PER_CPU(atomic_t, ftrace_test_event_disable);
static struct trace_event_file event_trace_file __initdata;
static void __init
function_test_events_call(unsigned long ip, unsigned long parent_ip,
struct ftrace_ops *op, struct pt_regs *pt_regs)
{
struct ring_buffer_event *event;
struct ring_buffer *buffer;
struct ftrace_entry *entry;
unsigned long flags;
long disabled;
int cpu;
int pc;
pc = preempt_count();
preempt_disable_notrace();
cpu = raw_smp_processor_id();
disabled = atomic_inc_return(&per_cpu(ftrace_test_event_disable, cpu));
if (disabled != 1)
goto out;
local_save_flags(flags);
event = trace_event_buffer_lock_reserve(&buffer, &event_trace_file,
TRACE_FN, sizeof(*entry),
flags, pc);
if (!event)
goto out;
entry = ring_buffer_event_data(event);
entry->ip = ip;
entry->parent_ip = parent_ip;
event_trigger_unlock_commit(&event_trace_file, buffer, event,
entry, flags, pc);
out:
atomic_dec(&per_cpu(ftrace_test_event_disable, cpu));
preempt_enable_notrace();
}
static struct ftrace_ops trace_ops __initdata =
{
.func = function_test_events_call,
.flags = FTRACE_OPS_FL_RECURSION_SAFE,
};
static __init void event_trace_self_test_with_function(void)
{
int ret;
event_trace_file.tr = top_trace_array();
if (WARN_ON(!event_trace_file.tr))
return;
ret = register_ftrace_function(&trace_ops);
if (WARN_ON(ret < 0)) {
pr_info("Failed to enable function tracer for event tests\n");
return;
}
pr_info("Running tests again, along with the function tracer\n");
event_trace_self_tests();
unregister_ftrace_function(&trace_ops);
}
#else
static __init void event_trace_self_test_with_function(void)
{
}
#endif
static __init int event_trace_self_tests_init(void)
{
if (!tracing_selftest_disabled) {
event_trace_self_tests();
event_trace_self_test_with_function();
}
return 0;
}
late_initcall(event_trace_self_tests_init);
#endif
| gpl-2.0 |
mattm479/mafiakingz | vendor/phalcon/src/Phalcon/mvc/collection/Manager.php | 4617 | <?php
namespace Phalcon\Mvc\Collection;
/**
* Phalcon\Mvc\Collection\Manager
* This components controls the initialization of models, keeping record of relations
* between the different models of the application.
* A CollectionManager is injected to a model via a Dependency Injector Container such as Phalcon\Di.
* <code>
* $di = new \Phalcon\Di();
* $di->set('collectionManager', function(){
* return new \Phalcon\Mvc\Collection\Manager();
* });
* $robot = new Robots($di);
* </code>
*/
class Manager implements \Phalcon\Di\InjectionAwareInterface, \Phalcon\Events\EventsAwareInterface
{
protected $_dependencyInjector;
protected $_initialized;
protected $_lastInitialized;
protected $_eventsManager;
protected $_customEventsManager;
protected $_connectionServices;
protected $_implicitObjectsIds;
protected $_behaviors;
/**
* Sets the DependencyInjector container
*
* @param mixed $dependencyInjector
*/
public function setDI(\Phalcon\DiInterface $dependencyInjector) {}
/**
* Returns the DependencyInjector container
*
* @return \Phalcon\DiInterface
*/
public function getDI() {}
/**
* Sets the event manager
*
* @param mixed $eventsManager
*/
public function setEventsManager(\Phalcon\Events\ManagerInterface $eventsManager) {}
/**
* Returns the internal event manager
*
* @return \Phalcon\Events\ManagerInterface
*/
public function getEventsManager() {}
/**
* Sets a custom events manager for a specific model
*
* @param mixed $model
* @param mixed $eventsManager
*/
public function setCustomEventsManager(\Phalcon\Mvc\CollectionInterface $model, \Phalcon\Events\ManagerInterface $eventsManager) {}
/**
* Returns a custom events manager related to a model
*
* @param mixed $model
* @param \Phalcon\Mvc\CollectionInterface $$model
* @return \Phalcon\Events\ManagerInterface
*/
public function getCustomEventsManager(\Phalcon\Mvc\CollectionInterface $model) {}
/**
* Initializes a model in the models manager
*
* @param mixed $model
*/
public function initialize(\Phalcon\Mvc\CollectionInterface $model) {}
/**
* Check whether a model is already initialized
*
* @param string $modelName
* @return bool
*/
public function isInitialized($modelName) {}
/**
* Get the latest initialized model
*
* @return \Phalcon\Mvc\CollectionInterface
*/
public function getLastInitialized() {}
/**
* Sets a connection service for a specific model
*
* @param mixed $model
* @param string $connectionService
*/
public function setConnectionService(\Phalcon\Mvc\CollectionInterface $model, $connectionService) {}
/**
* Sets whether a model must use implicit objects ids
*
* @param mixed $model
* @param bool $useImplicitObjectIds
*/
public function useImplicitObjectIds(\Phalcon\Mvc\CollectionInterface $model, $useImplicitObjectIds) {}
/**
* Checks if a model is using implicit object ids
*
* @param mixed $model
* @return bool
*/
public function isUsingImplicitObjectIds(\Phalcon\Mvc\CollectionInterface $model) {}
/**
* Returns the connection related to a model
*
* @param mixed $model
* @param \Phalcon\Mvc\CollectionInterface $$model
* @return \Mongo
*/
public function getConnection(\Phalcon\Mvc\CollectionInterface $model) {}
/**
* Receives events generated in the models and dispatches them to a events-manager if available
* Notify the behaviors that are listening in the model
*
* @param string $eventName
* @param mixed $model
*/
public function notifyEvent($eventName, \Phalcon\Mvc\CollectionInterface $model) {}
/**
* Dispatch a event to the listeners and behaviors
* This method expects that the endpoint listeners/behaviors returns true
* meaning that a least one was implemented
*
* @param mixed $model
* @param string $eventName
* @param mixed $data
* @return bool
*/
public function missingMethod(\Phalcon\Mvc\CollectionInterface $model, $eventName, $data) {}
/**
* Binds a behavior to a model
*
* @param mixed $model
* @param mixed $behavior
*/
public function addBehavior(\Phalcon\Mvc\CollectionInterface $model, \Phalcon\Mvc\Collection\BehaviorInterface $behavior) {}
}
| gpl-2.0 |
brunetton/dia | lib/object_defaults.c | 12266 | /* Dia -- an diagram creation/manipulation program
* Copyright (C) 1998 Alexander Larsson
*
* object_defaults.c : manage default properties of dia objects
* The serialization is done with standard object methods in
* a diagram compatible format.
*
* Copyright (C) 2002 Hans Breuer
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <config.h>
#include <stdlib.h> /* atoi() */
#include <string.h>
#include <glib.h>
#include "intl.h"
#include <libxml/tree.h>
#include "dia_xml_libxml.h"
#include "dia_xml.h"
#include "object.h"
#include "diacontext.h"
#include "dia_dirs.h"
#include "propinternals.h"
static GHashTable *defaults_hash = NULL;
static gboolean object_default_create_lazy = FALSE;
static void
_obj_create (gpointer key,
gpointer value,
gpointer user_data)
{
gchar *name = (gchar *)key;
DiaObjectType *type = (DiaObjectType *)value;
GHashTable *ht = (GHashTable *) user_data;
DiaObject *obj;
Point startpoint = {0.0,0.0};
Handle *handle1,*handle2;
g_assert (g_hash_table_lookup (ht, name) == NULL);
/* at least 'Group' has no ops */
if (!type->ops)
return;
/* the custom objects needs extra_data */
obj = type->ops->create(&startpoint, type->default_user_data, &handle1,&handle2);
if (!obj)
g_warning ("Failed to create default object for '%s'", name);
else if (0 != strcmp (obj->type->name, name))
object_destroy (obj); /* Skip over 'compatibility' names/objects */
else
g_hash_table_insert(ht, obj->type->name, obj);
}
static void
_obj_destroy (gpointer val)
{
DiaObject *obj = (DiaObject *)val;
obj->ops->destroy (obj);
g_free (obj);
}
/**
* @param filename the file to load from or NULL for default
* @param create_lazy if FALSE creates default objects for
* every known type. Otherwise default objects
* are created on demand
* @param ctx The context in which this function is called
*
* Create all the default objects.
*/
gboolean
dia_object_defaults_load (const gchar *filename, gboolean create_lazy, DiaContext *ctx)
{
xmlDocPtr doc;
xmlNsPtr name_space;
ObjectNode obj_node, layer_node;
object_default_create_lazy = create_lazy;
if (!defaults_hash)
{
defaults_hash = g_hash_table_new_full(g_str_hash, g_str_equal,
NULL, _obj_destroy);
if (!create_lazy)
object_registry_foreach (_obj_create, defaults_hash);
}
/* overload properties from file */
if (!filename)
{
gchar *default_filename = dia_config_filename("defaults.dia");
dia_context_set_filename(ctx, default_filename);
if (g_file_test(default_filename, G_FILE_TEST_EXISTS))
doc = diaXmlParseFile (default_filename, ctx, FALSE);
else
doc = NULL;
g_free (default_filename);
}
else
{
dia_context_set_filename (ctx, filename);
doc = diaXmlParseFile (filename, ctx, FALSE);
}
if (!doc)
return FALSE;
name_space = xmlSearchNs(doc, doc->xmlRootNode, (const xmlChar *)"dia");
if (xmlStrcmp (doc->xmlRootNode->name, (const xmlChar *)"diagram")
|| (name_space == NULL))
{
dia_context_add_message(ctx, _("Error loading defaults '%s'.\n"
"Not a Dia diagram file."), filename);
xmlFreeDoc (doc);
return FALSE;
}
layer_node = doc->xmlRootNode->xmlChildrenNode;
while (layer_node)
{
if ( !xmlIsBlankNode(layer_node)
&& 0 == xmlStrcmp(layer_node->name, (const xmlChar *)"layer"))
{
obj_node = layer_node->xmlChildrenNode;
while (obj_node)
{
if (!xmlIsBlankNode(obj_node)
&& 0 == xmlStrcmp(obj_node->name, (const xmlChar *)"object"))
{
char *typestr = (char *) xmlGetProp(obj_node, (const xmlChar *)"type");
char *version = (char *) xmlGetProp(obj_node, (const xmlChar *)"version");
if (typestr)
{
DiaObject *obj = g_hash_table_lookup (defaults_hash, typestr);
if (!obj)
{
if (!create_lazy)
g_warning ("Unknown object '%s' while reading '%s'",
typestr, filename);
else
{
DiaObjectType *type = object_get_type (typestr);
if (type)
obj = type->ops->load (
obj_node,
version ? atoi(version) : 0,
ctx);
if (obj)
g_hash_table_insert (defaults_hash,
obj->type->name, obj);
}
}
else
{
#if 0 /* lots of complaining about missing attributes */
object_load_props(obj, obj_node, ctx); /* leaks ?? */
#else
DiaObject *def_obj;
def_obj = obj->type->ops->load (
obj_node,
version ? atoi(version) : 0,
ctx);
if (def_obj->ops->set_props)
{
object_copy_props (obj, def_obj, TRUE);
def_obj->ops->destroy (def_obj);
}
else
{
/* can't copy props */
g_hash_table_replace (defaults_hash,
def_obj->type->name, def_obj);
}
#endif
}
if (version)
xmlFree (version);
xmlFree (typestr);
}
}
obj_node = obj_node->next;
}
}
layer_node = layer_node->next;
}
xmlFreeDoc(doc);
return TRUE;
}
/**
* dia_object_default_get :
* @param type The type of the object for which you want the defaults object.
* @param user_data unused
*
* Allows to edit one defaults object properties
*/
DiaObject *
dia_object_default_get (const DiaObjectType *type, gpointer user_data)
{
DiaObject *obj;
obj = g_hash_table_lookup (defaults_hash, type->name);
if (!obj && object_default_create_lazy)
{
Point startpoint = {0.0,0.0};
Handle *handle1,*handle2;
/* at least 'Group' has no ops */
if (!type->ops)
return NULL;
/* the custom objects needs extra_data */
obj = type->ops->create(&startpoint,
type->default_user_data,
&handle1,&handle2);
if (obj)
g_hash_table_insert (defaults_hash, obj->type->name, obj);
}
return obj;
}
static gboolean
pdtpp_standard_or_defaults (const PropDescription *pdesc)
{
return ( (pdesc->flags & PROP_FLAG_NO_DEFAULTS) == 0
&& (pdesc->flags & PROP_FLAG_STANDARD) == 0);
}
/**
* dia_object_default_create:
* @param type The objects type
* @param startpoint The left upper corner
* @param user_data
* @param handle1
* @param handle2
* @return A newly created object.
*
* Create an object respecting defaults if available
*/
DiaObject *
dia_object_default_create (const DiaObjectType *type,
Point *startpoint,
void *user_data,
Handle **handle1,
Handle **handle2)
{
const DiaObject *def_obj;
DiaObject *obj;
g_return_val_if_fail (type != NULL, NULL);
/* don't use dia_object_default_get() as it would insert the object into the hashtable (store defaults without being asked for it) */
def_obj = g_hash_table_lookup (defaults_hash, type->name);
if (def_obj && def_obj->ops->describe_props)
{
/* copy properties to new object, but keep position */
obj = type->ops->create (startpoint, user_data, handle1, handle2);
if (obj)
{
GPtrArray *props = prop_list_from_descs (
object_get_prop_descriptions(def_obj), pdtpp_standard_or_defaults);
def_obj->ops->get_props((DiaObject *)def_obj, props);
obj->ops->set_props(obj, props);
obj->ops->move (obj, startpoint);
prop_list_free(props);
}
}
else
{
obj = type->ops->create (startpoint, user_data, handle1, handle2);
}
return obj;
}
typedef struct _MyLayerInfo MyLayerInfo;
struct _MyLayerInfo
{
Point pos;
xmlNodePtr node;
};
typedef struct _MyRootInfo MyRootInfo;
struct _MyRootInfo
{
xmlNodePtr node;
gchar *filename;
GHashTable *layer_hash;
xmlNs *name_space;
gint obj_nr;
};
static void
_obj_store (gpointer key,
gpointer value,
gpointer user_data)
{
gchar *name = (gchar *)key;
DiaObject *obj = (DiaObject *)value;
MyRootInfo *ri = (MyRootInfo *)user_data;
ObjectNode obj_node;
gchar *layer_name;
gchar buffer[31];
gchar *p;
MyLayerInfo *li;
/* fires if you have messed up the hash keys,
* e.g. by using non permanent memory */
g_assert (0 == strcmp (obj->type->name, name));
p = strstr (name, " - ");
if (p) {
if (p > name)
layer_name = g_strndup (name, p - name);
else
layer_name = g_strdup("NULL");
}
else
layer_name = g_strdup ("default");
li = g_hash_table_lookup (ri->layer_hash, layer_name);
if (!li)
{
li = g_new (MyLayerInfo, 1);
li->node = xmlNewChild(ri->node, ri->name_space, (const xmlChar *)"layer", NULL);
xmlSetProp(li->node, (const xmlChar *)"name", (xmlChar *)layer_name);
xmlSetProp(li->node, (const xmlChar *)"visible", (const xmlChar *)"false");
li->pos.x = li->pos.y = 0.0;
g_hash_table_insert (ri->layer_hash, layer_name, li);
}
else
g_free (layer_name);
obj_node = xmlNewChild(li->node, NULL, (const xmlChar *)"object", NULL);
xmlSetProp(obj_node, (const xmlChar *)"type", (xmlChar *) obj->type->name);
g_snprintf(buffer, 30, "%d", obj->type->version);
xmlSetProp(obj_node, (const xmlChar *)"version", (xmlChar *)buffer);
g_snprintf(buffer, 30, "O%d", ri->obj_nr++);
xmlSetProp(obj_node, (const xmlChar *)"id", (xmlChar *)buffer);
/* if it looks like intdata store it as well */
if ( GPOINTER_TO_INT(obj->type->default_user_data) > 0
&& GPOINTER_TO_INT(obj->type->default_user_data) < 0xFF) {
g_snprintf(buffer, 30, "%d", GPOINTER_TO_INT(obj->type->default_user_data));
xmlSetProp(obj_node, (const xmlChar *)"intdata", (xmlChar *)buffer);
}
obj->ops->move (obj,&(li->pos));
/* saving every property of the object */
obj->type->ops->save (obj, obj_node, ri->filename);
/* arrange following objects below */
li->pos.y += (obj->bounding_box.bottom - obj->bounding_box.top + 1.0);
}
/**
* dia_object_defaults_save:
*
* Saves all the currently created default objects into a
* valid diagram file. All the objects are placed into
* separate invisible layers.
*/
gboolean
dia_object_defaults_save (const gchar *filename)
{
MyRootInfo ni;
xmlDocPtr doc;
gboolean ret;
gchar *real_filename;
int old_blanks_default = pretty_formated_xml;
/* FIXME HACK: we always want nice readable default files,
* but toggling it by a global var is ugly --hb
*/
pretty_formated_xml = TRUE;
if (!filename)
real_filename = dia_config_filename("defaults.dia");
else
real_filename = g_strdup (filename);
doc = xmlNewDoc((const xmlChar *)"1.0");
doc->encoding = xmlStrdup((const xmlChar *)"UTF-8");
doc->xmlRootNode = xmlNewDocNode(doc, NULL, (const xmlChar *)"diagram", NULL);
ni.name_space = xmlNewNs(doc->xmlRootNode,
(const xmlChar *)DIA_XML_NAME_SPACE_BASE,
(const xmlChar *)"dia");
xmlSetNs(doc->xmlRootNode, ni.name_space);
ni.obj_nr = 0;
ni.node = doc->xmlRootNode;
ni.filename = real_filename;
ni.layer_hash = g_hash_table_new_full (g_str_hash, g_str_equal,
g_free, g_free);
g_hash_table_foreach (defaults_hash, _obj_store, &ni);
ret = xmlDiaSaveFile (real_filename, doc);
g_free (real_filename);
xmlFreeDoc(doc);
pretty_formated_xml = old_blanks_default;
g_hash_table_destroy (ni.layer_hash);
return ret;
}
| gpl-2.0 |
stephencelis/gitx | Site/text/seeit.markdown | 745 | <h2>
See it
</h2>
<p>
Here you can have a look at what GitX looks like. There are <a href="">screenshots</a> and <a href="">screencaptures</a> for you to enjoy!
</p>
<h3>
Screenshots
</h3>
<p>
<h4>The Commit View:</h4>
<img width="500px" src="http://ss.frim.nl/==892">
</p>
<p>
<h4>The History View:</h4>
<img width="500px" src="http://ss.frim.nl/==891">
</p>
<h3>
Screencaptures
</h3>
<p>
<ul>
<li><a href="http://gitx.frim.nl/Movies/GitX6.mov">See an old movie showing some features</a></li>
<li><a href="http://gitx.frim.nl/Movies/GitX9.mov">See how you can use GitX to show arbitrary diffs</a></li>
<li><a href="http://gitx.frim.nl/Movies/GitX10.mov">See how you can use GitX to paste to gist.github.com</a></li>
</ul>
</p>
| gpl-2.0 |
landell/landell | sltv/input/videotestinput.py | 1971 | # -*- coding: utf-8 -*-
# Copyright (C) 2010 Holoscopio Tecnologia
# Author: Marcelo Jorge Vieira <[email protected]>
# Author: Thadeu Lima de Souza Cascardo <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import gobject
import pygst
pygst.require("0.10")
import gst
from core import Input, INPUT_TYPE_VIDEO
CAPABILITIES = INPUT_TYPE_VIDEO
class VideoTestInput(Input):
def __init__(self):
Input.__init__(self, CAPABILITIES)
self.video_src = gst.element_factory_make("videotestsrc", "video_src")
self.video_src.set_property("is-live", True)
self.add(self.video_src)
self.capsfilter = gst.element_factory_make("capsfilter", "capsfilter")
self.add(self.capsfilter)
gst.element_link_many(self.video_src, self.capsfilter)
self.video_pad.set_target(self.capsfilter.src_pads().next())
def config(self, dict):
self.video_src.set_property("pattern", int(dict["pattern"]))
caps = gst.caps_from_string(
"video/x-raw-yuv, width=%d, height=%d;"
"video/x-raw-rgb, width=%d, height=%d" % (
int(dict["width"]), int(dict["height"]),
int(dict["width"]), int(dict["height"])
)
)
self.capsfilter.set_property("caps", caps)
| gpl-2.0 |
nlyan/pdns | pdns/receiver.cc | 18867 | /*
PowerDNS Versatile Database Driven Nameserver
Copyright (C) 2002 - 2013 PowerDNS.COM BV
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation
Additionally, the license of this program contains a special
exception which allows to distribute the program in binary form when
it is linked against OpenSSL.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "packetcache.hh"
#include <cstdio>
#include <signal.h>
#include <cstring>
#include <cstdlib>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <iostream>
#include <string>
#include <sys/stat.h>
#include <unistd.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <errno.h>
#include <pthread.h>
#include <unistd.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <fstream>
#include <boost/algorithm/string.hpp>
#ifdef HAVE_LIBSODIUM
#include <sodium.h>
#endif
#include "opensslsigners.hh"
#include "dns.hh"
#include "dnsbackend.hh"
#include "ueberbackend.hh"
#include "dnspacket.hh"
#include "nameserver.hh"
#include "distributor.hh"
#include "logger.hh"
#include "arguments.hh"
#include "packethandler.hh"
#include "statbag.hh"
#include "tcpreceiver.hh"
#include "misc.hh"
#include "dynlistener.hh"
#include "dynhandler.hh"
#include "communicator.hh"
#include "dnsproxy.hh"
#include "utility.hh"
#include "common_startup.hh"
#include "dnsrecords.hh"
#include "version.hh"
time_t s_starttime;
string s_programname="pdns"; // used in packethandler.cc
const char *funnytext=
"*****************************************************************************\n"\
"Ok, you just ran pdns_server through 'strings' hoping to find funny messages.\n"\
"Well, you found one. \n"\
"Two ions are flying through their particle accelerator, says the one to the\n"
"other 'I think I've lost an electron!' \n"\
"So the other one says, 'Are you sure?'. 'YEAH! I'M POSITIVE!'\n"\
" the pdns crew - [email protected]\n"
"*****************************************************************************\n";
// start (sys)logging
/** \var Logger L
\brief All logging is done via L, a Logger instance
*/
/**
\file receiver.cc
\brief The main loop of powerdns
This file is where it all happens - main is here, as are the two pivotal threads qthread() and athread()
*/
void daemonize(void)
{
if(fork())
exit(0); // bye bye
setsid();
int i=open("/dev/null",O_RDWR); /* open stdin */
if(i < 0)
L<<Logger::Critical<<"Unable to open /dev/null: "<<stringerror()<<endl;
else {
dup2(i,0); /* stdin */
dup2(i,1); /* stderr */
dup2(i,2); /* stderr */
close(i);
}
}
static int cpid;
static void takedown(int i)
{
if(cpid) {
L<<Logger::Error<<"Guardian is killed, taking down children with us"<<endl;
kill(cpid,SIGKILL);
exit(0);
}
}
static void writePid(void)
{
if(!::arg().mustDo("write-pid"))
return;
string fname=::arg()["socket-dir"];
if (::arg()["socket-dir"].empty()) {
if (::arg()["chroot"].empty())
fname = LOCALSTATEDIR;
else
fname = ::arg()["chroot"] + "/";
} else if (!::arg()["socket-dir"].empty() && !::arg()["chroot"].empty()) {
fname = ::arg()["chroot"] + ::arg()["socket-dir"];
}
fname += + "/" + s_programname + ".pid";
ofstream of(fname.c_str());
if(of)
of<<getpid()<<endl;
else
L<<Logger::Error<<"Writing pid for "<<getpid()<<" to "<<fname<<" failed: "<<strerror(errno)<<endl;
}
int g_fd1[2], g_fd2[2];
FILE *g_fp;
pthread_mutex_t g_guardian_lock = PTHREAD_MUTEX_INITIALIZER;
// The next two methods are not in dynhandler.cc because they use a few items declared in this file.
static string DLCycleHandler(const vector<string>&parts, pid_t ppid)
{
kill(cpid, SIGKILL); // why?
kill(cpid, SIGKILL); // why?
sleep(1);
return "ok";
}
static string DLRestHandler(const vector<string>&parts, pid_t ppid)
{
string line;
for(vector<string>::const_iterator i=parts.begin();i!=parts.end();++i) {
if(i!=parts.begin())
line.append(1,' ');
line.append(*i);
}
line.append(1,'\n');
Lock l(&g_guardian_lock);
try {
writen2(g_fd1[1],line.c_str(),line.size()+1);
}
catch(PDNSException &ae) {
return "Error communicating with instance: "+ae.reason;
}
char mesg[512];
string response;
while(fgets(mesg,sizeof(mesg),g_fp)) {
if(*mesg=='\0')
break;
response+=mesg;
}
boost::trim_right(response);
return response;
}
static int guardian(int argc, char **argv)
{
if(isGuarded(argv))
return 0;
int infd=0, outfd=1;
DynListener dlg(s_programname);
dlg.registerFunc("QUIT",&DLQuitHandler, "quit daemon");
dlg.registerFunc("CYCLE",&DLCycleHandler, "restart instance");
dlg.registerFunc("PING",&DLPingHandler, "ping guardian");
dlg.registerFunc("STATUS",&DLStatusHandler, "get instance status from guardian");
dlg.registerRestFunc(&DLRestHandler);
dlg.go();
string progname=argv[0];
bool first=true;
cpid=0;
pthread_mutex_lock(&g_guardian_lock);
for(;;) {
int pid;
setStatus("Launching child");
if(pipe(g_fd1)<0 || pipe(g_fd2)<0) {
L<<Logger::Critical<<"Unable to open pipe for coprocess: "<<strerror(errno)<<endl;
exit(1);
}
if(!(g_fp=fdopen(g_fd2[0],"r"))) {
L<<Logger::Critical<<"Unable to associate a file pointer with pipe: "<<stringerror()<<endl;
exit(1);
}
setbuf(g_fp,0); // no buffering please, confuses select
if(!(pid=fork())) { // child
signal(SIGTERM, SIG_DFL);
signal(SIGHUP, SIG_DFL);
signal(SIGUSR1, SIG_DFL);
signal(SIGUSR2, SIG_DFL);
char **const newargv=new char*[argc+2];
int n;
if(::arg()["config-name"]!="") {
progname+="-"+::arg()["config-name"];
L<<Logger::Error<<"Virtual configuration name: "<<::arg()["config-name"]<<endl;
}
newargv[0]=strdup(const_cast<char *>((progname+"-instance").c_str()));
for(n=1;n<argc;n++) {
newargv[n]=argv[n];
}
newargv[n]=0;
L<<Logger::Error<<"Guardian is launching an instance"<<endl;
close(g_fd1[1]);
fclose(g_fp); // this closes g_fd2[0] for us
if(g_fd1[0]!= infd) {
dup2(g_fd1[0], infd);
close(g_fd1[0]);
}
if(g_fd2[1]!= outfd) {
dup2(g_fd2[1], outfd);
close(g_fd2[1]);
}
if(execvp(argv[0], newargv)<0) {
L<<Logger::Error<<"Unable to execvp '"<<argv[0]<<"': "<<strerror(errno)<<endl;
char **p=newargv;
while(*p)
L<<Logger::Error<<*p++<<endl;
exit(1);
}
L<<Logger::Error<<"execvp returned!!"<<endl;
// never reached
}
else if(pid>0) { // parent
close(g_fd1[0]);
close(g_fd2[1]);
if(first) {
first=false;
signal(SIGTERM, takedown);
signal(SIGHUP, SIG_IGN);
signal(SIGUSR1, SIG_IGN);
signal(SIGUSR2, SIG_IGN);
writePid();
}
pthread_mutex_unlock(&g_guardian_lock);
int status;
cpid=pid;
for(;;) {
int ret=waitpid(pid,&status,WNOHANG);
if(ret<0) {
L<<Logger::Error<<"In guardian loop, waitpid returned error: "<<strerror(errno)<<endl;
L<<Logger::Error<<"Dying"<<endl;
exit(1);
}
else if(ret) // something exited
break;
else { // child is alive
// execute some kind of ping here
if(DLQuitPlease())
takedown(1); // needs a parameter..
setStatus("Child running on pid "+itoa(pid));
sleep(1);
}
}
pthread_mutex_lock(&g_guardian_lock);
close(g_fd1[1]);
fclose(g_fp);
g_fp=0;
if(WIFEXITED(status)) {
int ret=WEXITSTATUS(status);
if(ret==99) {
L<<Logger::Error<<"Child requested a stop, exiting"<<endl;
exit(1);
}
setStatus("Child died with code "+itoa(ret));
L<<Logger::Error<<"Our pdns instance exited with code "<<ret<<", respawning"<<endl;
sleep(1);
continue;
}
if(WIFSIGNALED(status)) {
int sig=WTERMSIG(status);
setStatus("Child died because of signal "+itoa(sig));
L<<Logger::Error<<"Our pdns instance ("<<pid<<") exited after signal "<<sig<<endl;
#ifdef WCOREDUMP
if(WCOREDUMP(status))
L<<Logger::Error<<"Dumped core"<<endl;
#endif
L<<Logger::Error<<"Respawning"<<endl;
sleep(1);
continue;
}
L<<Logger::Error<<"No clue what happened! Respawning"<<endl;
}
else {
L<<Logger::Error<<"Unable to fork: "<<strerror(errno)<<endl;
exit(1);
}
}
}
static void UNIX_declareArguments()
{
::arg().set("config-dir","Location of configuration directory (pdns.conf)")=SYSCONFDIR;
::arg().set("config-name","Name of this virtual configuration - will rename the binary image")="";
::arg().set("socket-dir",string("Where the controlsocket will live, ")+LOCALSTATEDIR+" when unset and not chrooted" )="";
::arg().set("module-dir","Default directory for modules")=PKGLIBDIR;
::arg().set("chroot","If set, chroot to this directory for more security")="";
::arg().set("logging-facility","Log under a specific facility")="";
::arg().set("daemon","Operate as a daemon")="no";
}
static void loadModules()
{
if(!::arg()["load-modules"].empty()) {
vector<string>modules;
stringtok(modules,::arg()["load-modules"],", ");
for(vector<string>::const_iterator i=modules.begin();i!=modules.end();++i) {
bool res;
const string &module=*i;
if(module.find(".")==string::npos)
res=UeberBackend::loadmodule(::arg()["module-dir"]+"/lib"+module+"backend.so");
else if(module[0]=='/' || (module[0]=='.' && module[1]=='/') || (module[0]=='.' && module[1]=='.')) // absolute or current path
res=UeberBackend::loadmodule(module);
else
res=UeberBackend::loadmodule(::arg()["module-dir"]+"/"+module);
if(res==false) {
L<<Logger::Error<<"Receiver unable to load module "<<module<<endl;
exit(1);
}
}
}
}
#ifdef __GLIBC__
#include <execinfo.h>
static void tbhandler(int num)
{
L<<Logger::Critical<<"Got a signal "<<num<<", attempting to print trace: "<<endl;
void *array[20]; //only care about last 17 functions (3 taken with tracing support)
size_t size;
char **strings;
size_t i;
size = backtrace (array, 20);
strings = backtrace_symbols (array, size); //Need -rdynamic gcc (linker) flag for this to work
for (i = 0; i < size; i++) //skip useless functions
L<<Logger::Error<<strings[i]<<endl;
signal(SIGABRT, SIG_DFL);
abort();//hopefully will give core
}
#endif
//! The main function of pdns, the pdns process
int main(int argc, char **argv)
{
versionSetProduct(ProductAuthoritative);
reportAllTypes(); // init MOADNSParser
s_programname="pdns";
s_starttime=time(0);
#ifdef __GLIBC__
signal(SIGSEGV,tbhandler);
signal(SIGFPE,tbhandler);
signal(SIGABRT,tbhandler);
signal(SIGILL,tbhandler);
#endif
#if __GNUC__ >= 3
std::ios_base::sync_with_stdio(false);
#endif
L.toConsole(Logger::Warning);
try {
declareArguments();
UNIX_declareArguments();
::arg().laxParse(argc,argv); // do a lax parse
if(::arg().mustDo("version")) {
showProductVersion();
showBuildConfiguration();
exit(99);
}
if(::arg()["config-name"]!="")
s_programname+="-"+::arg()["config-name"];
(void)theL(s_programname);
string configname=::arg()["config-dir"]+"/"+s_programname+".conf";
cleanSlashes(configname);
if(!::arg().mustDo("config") && !::arg().mustDo("no-config")) // "config" == print a configuration file
::arg().laxFile(configname.c_str());
::arg().laxParse(argc,argv); // reparse so the commandline still wins
if(!::arg()["logging-facility"].empty()) {
int val=logFacilityToLOG(::arg().asNum("logging-facility") );
if(val >= 0)
theL().setFacility(val);
else
L<<Logger::Error<<"Unknown logging facility "<<::arg().asNum("logging-facility") <<endl;
}
L.setLoglevel((Logger::Urgency)(::arg().asNum("loglevel")));
L.toConsole((Logger::Urgency)(::arg().asNum("loglevel")));
if(::arg().mustDo("help") || ::arg().mustDo("config")) {
::arg().set("daemon")="no";
::arg().set("guardian")="no";
}
if(::arg().mustDo("guardian") && !isGuarded(argv)) {
if(::arg().mustDo("daemon")) {
L.toConsole(Logger::Critical);
daemonize();
}
guardian(argc, argv);
// never get here, guardian will reinvoke process
cerr<<"Um, we did get here!"<<endl;
}
// we really need to do work - either standalone or as an instance
#ifdef __GLIBC__
if(!::arg().mustDo("traceback-handler")) {
L<<Logger::Warning<<"Disabling traceback handler"<<endl;
signal(SIGSEGV,SIG_DFL);
signal(SIGFPE,SIG_DFL);
signal(SIGABRT,SIG_DFL);
signal(SIGILL,SIG_DFL);
}
#endif
seedRandom(::arg()["entropy-source"]);
#ifdef HAVE_LIBSODIUM
if (sodium_init() == -1) {
cerr<<"Unable to initialize sodium crypto library"<<endl;
exit(99);
}
#endif
openssl_thread_setup();
openssl_seed();
loadModules();
BackendMakers().launch(::arg()["launch"]); // vrooooom!
if(!::arg().getCommands().empty()) {
cerr<<"Fatal: non-option on the command line, perhaps a '--setting=123' statement missed the '='?"<<endl;
exit(99);
}
if(::arg().mustDo("help")) {
cout<<"syntax:"<<endl<<endl;
cout<<::arg().helpstring(::arg()["help"])<<endl;
exit(0);
}
if(::arg().mustDo("config")) {
cout<<::arg().configstring()<<endl;
exit(99);
}
if(::arg().mustDo("list-modules")) {
auto modules = BackendMakers().getModules();
cout<<"Modules available:"<<endl;
for(const auto& m : modules)
cout<< m <<endl;
_exit(99);
}
if(!::arg().asNum("local-port")) {
L<<Logger::Error<<"Unable to launch, binding to no port or port 0 makes no sense"<<endl;
exit(99); // this isn't going to fix itself either
}
if(!BackendMakers().numLauncheable()) {
L<<Logger::Error<<"Unable to launch, no backends configured for querying"<<endl;
exit(99); // this isn't going to fix itself either
}
if(::arg().mustDo("daemon")) {
L.toConsole(Logger::None);
if(!isGuarded(argv))
daemonize();
}
if(isGuarded(argv)) {
L<<Logger::Warning<<"This is a guarded instance of pdns"<<endl;
dl=new DynListener; // listens on stdin
}
else {
L<<Logger::Warning<<"This is a standalone pdns"<<endl;
if(::arg().mustDo("control-console"))
dl=new DynListener();
else
dl=new DynListener(s_programname);
writePid();
}
DynListener::registerFunc("SHOW",&DLShowHandler, "show a specific statistic or * to get a list", "<statistic>");
DynListener::registerFunc("RPING",&DLPingHandler, "ping instance");
DynListener::registerFunc("QUIT",&DLRQuitHandler, "quit daemon");
DynListener::registerFunc("UPTIME",&DLUptimeHandler, "get instance uptime");
DynListener::registerFunc("NOTIFY-HOST",&DLNotifyHostHandler, "notify host for specific domain", "<domain> <host>");
DynListener::registerFunc("NOTIFY",&DLNotifyHandler, "queue a notification", "<domain>");
DynListener::registerFunc("RELOAD",&DLReloadHandler, "reload all zones");
DynListener::registerFunc("REDISCOVER",&DLRediscoverHandler, "discover any new zones");
DynListener::registerFunc("VERSION",&DLVersionHandler, "get instance version");
DynListener::registerFunc("PURGE",&DLPurgeHandler, "purge entries from packet cache", "[<record>]");
DynListener::registerFunc("CCOUNTS",&DLCCHandler, "get cache statistics");
DynListener::registerFunc("QTYPES", &DLQTypesHandler, "get QType statistics");
DynListener::registerFunc("RESPSIZES", &DLRSizesHandler, "get histogram of response sizes");
DynListener::registerFunc("REMOTES", &DLRemotesHandler, "get top remotes");
DynListener::registerFunc("SET",&DLSettingsHandler, "set config variables", "<var> <value>");
DynListener::registerFunc("RETRIEVE",&DLNotifyRetrieveHandler, "retrieve slave domain", "<domain>");
DynListener::registerFunc("CURRENT-CONFIG",&DLCurrentConfigHandler, "retrieve the current configuration");
DynListener::registerFunc("LIST-ZONES",&DLListZones, "show list of zones", "[master|slave|native]");
DynListener::registerFunc("POLICY",&DLPolicy, "interact with policy engine", "[policy command]");
DynListener::registerFunc("TOKEN-LOGIN", &DLTokenLogin, "Login to a PKCS#11 token", "<module> <slot> <pin>");
if(!::arg()["tcp-control-address"].empty()) {
DynListener* dlTCP=new DynListener(ComboAddress(::arg()["tcp-control-address"], ::arg().asNum("tcp-control-port")));
dlTCP->go();
}
// reparse, with error checking
if(!::arg().mustDo("no-config"))
::arg().file(configname.c_str());
::arg().parse(argc,argv);
if(::arg()["server-id"].empty()) {
char tmp[128];
gethostname(tmp, sizeof(tmp)-1);
::arg().set("server-id")=tmp;
}
UeberBackend::go();
N=new UDPNameserver; // this fails when we are not root, throws exception
if(!::arg().mustDo("disable-tcp"))
TN=new TCPNameserver;
}
catch(const ArgException &A) {
L<<Logger::Error<<"Fatal error: "<<A.reason<<endl;
exit(1);
}
declareStats();
DLOG(L<<Logger::Warning<<"Verbose logging in effect"<<endl);
showProductVersion();
try {
mainthread();
}
catch(PDNSException &AE) {
if(!::arg().mustDo("daemon"))
cerr<<"Exiting because: "<<AE.reason<<endl;
L<<Logger::Error<<"Exiting because: "<<AE.reason<<endl;
}
catch(std::exception &e) {
if(!::arg().mustDo("daemon"))
cerr<<"Exiting because of STL error: "<<e.what()<<endl;
L<<Logger::Error<<"Exiting because of STL error: "<<e.what()<<endl;
}
catch(...) {
cerr<<"Uncaught exception of unknown type - sorry"<<endl;
}
exit(1);
}
| gpl-2.0 |
OpenMandrivaSoftware/initscripts | src/shvar.h | 3233 | /*
* shvar.h
*
* Interface for non-destructively reading/writing files containing
* only shell variable declarations and full-line comments.
*
* Includes explicit inheritance mechanism intended for use with
* Red Hat Linux ifcfg-* files. There is no protection against
* inheritance loops; they will generally cause stack overflows.
* Furthermore, they are only intended for one level of inheritance;
* the value setting algorithm assumes this.
*
* Copyright 1999 Red Hat, Inc.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
#ifndef _SHVAR_H
#define _SHVAR_H
#include <glib.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef struct _shvarFile shvarFile;
struct _shvarFile {
char *fileName; /* read-only */
int fd; /* read-only */
char *arena; /* ignore */
GList *lineList; /* read-only */
GList *freeList; /* ignore */
GList *current; /* set implicitly or explicitly,
points to element of lineList */
shvarFile *parent; /* set explicitly */
int modified; /* ignore */
};
/* Create the file <name>, return shvarFile on success, NULL on failure */
shvarFile *
svCreateFile(const char *name);
/* Open the file <name>, return shvarFile on success, NULL on failure */
shvarFile *
svNewFile(const char *name);
/* Get the value associated with the key, and leave the current pointer
* pointing at the line containing the value. The char* returned MUST
* be freed by the caller.
*/
char *
svGetValue(shvarFile *s, const char *key);
/* return 1 if <key> resolves to any truth value (e.g. "yes", "y", "true")
* return 0 if <key> resolves to any non-truth value (e.g. "no", "n", "false")
* return <def> otherwise
*/
int
svTrueValue(shvarFile *s, const char *key, int def);
/* Set the variable <key> equal to the value <value>.
* If <key> does not exist, and the <current> pointer is set, append
* the key=value pair after that line. Otherwise, prepend the pair
* to the top of the file.
*/
void
svSetValue(shvarFile *s, const char *key, const char *value);
/* Write the current contents iff modified. Returns -1 on error
* and 0 on success. Do not write if no values have been modified.
* The mode argument is only used if creating the file, not if
* re-writing an existing file, and is passed unchanged to the
* open() syscall.
*/
int
svWriteFile(shvarFile *s, int mode);
/* Close the file descriptor (if open) and delete the shvarFile.
* Returns -1 on error and 0 on success.
*/
int
svCloseFile(shvarFile *s);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* ! _SHVAR_H */
| gpl-2.0 |
HevdavDEV/DeathCore_3.3.5a | src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp | 25778 | /*
* Copyright (C) 2013-2015 DeathCore <http://www.noffearrdeathproject.net/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "SpellScript.h"
#include "SpellAuraEffects.h"
#include "ulduar.h"
#include "Vehicle.h"
#include "Player.h"
/* ScriptData
SDName: boss_kologarn
SD%Complete: 90
SDComment: @todo Achievements
SDCategory: Ulduar
EndScriptData */
enum Spells
{
SPELL_ARM_DEAD_DAMAGE = 63629,
SPELL_TWO_ARM_SMASH = 63356,
SPELL_ONE_ARM_SMASH = 63573,
SPELL_ARM_SWEEP = 63766,
SPELL_STONE_SHOUT = 63716,
SPELL_PETRIFY_BREATH = 62030,
SPELL_STONE_GRIP = 62166,
SPELL_STONE_GRIP_CANCEL = 65594,
SPELL_SUMMON_RUBBLE = 63633,
SPELL_FALLING_RUBBLE = 63821,
SPELL_ARM_ENTER_VEHICLE = 65343,
SPELL_ARM_ENTER_VISUAL = 64753,
SPELL_SUMMON_FOCUSED_EYEBEAM = 63342,
SPELL_FOCUSED_EYEBEAM_PERIODIC = 63347,
SPELL_FOCUSED_EYEBEAM_VISUAL = 63369,
SPELL_FOCUSED_EYEBEAM_VISUAL_LEFT = 63676,
SPELL_FOCUSED_EYEBEAM_VISUAL_RIGHT = 63702,
// Passive
SPELL_KOLOGARN_REDUCE_PARRY = 64651,
SPELL_KOLOGARN_PACIFY = 63726,
SPELL_KOLOGARN_UNK_0 = 65219, // Not found in DBC
SPELL_BERSERK = 47008 // guess
};
enum NPCs
{
NPC_RUBBLE_STALKER = 33809,
NPC_ARM_SWEEP_STALKER = 33661
};
enum Events
{
EVENT_NONE = 0,
EVENT_INSTALL_ACCESSORIES,
EVENT_MELEE_CHECK,
EVENT_SMASH,
EVENT_SWEEP,
EVENT_STONE_SHOUT,
EVENT_STONE_GRIP,
EVENT_FOCUSED_EYEBEAM,
EVENT_RESPAWN_LEFT_ARM,
EVENT_RESPAWN_RIGHT_ARM,
EVENT_ENRAGE,
};
enum Yells
{
SAY_AGGRO = 0,
SAY_SLAY = 1,
SAY_LEFT_ARM_GONE = 2,
SAY_RIGHT_ARM_GONE = 3,
SAY_SHOCKWAVE = 4,
SAY_GRAB_PLAYER = 5,
SAY_DEATH = 6,
SAY_BERSERK = 7,
EMOTE_STONE_GRIP = 8
};
class boss_kologarn : public CreatureScript
{
public:
boss_kologarn() : CreatureScript("boss_kologarn") { }
struct boss_kologarnAI : public BossAI
{
boss_kologarnAI(Creature* creature) : BossAI(creature, BOSS_KOLOGARN), vehicle(creature->GetVehicleKit()),
left(false), right(false)
{
ASSERT(vehicle);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
DoCast(SPELL_KOLOGARN_REDUCE_PARRY);
SetCombatMovement(false);
Reset();
}
Vehicle* vehicle;
bool left, right;
ObjectGuid eyebeamTarget;
void EnterCombat(Unit* /*who*/) override
{
Talk(SAY_AGGRO);
events.ScheduleEvent(EVENT_MELEE_CHECK, 6000);
events.ScheduleEvent(EVENT_SMASH, 5000);
events.ScheduleEvent(EVENT_SWEEP, 19000);
events.ScheduleEvent(EVENT_STONE_GRIP, 25000);
events.ScheduleEvent(EVENT_FOCUSED_EYEBEAM, 21000);
events.ScheduleEvent(EVENT_ENRAGE, 600000);
for (uint8 i = 0; i < 2; ++i)
if (Unit* arm = vehicle->GetPassenger(i))
arm->ToCreature()->SetInCombatWithZone();
_EnterCombat();
}
void Reset() override
{
_Reset();
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
eyebeamTarget.Clear();
}
void JustDied(Unit* /*killer*/) override
{
Talk(SAY_DEATH);
DoCast(SPELL_KOLOGARN_PACIFY);
me->GetMotionMaster()->MoveTargetedHome();
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetCorpseDelay(604800); // Prevent corpse from despawning.
_JustDied();
}
void KilledUnit(Unit* who) override
{
if (who->GetTypeId() == TYPEID_PLAYER)
Talk(SAY_SLAY);
}
void PassengerBoarded(Unit* who, int8 /*seatId*/, bool apply) override
{
bool isEncounterInProgress = instance->GetBossState(BOSS_KOLOGARN) == IN_PROGRESS;
if (who->GetEntry() == NPC_LEFT_ARM)
{
left = apply;
if (!apply && isEncounterInProgress)
{
Talk(SAY_LEFT_ARM_GONE);
events.ScheduleEvent(EVENT_RESPAWN_LEFT_ARM, 40000);
}
}
else if (who->GetEntry() == NPC_RIGHT_ARM)
{
right = apply;
if (!apply && isEncounterInProgress)
{
Talk(SAY_RIGHT_ARM_GONE);
events.ScheduleEvent(EVENT_RESPAWN_RIGHT_ARM, 40000);
}
}
if (!isEncounterInProgress)
return;
if (!apply)
{
who->CastSpell(me, SPELL_ARM_DEAD_DAMAGE, true);
if (Creature* rubbleStalker = who->FindNearestCreature(NPC_RUBBLE_STALKER, 70.0f))
{
rubbleStalker->CastSpell(rubbleStalker, SPELL_FALLING_RUBBLE, true);
rubbleStalker->CastSpell(rubbleStalker, SPELL_SUMMON_RUBBLE, true);
who->ToCreature()->DespawnOrUnsummon();
}
if (!right && !left)
events.ScheduleEvent(EVENT_STONE_SHOUT, 5000);
instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, CRITERIA_DISARMED);
}
else
{
events.CancelEvent(EVENT_STONE_SHOUT);
who->ToCreature()->SetInCombatWithZone();
}
}
void JustSummoned(Creature* summon) override
{
switch (summon->GetEntry())
{
case NPC_FOCUSED_EYEBEAM:
summon->CastSpell(me, SPELL_FOCUSED_EYEBEAM_VISUAL_LEFT, true);
break;
case NPC_FOCUSED_EYEBEAM_RIGHT:
summon->CastSpell(me, SPELL_FOCUSED_EYEBEAM_VISUAL_RIGHT, true);
break;
case NPC_RUBBLE:
summons.Summon(summon);
// absence of break intended
default:
return;
}
summon->CastSpell(summon, SPELL_FOCUSED_EYEBEAM_PERIODIC, true);
summon->CastSpell(summon, SPELL_FOCUSED_EYEBEAM_VISUAL, true);
summon->SetReactState(REACT_PASSIVE);
// One of the above spells is a channeled spell, we need to clear this unit state for MoveChase to work
summon->ClearUnitState(UNIT_STATE_CASTING);
// Victim gets 67351
if (eyebeamTarget)
{
if (Unit* target = ObjectAccessor::GetUnit(*summon, eyebeamTarget))
{
summon->Attack(target, false);
summon->GetMotionMaster()->MoveChase(target);
}
}
}
void UpdateAI(uint32 diff) override
{
if (!UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_MELEE_CHECK:
if (!me->IsWithinMeleeRange(me->GetVictim()))
DoCast(SPELL_PETRIFY_BREATH);
events.ScheduleEvent(EVENT_MELEE_CHECK, 1 * IN_MILLISECONDS);
break;
case EVENT_SWEEP:
if (left)
DoCast(me->FindNearestCreature(NPC_ARM_SWEEP_STALKER, 500.0f, true), SPELL_ARM_SWEEP, true);
events.ScheduleEvent(EVENT_SWEEP, 25 * IN_MILLISECONDS);
break;
case EVENT_SMASH:
if (left && right)
DoCastVictim(SPELL_TWO_ARM_SMASH);
else if (left || right)
DoCastVictim(SPELL_ONE_ARM_SMASH);
events.ScheduleEvent(EVENT_SMASH, 15 * IN_MILLISECONDS);
break;
case EVENT_STONE_SHOUT:
DoCast(SPELL_STONE_SHOUT);
events.ScheduleEvent(EVENT_STONE_SHOUT, 2 * IN_MILLISECONDS);
break;
case EVENT_ENRAGE:
DoCast(SPELL_BERSERK);
Talk(SAY_BERSERK);
break;
case EVENT_RESPAWN_LEFT_ARM:
case EVENT_RESPAWN_RIGHT_ARM:
{
if (vehicle)
{
int8 seat = eventId == EVENT_RESPAWN_LEFT_ARM ? 0 : 1;
uint32 entry = eventId == EVENT_RESPAWN_LEFT_ARM ? NPC_LEFT_ARM : NPC_RIGHT_ARM;
vehicle->InstallAccessory(entry, seat, true, TEMPSUMMON_MANUAL_DESPAWN, 0);
}
break;
}
case EVENT_STONE_GRIP:
{
if (right)
{
DoCast(SPELL_STONE_GRIP);
Talk(SAY_GRAB_PLAYER);
Talk(EMOTE_STONE_GRIP);
}
events.ScheduleEvent(EVENT_STONE_GRIP, 25 * IN_MILLISECONDS);
break;
}
case EVENT_FOCUSED_EYEBEAM:
if (Unit* eyebeamTargetUnit = SelectTarget(SELECT_TARGET_FARTHEST, 0, 0, true))
{
eyebeamTarget = eyebeamTargetUnit->GetGUID();
DoCast(me, SPELL_SUMMON_FOCUSED_EYEBEAM, true);
}
events.ScheduleEvent(EVENT_FOCUSED_EYEBEAM, urand(15, 35) * IN_MILLISECONDS);
break;
}
}
DoMeleeAttackIfReady();
}
};
CreatureAI* GetAI(Creature* creature) const override
{
return GetUlduarAI<boss_kologarnAI>(creature);
}
};
class spell_ulduar_rubble_summon : public SpellScriptLoader
{
public:
spell_ulduar_rubble_summon() : SpellScriptLoader("spell_ulduar_rubble_summon") { }
class spell_ulduar_rubble_summonSpellScript : public SpellScript
{
PrepareSpellScript(spell_ulduar_rubble_summonSpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
Unit* caster = GetCaster();
if (!caster)
return;
ObjectGuid originalCaster = caster->GetInstanceScript() ? caster->GetInstanceScript()->GetGuidData(BOSS_KOLOGARN) : ObjectGuid::Empty;
uint32 spellId = GetEffectValue();
for (uint8 i = 0; i < 5; ++i)
caster->CastSpell(caster, spellId, true, NULL, NULL, originalCaster);
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_ulduar_rubble_summonSpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_ulduar_rubble_summonSpellScript();
}
};
// predicate function to select non main tank target
class StoneGripTargetSelector : public std::unary_function<Unit*, bool>
{
public:
StoneGripTargetSelector(Creature* me, Unit const* victim) : _me(me), _victim(victim) { }
bool operator()(WorldObject* target)
{
if (target == _victim && _me->getThreatManager().getThreatList().size() > 1)
return true;
if (target->GetTypeId() != TYPEID_PLAYER)
return true;
return false;
}
Creature* _me;
Unit const* _victim;
};
class spell_ulduar_stone_grip_cast_target : public SpellScriptLoader
{
public:
spell_ulduar_stone_grip_cast_target() : SpellScriptLoader("spell_ulduar_stone_grip_cast_target") { }
class spell_ulduar_stone_grip_cast_target_SpellScript : public SpellScript
{
PrepareSpellScript(spell_ulduar_stone_grip_cast_target_SpellScript);
bool Load() override
{
if (GetCaster()->GetTypeId() != TYPEID_UNIT)
return false;
return true;
}
void FilterTargetsInitial(std::list<WorldObject*>& unitList)
{
// Remove "main tank" and non-player targets
unitList.remove_if(StoneGripTargetSelector(GetCaster()->ToCreature(), GetCaster()->GetVictim()));
// Maximum affected targets per difficulty mode
uint32 maxTargets = 1;
if (GetSpellInfo()->Id == 63981)
maxTargets = 3;
// Return a random amount of targets based on maxTargets
while (maxTargets < unitList.size())
{
std::list<WorldObject*>::iterator itr = unitList.begin();
advance(itr, urand(0, unitList.size()-1));
unitList.erase(itr);
}
// For subsequent effects
_unitList = unitList;
}
void FillTargetsSubsequential(std::list<WorldObject*>& unitList)
{
unitList = _unitList;
}
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_ulduar_stone_grip_cast_target_SpellScript::FilterTargetsInitial, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_ulduar_stone_grip_cast_target_SpellScript::FillTargetsSubsequential, EFFECT_1, TARGET_UNIT_SRC_AREA_ENEMY);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_ulduar_stone_grip_cast_target_SpellScript::FillTargetsSubsequential, EFFECT_2, TARGET_UNIT_SRC_AREA_ENEMY);
}
private:
// Shared between effects
std::list<WorldObject*> _unitList;
};
SpellScript* GetSpellScript() const override
{
return new spell_ulduar_stone_grip_cast_target_SpellScript();
}
};
class spell_ulduar_cancel_stone_grip : public SpellScriptLoader
{
public:
spell_ulduar_cancel_stone_grip() : SpellScriptLoader("spell_ulduar_cancel_stone_grip") { }
class spell_ulduar_cancel_stone_gripSpellScript : public SpellScript
{
PrepareSpellScript(spell_ulduar_cancel_stone_gripSpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
Unit* target = GetHitUnit();
if (!target || !target->GetVehicle())
return;
switch (target->GetMap()->GetDifficulty())
{
case RAID_DIFFICULTY_10MAN_NORMAL:
target->RemoveAura(GetSpellInfo()->Effects[EFFECT_0].CalcValue());
break;
case RAID_DIFFICULTY_25MAN_NORMAL:
target->RemoveAura(GetSpellInfo()->Effects[EFFECT_1].CalcValue());
break;
default:
break;
}
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_ulduar_cancel_stone_gripSpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_ulduar_cancel_stone_gripSpellScript();
}
};
class spell_ulduar_squeezed_lifeless : public SpellScriptLoader
{
public:
spell_ulduar_squeezed_lifeless() : SpellScriptLoader("spell_ulduar_squeezed_lifeless") { }
class spell_ulduar_squeezed_lifeless_SpellScript : public SpellScript
{
PrepareSpellScript(spell_ulduar_squeezed_lifeless_SpellScript);
void HandleInstaKill(SpellEffIndex /*effIndex*/)
{
if (!GetHitPlayer() || !GetHitPlayer()->GetVehicle())
return;
//! Proper exit position does not work currently,
//! See documentation in void Unit::ExitVehicle(Position const* exitPosition)
Position pos;
pos.m_positionX = 1756.25f + irand(-3, 3);
pos.m_positionY = -8.3f + irand(-3, 3);
pos.m_positionZ = 448.8f;
pos.SetOrientation(float(M_PI));
GetHitPlayer()->DestroyForNearbyPlayers();
GetHitPlayer()->ExitVehicle(&pos);
GetHitPlayer()->UpdateObjectVisibility(false);
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_ulduar_squeezed_lifeless_SpellScript::HandleInstaKill, EFFECT_1, SPELL_EFFECT_INSTAKILL);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_ulduar_squeezed_lifeless_SpellScript();
}
};
class spell_ulduar_stone_grip_absorb : public SpellScriptLoader
{
public:
spell_ulduar_stone_grip_absorb() : SpellScriptLoader("spell_ulduar_stone_grip_absorb") { }
class spell_ulduar_stone_grip_absorb_AuraScript : public AuraScript
{
PrepareAuraScript(spell_ulduar_stone_grip_absorb_AuraScript);
//! This will be called when Right Arm (vehicle) has sustained a specific amount of damage depending on instance mode
//! What we do here is remove all harmful aura's related and teleport to safe spot.
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_ENEMY_SPELL)
return;
if (!GetOwner()->ToCreature())
return;
uint32 rubbleStalkerEntry = (GetOwner()->GetMap()->GetDifficulty() == DUNGEON_DIFFICULTY_NORMAL ? 33809 : 33942);
Creature* rubbleStalker = GetOwner()->FindNearestCreature(rubbleStalkerEntry, 200.0f, true);
if (rubbleStalker)
rubbleStalker->CastSpell(rubbleStalker, SPELL_STONE_GRIP_CANCEL, true);
}
void Register() override
{
AfterEffectRemove += AuraEffectRemoveFn(spell_ulduar_stone_grip_absorb_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_ulduar_stone_grip_absorb_AuraScript();
}
};
class spell_ulduar_stone_grip : public SpellScriptLoader
{
public:
spell_ulduar_stone_grip() : SpellScriptLoader("spell_ulduar_stone_grip") { }
class spell_ulduar_stone_grip_AuraScript : public AuraScript
{
PrepareAuraScript(spell_ulduar_stone_grip_AuraScript);
void OnRemoveStun(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
{
if (Player* owner = GetOwner()->ToPlayer())
owner->RemoveAurasDueToSpell(aurEff->GetAmount());
}
void OnRemoveVehicle(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
PreventDefaultAction();
Unit* caster = GetCaster();
if (!caster)
return;
Position exitPosition;
exitPosition.m_positionX = 1750.0f;
exitPosition.m_positionY = -7.5f + frand(-3.0f, 3.0f);
exitPosition.m_positionZ = 457.9322f;
// Remove pending passengers before exiting vehicle - might cause an Uninstall
GetTarget()->GetVehicleKit()->RemovePendingEventsForPassenger(caster);
caster->_ExitVehicle(&exitPosition);
caster->RemoveAurasDueToSpell(GetId());
// Temporarily relocate player to vehicle exit dest serverside to send proper fall movement
// beats me why blizzard sends these 2 spline packets one after another instantly
Position oldPos = caster->GetPosition();
caster->Relocate(exitPosition);
caster->GetMotionMaster()->MoveFall();
caster->Relocate(oldPos);
}
void Register() override
{
OnEffectRemove += AuraEffectRemoveFn(spell_ulduar_stone_grip_AuraScript::OnRemoveVehicle, EFFECT_0, SPELL_AURA_CONTROL_VEHICLE, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_ulduar_stone_grip_AuraScript::OnRemoveStun, EFFECT_2, SPELL_AURA_MOD_STUN, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_ulduar_stone_grip_AuraScript();
}
};
class spell_kologarn_stone_shout : public SpellScriptLoader
{
public:
spell_kologarn_stone_shout() : SpellScriptLoader("spell_kologarn_stone_shout") { }
class spell_kologarn_stone_shout_SpellScript : public SpellScript
{
PrepareSpellScript(spell_kologarn_stone_shout_SpellScript);
void FilterTargets(std::list<WorldObject*>& unitList)
{
unitList.remove_if(PlayerOrPetCheck());
}
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_kologarn_stone_shout_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_kologarn_stone_shout_SpellScript();
}
};
class spell_kologarn_summon_focused_eyebeam : public SpellScriptLoader
{
public:
spell_kologarn_summon_focused_eyebeam() : SpellScriptLoader("spell_kologarn_summon_focused_eyebeam") { }
class spell_kologarn_summon_focused_eyebeam_SpellScript : public SpellScript
{
PrepareSpellScript(spell_kologarn_summon_focused_eyebeam_SpellScript);
void HandleForceCast(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
GetCaster()->CastSpell(GetCaster(), GetSpellInfo()->Effects[effIndex].TriggerSpell, true);
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_kologarn_summon_focused_eyebeam_SpellScript::HandleForceCast, EFFECT_0, SPELL_EFFECT_FORCE_CAST);
OnEffectHitTarget += SpellEffectFn(spell_kologarn_summon_focused_eyebeam_SpellScript::HandleForceCast, EFFECT_1, SPELL_EFFECT_FORCE_CAST);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_kologarn_summon_focused_eyebeam_SpellScript();
}
};
void AddSC_boss_kologarn()
{
new boss_kologarn();
new spell_ulduar_rubble_summon();
new spell_ulduar_squeezed_lifeless();
new spell_ulduar_cancel_stone_grip();
new spell_ulduar_stone_grip_cast_target();
new spell_ulduar_stone_grip_absorb();
new spell_ulduar_stone_grip();
new spell_kologarn_stone_shout();
new spell_kologarn_summon_focused_eyebeam();
}
| gpl-2.0 |
Lsty/ygopro-scripts | c46263076.lua | 1755 | --地縛神 Ccapac Apu
function c46263076.initial_effect(c)
c:SetUniqueOnField(1,1,10000000)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_SELF_DESTROY)
e4:SetCondition(c46263076.sdcon)
c:RegisterEffect(e4)
--battle target
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(aux.imval1)
c:RegisterEffect(e5)
--direct atk
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e6)
--damage
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(46263076,0))
e7:SetCategory(CATEGORY_DAMAGE)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e7:SetCode(EVENT_BATTLE_DESTROYING)
e7:SetTarget(c46263076.damtg)
e7:SetOperation(c46263076.damop)
c:RegisterEffect(e7)
end
function c46263076.sdcon(e)
local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5)
local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup()))
end
function c46263076.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local tc=e:GetHandler():GetBattleTarget()
local atk=tc:GetBaseAttack()
if atk<0 then atk=0 end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(atk)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk)
end
function c46263076.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
| gpl-2.0 |
RasPlex/plex-home-theatre | tools/darwin/depends/breakpad/Makefile | 1271 | include ../Makefile.include
include ../config.site.mk
# lib name, version
BASE_URL=http://nightlies.plexapp.com/plex-media-server-sources
LIBNAME=breakpad
VERSION=20140814
SOURCE=$(LIBNAME)-$(VERSION)
FILENAME=v$(VERSION)
ARCHIVE=$(SOURCE).tar.bz2
LIBDYLIB=$(SOURCE)/build/src/lib$(LIBNAME)_client.a
all: $(LIBDYLIB) .installed
$(TARBALLS_LOCATION)/$(ARCHIVE):
$(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE)
rm -rf $(SOURCE)
$(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
echo $(SOURCE) > .gitignore
cd $(SOURCE); rm -rf build; mkdir -p build
cd $(SOURCE)/build; CC="$(CC)" CXX="$(CXX)" cmake \
-DCMAKE_C_FLAGS:STRING="$(CPPFLAGS) $(CFLAGS)" \
-DCMAKE_CXX_FLAGS:STRING="$(CPPFLAGS) $(CXXFLAGS)" \
-DCMAKE_INCLUDE_PATH=$(PREFIX)/include \
-DCMAKE_LIBRARY_PATH=$(PREFIX)/lib \
-DCMAKE_INSTALL_NAME_DIR=$(PREFIX)/lib \
-DCMAKE_INSTALL_PREFIX=$(PREFIX) \
-DCMAKE_FIND_ROOT_PATH=$(platform_sdk_path) ..
$(LIBDYLIB): $(SOURCE)
make -j 1 -C $(SOURCE)/build
.installed:
make -C $(SOURCE)/build install
touch $@
clean:
rm -rf $(SOURCE) .installed
distclean::
rm -rf $(SOURCE) .installed
| gpl-2.0 |
jameyboor/TrinityCore | src/server/bnetserver/Services/AccountService.h | 1682 | /*
* Copyright (C) 2008-2019 TrinityCore <https://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef AccountService_h__
#define AccountService_h__
#include "Common.h"
#include "Service.h"
#include "account_service.pb.h"
namespace Battlenet
{
class Session;
namespace Services
{
class Account : public Service<account::v1::AccountService>
{
typedef Service<account::v1::AccountService> AccountService;
public:
Account(Session* session);
uint32 HandleGetAccountState(account::v1::GetAccountStateRequest const* request, account::v1::GetAccountStateResponse* response, std::function<void(ServiceBase*, uint32, ::google::protobuf::Message const*)>& continuation) override;
uint32 HandleGetGameAccountState(account::v1::GetGameAccountStateRequest const* request, account::v1::GetGameAccountStateResponse* response, std::function<void(ServiceBase*, uint32, ::google::protobuf::Message const*)>& continuation) override;
};
}
}
#endif // AccountService_h__
| gpl-2.0 |
SonicZentropy/ZenTool | Source/zen_utils/ZenDebug.cpp | 1033 | /* ==============================================================================
// ZenDebug.cpp
// Part of the Zentropia JUCE Collection
// Zentropia is hosted on Github at [https://github.com/SonicZentropy]
// @author Casey Bailey (<a href="[email protected]">email</a>)
// @version 0.1
// @date 2015/08/30
// Copyright (C) 2015 by Casey Bailey
// Provided under the GNU license
//
// Details: Static Utility Class for Debug-related code
================================================================================*/
#include "ZenDebug.h"
clock_t ZenDebug::inTime = clock();
int ZenDebug::numSecondsBetweenDebugPrints = 1;
void ZenDebug::setSecondsBetweenDebugPrints(const int& inSeconds)
{
numSecondsBetweenDebugPrints = inSeconds;
}
int ZenDebug::getSecondsBetweenDebugPrints()
{
return numSecondsBetweenDebugPrints;
}
bool ZenDebug::isPrintTimerThresholdReached()
{
if (((clock() - inTime) / CLOCKS_PER_SEC) > numSecondsBetweenDebugPrints)
{
inTime = clock();
return true;
}
return false;
} | gpl-2.0 |
AhmedSayedAhmed/MM_Portal | wp-content/plugins/wp-pipes/includes/phputf8/str_ireplace.php | 1864 | <?php
/**
* @version $Id: str_ireplace.php 23 2014-01-11 08:24:20Z thongta $
* @package utf8
* @subpackage strings
*/
//---------------------------------------------------------------
/**
* UTF-8 aware alternative to str_ireplace
* Case-insensitive version of str_replace
* Note: requires utf8_strtolower
* Note: it's not fast and gets slower if $search / $replace is array
* Notes: it's based on the assumption that the lower and uppercase
* versions of a UTF-8 character will have the same length in bytes
* which is currently true given the hash table to strtolower
*
* @param string
*
* @return string
* @see http://www.php.net/str_ireplace
* @see utf8_strtolower
* @package utf8
* @subpackage strings
*/
function utf8_ireplace( $search, $replace, $str, $count = NULL ) {
if ( ! is_array( $search ) ) {
$slen = strlen( $search );
if ( $slen == 0 ) {
return $str;
}
$lendif = strlen( $replace ) - strlen( $search );
$search = utf8_strtolower( $search );
$search = preg_quote( $search, '/' );
$lstr = utf8_strtolower( $str );
$i = 0;
$matched = 0;
while ( preg_match( '/(.*)' . $search . '/Us', $lstr, $matches ) ) {
if ( $i === $count ) {
break;
}
$mlen = strlen( $matches[0] );
$lstr = substr( $lstr, $mlen );
$str = substr_replace( $str, $replace, $matched + strlen( $matches[1] ), $slen );
$matched += $mlen + $lendif;
$i ++;
}
return $str;
} else {
foreach ( array_keys( $search ) as $k ) {
if ( is_array( $replace ) ) {
if ( array_key_exists( $k, $replace ) ) {
$str = utf8_ireplace( $search[$k], $replace[$k], $str, $count );
} else {
$str = utf8_ireplace( $search[$k], '', $str, $count );
}
} else {
$str = utf8_ireplace( $search[$k], $replace, $str, $count );
}
}
return $str;
}
}
| gpl-2.0 |
rfdrake/opennms | opennms-dao/src/main/java/org/opennms/netmgt/dao/support/FilterWalker.java | 4106 | /*******************************************************************************
* This file is part of OpenNMS(R).
*
* Copyright (C) 2007-2012 The OpenNMS Group, Inc.
* OpenNMS(R) is Copyright (C) 1999-2012 The OpenNMS Group, Inc.
*
* OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
*
* OpenNMS(R) is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
* by the Free Software Foundation, either version 3 of the License,
* or (at your option) any later version.
*
* OpenNMS(R) is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with OpenNMS(R). If not, see:
* http://www.gnu.org/licenses/
*
* For more information contact:
* OpenNMS(R) Licensing <[email protected]>
* http://www.opennms.org/
* http://www.opennms.com/
*******************************************************************************/
package org.opennms.netmgt.dao.support;
import java.util.SortedMap;
import org.opennms.netmgt.dao.api.NodeDao;
import org.opennms.netmgt.filter.FilterDao;
import org.opennms.netmgt.model.EntityVisitor;
import org.opennms.netmgt.model.OnmsNode;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.util.Assert;
/**
* <p>FilterWalker class.</p>
*
* @author <a href="mailto:[email protected]">DJ Gregor</a>
* @version $Id: $
*/
public class FilterWalker implements InitializingBean {
private NodeDao m_nodeDao;
private FilterDao m_filterDao;
private String m_filter;
private EntityVisitor m_visitor;
/**
* <p>walk</p>
*/
public void walk() {
SortedMap<Integer, String> map = getFilterDao().getNodeMap(m_filter);
if (map != null) {
for (final Integer nodeId : map.keySet()) {
final OnmsNode node = getNodeDao().load(nodeId);
m_visitor.visitNode(node);
}
}
}
/**
* <p>afterPropertiesSet</p>
*/
@Override
public void afterPropertiesSet() {
Assert.state(m_visitor != null, "property visitor must be set to a non-null value");
Assert.state(m_filterDao != null, "property filterDao must be set to a non-null value");
Assert.state(m_nodeDao != null, "property nodeDao must be set to a non-null value");
Assert.state(m_filter != null, "property filter must be set to a non-null value");
}
/**
* @return the nodeDao
*/
public NodeDao getNodeDao() {
return m_nodeDao;
}
/**
* @param nodeDao the nodeDao to set
*/
public void setNodeDao(NodeDao nodeDao) {
this.m_nodeDao = nodeDao;
}
/**
* <p>getVisitor</p>
*
* @return a {@link org.opennms.netmgt.model.ResourceVisitor} object.
*/
public EntityVisitor getVisitor() {
return m_visitor;
}
/**
* <p>setVisitor</p>
*
* @param visitor a {@link org.opennms.netmgt.model.ResourceVisitor} object.
*/
public void setVisitor(EntityVisitor visitor) {
m_visitor = visitor;
}
/**
* <p>getFilterDao</p>
*
* @return a {@link org.opennms.netmgt.filter.FilterDao} object.
*/
public FilterDao getFilterDao() {
return m_filterDao;
}
/**
* <p>setFilterDao</p>
*
* @param filterDao a {@link org.opennms.netmgt.filter.FilterDao} object.
*/
public void setFilterDao(FilterDao filterDao) {
m_filterDao = filterDao;
}
/**
* <p>getFilter</p>
*
* @return a {@link java.lang.String} object.
*/
public String getFilter() {
return m_filter;
}
/**
* <p>setFilter</p>
*
* @param filter a {@link java.lang.String} object.
*/
public void setFilter(String filter) {
m_filter = filter;
}
}
| gpl-2.0 |
m-kuhn/QGIS | src/gui/layertree/qgslayertreeembeddedwidgetsimpl.cpp | 4418 | /***************************************************************************
qgslayertreeembeddedwidgetsimpl.h
--------------------------------------
Date : May 2016
Copyright : (C) 2016 by Martin Dobias
Email : wonder dot sk at gmail dot com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "qgslayertreeembeddedwidgetsimpl.h"
#include <QHBoxLayout>
#include <QLabel>
#include <QSlider>
#include <QTimer>
#include "qgsrasterlayer.h"
#include "qgsrasterrenderer.h"
#include "qgsvectorlayer.h"
///@cond PRIVATE
QgsLayerTreeOpacityWidget::QgsLayerTreeOpacityWidget( QgsMapLayer *layer )
: mLayer( layer )
{
setAutoFillBackground( true ); // override the content from model
QLabel *l = new QLabel( QStringLiteral( "Opacity" ), this );
mSlider = new QSlider( Qt::Horizontal, this );
mSlider->setRange( 0, 1000 );
QHBoxLayout *lay = new QHBoxLayout();
lay->addWidget( l );
lay->addWidget( mSlider );
setLayout( lay );
// timer for delayed transparency update - for more responsive GUI
mTimer = new QTimer( this );
mTimer->setSingleShot( true );
mTimer->setInterval( 100 );
connect( mTimer, &QTimer::timeout, this, &QgsLayerTreeOpacityWidget::updateOpacityFromSlider );
connect( mSlider, &QAbstractSlider::valueChanged, this, &QgsLayerTreeOpacityWidget::sliderValueChanged );
// init from layer
switch ( mLayer->type() )
{
case QgsMapLayerType::VectorLayer:
{
QgsVectorLayer *vl = qobject_cast<QgsVectorLayer *>( mLayer );
mSlider->setValue( vl->opacity() * 1000.0 );
connect( vl, &QgsVectorLayer::opacityChanged, this, &QgsLayerTreeOpacityWidget::layerTrChanged );
break;
}
case QgsMapLayerType::RasterLayer:
{
mSlider->setValue( 1000 - qobject_cast<QgsRasterLayer *>( mLayer )->renderer()->opacity() * 1000 );
// TODO: there is no signal for raster layers
break;
}
case QgsMapLayerType::PluginLayer:
case QgsMapLayerType::MeshLayer:
break;
}
}
QSize QgsLayerTreeOpacityWidget::sizeHint() const
{
return QWidget::sizeHint();
//return QSize(200,200); // horizontal seems ignored, vertical is used for spacing
}
void QgsLayerTreeOpacityWidget::sliderValueChanged( int value )
{
Q_UNUSED( value );
if ( mTimer->isActive() )
return;
mTimer->start();
}
void QgsLayerTreeOpacityWidget::updateOpacityFromSlider()
{
int value = mSlider->value();
switch ( mLayer->type() )
{
case QgsMapLayerType::VectorLayer:
{
qobject_cast<QgsVectorLayer *>( mLayer )->setOpacity( value / 1000.0 );
break;
}
case QgsMapLayerType::RasterLayer:
{
qobject_cast<QgsRasterLayer *>( mLayer )->renderer()->setOpacity( 1 - value / 1000.0 );
break;
}
case QgsMapLayerType::PluginLayer:
case QgsMapLayerType::MeshLayer:
break;
}
mLayer->triggerRepaint();
}
void QgsLayerTreeOpacityWidget::layerTrChanged()
{
mSlider->blockSignals( true );
mSlider->setValue( qobject_cast<QgsVectorLayer *>( mLayer )->opacity() * 1000.0 );
mSlider->blockSignals( false );
}
//
QString QgsLayerTreeOpacityWidget::Provider::id() const
{
return QStringLiteral( "transparency" );
}
QString QgsLayerTreeOpacityWidget::Provider::name() const
{
return tr( "Opacity slider" );
}
QgsLayerTreeOpacityWidget *QgsLayerTreeOpacityWidget::Provider::createWidget( QgsMapLayer *layer, int widgetIndex )
{
Q_UNUSED( widgetIndex );
return new QgsLayerTreeOpacityWidget( layer );
}
bool QgsLayerTreeOpacityWidget::Provider::supportsLayer( QgsMapLayer *layer )
{
switch ( layer->type() )
{
case QgsMapLayerType::VectorLayer:
case QgsMapLayerType::RasterLayer:
return true;
case QgsMapLayerType::MeshLayer:
case QgsMapLayerType::PluginLayer:
return false;
}
return false;
}
///@endcond
| gpl-2.0 |
olerem/openocd | src/svf/svf.c | 43837 | /***************************************************************************
* Copyright (C) 2009 by Simon Qian *
* [email protected] *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
/* The specification for SVF is available here:
* http://www.asset-intertech.com/support/svf.pdf
* Below, this document is referred to as the "SVF spec".
*
* The specification for XSVF is available here:
* http://www.xilinx.com/support/documentation/application_notes/xapp503.pdf
* Below, this document is referred to as the "XSVF spec".
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <jtag/jtag.h>
#include "svf.h"
#include <helper/time_support.h>
/* SVF command */
enum svf_command {
ENDDR,
ENDIR,
FREQUENCY,
HDR,
HIR,
PIO,
PIOMAP,
RUNTEST,
SDR,
SIR,
STATE,
TDR,
TIR,
TRST,
};
static const char *svf_command_name[14] = {
"ENDDR",
"ENDIR",
"FREQUENCY",
"HDR",
"HIR",
"PIO",
"PIOMAP",
"RUNTEST",
"SDR",
"SIR",
"STATE",
"TDR",
"TIR",
"TRST"
};
enum trst_mode {
TRST_ON,
TRST_OFF,
TRST_Z,
TRST_ABSENT
};
static const char *svf_trst_mode_name[4] = {
"ON",
"OFF",
"Z",
"ABSENT"
};
struct svf_statemove {
tap_state_t from;
tap_state_t to;
uint32_t num_of_moves;
tap_state_t paths[8];
};
/*
* These paths are from the SVF specification for the STATE command, to be
* used when the STATE command only includes the final state. The first
* element of the path is the "from" (current) state, and the last one is
* the "to" (target) state.
*
* All specified paths are the shortest ones in the JTAG spec, and are thus
* not (!!) exact matches for the paths used elsewhere in OpenOCD. Note
* that PAUSE-to-PAUSE transitions all go through UPDATE and then CAPTURE,
* which has specific effects on the various registers; they are not NOPs.
*
* Paths to RESET are disabled here. As elsewhere in OpenOCD, and in XSVF
* and many SVF implementations, we don't want to risk missing that state.
* To get to RESET, always we ignore the current state.
*/
static const struct svf_statemove svf_statemoves[] = {
/* from to num_of_moves, paths[8] */
/* {TAP_RESET, TAP_RESET, 1, {TAP_RESET}}, */
{TAP_RESET, TAP_IDLE, 2, {TAP_RESET, TAP_IDLE} },
{TAP_RESET, TAP_DRPAUSE, 6, {TAP_RESET, TAP_IDLE, TAP_DRSELECT,
TAP_DRCAPTURE, TAP_DREXIT1, TAP_DRPAUSE} },
{TAP_RESET, TAP_IRPAUSE, 7, {TAP_RESET, TAP_IDLE, TAP_DRSELECT,
TAP_IRSELECT, TAP_IRCAPTURE,
TAP_IREXIT1, TAP_IRPAUSE} },
/* {TAP_IDLE, TAP_RESET, 4, {TAP_IDLE,
* TAP_DRSELECT, TAP_IRSELECT, TAP_RESET}}, */
{TAP_IDLE, TAP_IDLE, 1, {TAP_IDLE} },
{TAP_IDLE, TAP_DRPAUSE, 5, {TAP_IDLE, TAP_DRSELECT, TAP_DRCAPTURE,
TAP_DREXIT1, TAP_DRPAUSE} },
{TAP_IDLE, TAP_IRPAUSE, 6, {TAP_IDLE, TAP_DRSELECT, TAP_IRSELECT,
TAP_IRCAPTURE, TAP_IREXIT1, TAP_IRPAUSE} },
/* {TAP_DRPAUSE, TAP_RESET, 6, {TAP_DRPAUSE,
* TAP_DREXIT2, TAP_DRUPDATE, TAP_DRSELECT, TAP_IRSELECT, TAP_RESET}}, */
{TAP_DRPAUSE, TAP_IDLE, 4, {TAP_DRPAUSE, TAP_DREXIT2, TAP_DRUPDATE,
TAP_IDLE} },
{TAP_DRPAUSE, TAP_DRPAUSE, 7, {TAP_DRPAUSE, TAP_DREXIT2, TAP_DRUPDATE,
TAP_DRSELECT, TAP_DRCAPTURE,
TAP_DREXIT1, TAP_DRPAUSE} },
{TAP_DRPAUSE, TAP_IRPAUSE, 8, {TAP_DRPAUSE, TAP_DREXIT2, TAP_DRUPDATE,
TAP_DRSELECT, TAP_IRSELECT,
TAP_IRCAPTURE, TAP_IREXIT1, TAP_IRPAUSE} },
/* {TAP_IRPAUSE, TAP_RESET, 6, {TAP_IRPAUSE,
* TAP_IREXIT2, TAP_IRUPDATE, TAP_DRSELECT, TAP_IRSELECT, TAP_RESET}}, */
{TAP_IRPAUSE, TAP_IDLE, 4, {TAP_IRPAUSE, TAP_IREXIT2, TAP_IRUPDATE,
TAP_IDLE} },
{TAP_IRPAUSE, TAP_DRPAUSE, 7, {TAP_IRPAUSE, TAP_IREXIT2, TAP_IRUPDATE,
TAP_DRSELECT, TAP_DRCAPTURE,
TAP_DREXIT1, TAP_DRPAUSE} },
{TAP_IRPAUSE, TAP_IRPAUSE, 8, {TAP_IRPAUSE, TAP_IREXIT2, TAP_IRUPDATE,
TAP_DRSELECT, TAP_IRSELECT,
TAP_IRCAPTURE, TAP_IREXIT1, TAP_IRPAUSE} }
};
#define XXR_TDI (1 << 0)
#define XXR_TDO (1 << 1)
#define XXR_MASK (1 << 2)
#define XXR_SMASK (1 << 3)
struct svf_xxr_para {
int len;
int data_mask;
uint8_t *tdi;
uint8_t *tdo;
uint8_t *mask;
uint8_t *smask;
};
struct svf_para {
float frequency;
tap_state_t ir_end_state;
tap_state_t dr_end_state;
tap_state_t runtest_run_state;
tap_state_t runtest_end_state;
enum trst_mode trst_mode;
struct svf_xxr_para hir_para;
struct svf_xxr_para hdr_para;
struct svf_xxr_para tir_para;
struct svf_xxr_para tdr_para;
struct svf_xxr_para sir_para;
struct svf_xxr_para sdr_para;
};
static struct svf_para svf_para;
static const struct svf_para svf_para_init = {
/* frequency, ir_end_state, dr_end_state, runtest_run_state, runtest_end_state, trst_mode */
0, TAP_IDLE, TAP_IDLE, TAP_IDLE, TAP_IDLE, TRST_Z,
/* hir_para */
/* {len, data_mask, tdi, tdo, mask, smask}, */
{0, 0, NULL, NULL, NULL, NULL},
/* hdr_para */
/* {len, data_mask, tdi, tdo, mask, smask}, */
{0, 0, NULL, NULL, NULL, NULL},
/* tir_para */
/* {len, data_mask, tdi, tdo, mask, smask}, */
{0, 0, NULL, NULL, NULL, NULL},
/* tdr_para */
/* {len, data_mask, tdi, tdo, mask, smask}, */
{0, 0, NULL, NULL, NULL, NULL},
/* sir_para */
/* {len, data_mask, tdi, tdo, mask, smask}, */
{0, 0, NULL, NULL, NULL, NULL},
/* sdr_para */
/* {len, data_mask, tdi, tdo, mask, smask}, */
{0, 0, NULL, NULL, NULL, NULL},
};
struct svf_check_tdo_para {
int line_num; /* used to record line number of the check operation */
/* so more information could be printed */
int enabled; /* check is enabled or not */
int buffer_offset; /* buffer_offset to buffers */
int bit_len; /* bit length to check */
};
#define SVF_CHECK_TDO_PARA_SIZE 1024
static struct svf_check_tdo_para *svf_check_tdo_para;
static int svf_check_tdo_para_index;
static int svf_read_command_from_file(FILE *fd);
static int svf_check_tdo(void);
static int svf_add_check_para(uint8_t enabled, int buffer_offset, int bit_len);
static int svf_run_command(struct command_context *cmd_ctx, char *cmd_str);
static int svf_execute_tap(void);
static FILE *svf_fd;
static char *svf_read_line;
static size_t svf_read_line_size;
static char *svf_command_buffer;
static size_t svf_command_buffer_size;
static int svf_line_number;
static int svf_getline(char **lineptr, size_t *n, FILE *stream);
#define SVF_MAX_BUFFER_SIZE_TO_COMMIT (1024 * 1024)
static uint8_t *svf_tdi_buffer, *svf_tdo_buffer, *svf_mask_buffer;
static int svf_buffer_index, svf_buffer_size;
static int svf_quiet;
static int svf_nil;
static int svf_ignore_error;
/* Targeting particular tap */
static int svf_tap_is_specified;
static int svf_set_padding(struct svf_xxr_para *para, int len, unsigned char tdi);
/* Progress Indicator */
static int svf_progress_enabled;
static long svf_total_lines;
static int svf_percentage;
static int svf_last_printed_percentage = -1;
/*
* macro is used to print the svf hex buffer at desired debug level
* DEBUG, INFO, ERROR, USER
*/
#define SVF_BUF_LOG(_lvl, _buf, _nbits, _desc) \
svf_hexbuf_print(LOG_LVL_##_lvl, __FILE__, __LINE__, __func__, _buf, _nbits, _desc)
static void svf_hexbuf_print(int dbg_lvl, const char *file, unsigned line,
const char *function, const uint8_t *buf,
int bit_len, const char *desc)
{
int j, len = 0;
int byte_len = DIV_ROUND_UP(bit_len, 8);
int msbits = bit_len % 8;
/* allocate 2 bytes per hex digit */
char *prbuf = malloc((byte_len * 2) + 2 + 1);
if (!prbuf)
return;
/* print correct number of bytes, mask excess bits where applicable */
uint8_t msb = buf[byte_len - 1] & (msbits ? (1 << msbits) - 1 : 0xff);
len = sprintf(prbuf, msbits <= 4 ? "0x%01"PRIx8 : "0x%02"PRIx8, msb);
for (j = byte_len - 2; j >= 0; j--)
len += sprintf(prbuf + len, "%02"PRIx8, buf[j]);
log_printf_lf(dbg_lvl, file, line, function, "%8s = %s", desc ? desc : " ", prbuf);
free(prbuf);
}
static int svf_realloc_buffers(size_t len)
{
void *ptr;
if (svf_execute_tap() != ERROR_OK)
return ERROR_FAIL;
ptr = realloc(svf_tdi_buffer, len);
if (!ptr)
return ERROR_FAIL;
svf_tdi_buffer = ptr;
ptr = realloc(svf_tdo_buffer, len);
if (!ptr)
return ERROR_FAIL;
svf_tdo_buffer = ptr;
ptr = realloc(svf_mask_buffer, len);
if (!ptr)
return ERROR_FAIL;
svf_mask_buffer = ptr;
svf_buffer_size = len;
return ERROR_OK;
}
static void svf_free_xxd_para(struct svf_xxr_para *para)
{
if (NULL != para) {
free(para->tdi);
para->tdi = NULL;
free(para->tdo);
para->tdo = NULL;
free(para->mask);
para->mask = NULL;
free(para->smask);
para->smask = NULL;
}
}
int svf_add_statemove(tap_state_t state_to)
{
tap_state_t state_from = cmd_queue_cur_state;
unsigned index_var;
/* when resetting, be paranoid and ignore current state */
if (state_to == TAP_RESET) {
if (svf_nil)
return ERROR_OK;
jtag_add_tlr();
return ERROR_OK;
}
for (index_var = 0; index_var < ARRAY_SIZE(svf_statemoves); index_var++) {
if ((svf_statemoves[index_var].from == state_from)
&& (svf_statemoves[index_var].to == state_to)) {
if (svf_nil)
continue;
/* recorded path includes current state ... avoid
*extra TCKs! */
if (svf_statemoves[index_var].num_of_moves > 1)
jtag_add_pathmove(svf_statemoves[index_var].num_of_moves - 1,
svf_statemoves[index_var].paths + 1);
else
jtag_add_pathmove(svf_statemoves[index_var].num_of_moves,
svf_statemoves[index_var].paths);
return ERROR_OK;
}
}
LOG_ERROR("SVF: can not move to %s", tap_state_name(state_to));
return ERROR_FAIL;
}
COMMAND_HANDLER(handle_svf_command)
{
#define SVF_MIN_NUM_OF_OPTIONS 1
#define SVF_MAX_NUM_OF_OPTIONS 5
int command_num = 0;
int ret = ERROR_OK;
int64_t time_measure_ms;
int time_measure_s, time_measure_m;
/* use NULL to indicate a "plain" svf file which accounts for
* any additional devices in the scan chain, otherwise the device
* that should be affected
*/
struct jtag_tap *tap = NULL;
if ((CMD_ARGC < SVF_MIN_NUM_OF_OPTIONS) || (CMD_ARGC > SVF_MAX_NUM_OF_OPTIONS))
return ERROR_COMMAND_SYNTAX_ERROR;
/* parse command line */
svf_quiet = 0;
svf_nil = 0;
svf_progress_enabled = 0;
svf_ignore_error = 0;
for (unsigned int i = 0; i < CMD_ARGC; i++) {
if (strcmp(CMD_ARGV[i], "-tap") == 0) {
tap = jtag_tap_by_string(CMD_ARGV[i+1]);
if (!tap) {
command_print(CMD, "Tap: %s unknown", CMD_ARGV[i+1]);
return ERROR_FAIL;
}
i++;
} else if ((strcmp(CMD_ARGV[i],
"quiet") == 0) || (strcmp(CMD_ARGV[i], "-quiet") == 0))
svf_quiet = 1;
else if ((strcmp(CMD_ARGV[i], "nil") == 0) || (strcmp(CMD_ARGV[i], "-nil") == 0))
svf_nil = 1;
else if ((strcmp(CMD_ARGV[i],
"progress") == 0) || (strcmp(CMD_ARGV[i], "-progress") == 0))
svf_progress_enabled = 1;
else if ((strcmp(CMD_ARGV[i],
"ignore_error") == 0) || (strcmp(CMD_ARGV[i], "-ignore_error") == 0))
svf_ignore_error = 1;
else {
svf_fd = fopen(CMD_ARGV[i], "r");
if (svf_fd == NULL) {
int err = errno;
command_print(CMD, "open(\"%s\"): %s", CMD_ARGV[i], strerror(err));
/* no need to free anything now */
return ERROR_COMMAND_SYNTAX_ERROR;
} else
LOG_USER("svf processing file: \"%s\"", CMD_ARGV[i]);
}
}
if (svf_fd == NULL)
return ERROR_COMMAND_SYNTAX_ERROR;
/* get time */
time_measure_ms = timeval_ms();
/* init */
svf_line_number = 0;
svf_command_buffer_size = 0;
svf_check_tdo_para_index = 0;
svf_check_tdo_para = malloc(sizeof(struct svf_check_tdo_para) * SVF_CHECK_TDO_PARA_SIZE);
if (NULL == svf_check_tdo_para) {
LOG_ERROR("not enough memory");
ret = ERROR_FAIL;
goto free_all;
}
svf_buffer_index = 0;
/* double the buffer size */
/* in case current command cannot be committed, and next command is a bit scan command */
/* here is 32K bits for this big scan command, it should be enough */
/* buffer will be reallocated if buffer size is not enough */
if (svf_realloc_buffers(2 * SVF_MAX_BUFFER_SIZE_TO_COMMIT) != ERROR_OK) {
ret = ERROR_FAIL;
goto free_all;
}
memcpy(&svf_para, &svf_para_init, sizeof(svf_para));
if (!svf_nil) {
/* TAP_RESET */
jtag_add_tlr();
}
if (tap) {
/* Tap is specified, set header/trailer paddings */
int header_ir_len = 0, header_dr_len = 0, trailer_ir_len = 0, trailer_dr_len = 0;
struct jtag_tap *check_tap;
svf_tap_is_specified = 1;
for (check_tap = jtag_all_taps(); check_tap; check_tap = check_tap->next_tap) {
if (check_tap->abs_chain_position < tap->abs_chain_position) {
/* Header */
header_ir_len += check_tap->ir_length;
header_dr_len++;
} else if (check_tap->abs_chain_position > tap->abs_chain_position) {
/* Trailer */
trailer_ir_len += check_tap->ir_length;
trailer_dr_len++;
}
}
/* HDR %d TDI (0) */
if (ERROR_OK != svf_set_padding(&svf_para.hdr_para, header_dr_len, 0)) {
LOG_ERROR("failed to set data header");
return ERROR_FAIL;
}
/* HIR %d TDI (0xFF) */
if (ERROR_OK != svf_set_padding(&svf_para.hir_para, header_ir_len, 0xFF)) {
LOG_ERROR("failed to set instruction header");
return ERROR_FAIL;
}
/* TDR %d TDI (0) */
if (ERROR_OK != svf_set_padding(&svf_para.tdr_para, trailer_dr_len, 0)) {
LOG_ERROR("failed to set data trailer");
return ERROR_FAIL;
}
/* TIR %d TDI (0xFF) */
if (ERROR_OK != svf_set_padding(&svf_para.tir_para, trailer_ir_len, 0xFF)) {
LOG_ERROR("failed to set instruction trailer");
return ERROR_FAIL;
}
}
if (svf_progress_enabled) {
/* Count total lines in file. */
while (!feof(svf_fd)) {
svf_getline(&svf_command_buffer, &svf_command_buffer_size, svf_fd);
svf_total_lines++;
}
rewind(svf_fd);
}
while (ERROR_OK == svf_read_command_from_file(svf_fd)) {
/* Log Output */
if (svf_quiet) {
if (svf_progress_enabled) {
svf_percentage = ((svf_line_number * 20) / svf_total_lines) * 5;
if (svf_last_printed_percentage != svf_percentage) {
LOG_USER_N("\r%d%% ", svf_percentage);
svf_last_printed_percentage = svf_percentage;
}
}
} else {
if (svf_progress_enabled) {
svf_percentage = ((svf_line_number * 20) / svf_total_lines) * 5;
LOG_USER_N("%3d%% %s", svf_percentage, svf_read_line);
} else
LOG_USER_N("%s", svf_read_line);
}
/* Run Command */
if (ERROR_OK != svf_run_command(CMD_CTX, svf_command_buffer)) {
LOG_ERROR("fail to run command at line %d", svf_line_number);
ret = ERROR_FAIL;
break;
}
command_num++;
}
if ((!svf_nil) && (ERROR_OK != jtag_execute_queue()))
ret = ERROR_FAIL;
else if (ERROR_OK != svf_check_tdo())
ret = ERROR_FAIL;
/* print time */
time_measure_ms = timeval_ms() - time_measure_ms;
time_measure_s = time_measure_ms / 1000;
time_measure_ms %= 1000;
time_measure_m = time_measure_s / 60;
time_measure_s %= 60;
if (time_measure_ms < 1000)
command_print(CMD,
"\r\nTime used: %dm%ds%" PRId64 "ms ",
time_measure_m,
time_measure_s,
time_measure_ms);
free_all:
fclose(svf_fd);
svf_fd = 0;
/* free buffers */
free(svf_command_buffer);
svf_command_buffer = NULL;
svf_command_buffer_size = 0;
free(svf_check_tdo_para);
svf_check_tdo_para = NULL;
svf_check_tdo_para_index = 0;
free(svf_tdi_buffer);
svf_tdi_buffer = NULL;
free(svf_tdo_buffer);
svf_tdo_buffer = NULL;
free(svf_mask_buffer);
svf_mask_buffer = NULL;
svf_buffer_index = 0;
svf_buffer_size = 0;
svf_free_xxd_para(&svf_para.hdr_para);
svf_free_xxd_para(&svf_para.hir_para);
svf_free_xxd_para(&svf_para.tdr_para);
svf_free_xxd_para(&svf_para.tir_para);
svf_free_xxd_para(&svf_para.sdr_para);
svf_free_xxd_para(&svf_para.sir_para);
if (ERROR_OK == ret)
command_print(CMD,
"svf file programmed %s for %d commands with %d errors",
(svf_ignore_error > 1) ? "unsuccessfully" : "successfully",
command_num,
(svf_ignore_error > 1) ? (svf_ignore_error - 1) : 0);
else
command_print(CMD, "svf file programmed failed");
svf_ignore_error = 0;
return ret;
}
static int svf_getline(char **lineptr, size_t *n, FILE *stream)
{
#define MIN_CHUNK 16 /* Buffer is increased by this size each time as required */
size_t i = 0;
if (*lineptr == NULL) {
*n = MIN_CHUNK;
*lineptr = malloc(*n);
if (!*lineptr)
return -1;
}
(*lineptr)[0] = fgetc(stream);
while ((*lineptr)[i] != '\n') {
(*lineptr)[++i] = fgetc(stream);
if (feof(stream)) {
(*lineptr)[0] = 0;
return -1;
}
if ((i + 2) > *n) {
*n += MIN_CHUNK;
*lineptr = realloc(*lineptr, *n);
}
}
(*lineptr)[++i] = 0;
return sizeof(*lineptr);
}
#define SVFP_CMD_INC_CNT 1024
static int svf_read_command_from_file(FILE *fd)
{
unsigned char ch;
int i = 0;
size_t cmd_pos = 0;
int cmd_ok = 0, slash = 0;
if (svf_getline(&svf_read_line, &svf_read_line_size, svf_fd) <= 0)
return ERROR_FAIL;
svf_line_number++;
ch = svf_read_line[0];
while (!cmd_ok && (ch != 0)) {
switch (ch) {
case '!':
slash = 0;
if (svf_getline(&svf_read_line, &svf_read_line_size, svf_fd) <= 0)
return ERROR_FAIL;
svf_line_number++;
i = -1;
break;
case '/':
if (++slash == 2) {
slash = 0;
if (svf_getline(&svf_read_line, &svf_read_line_size,
svf_fd) <= 0)
return ERROR_FAIL;
svf_line_number++;
i = -1;
}
break;
case ';':
slash = 0;
cmd_ok = 1;
break;
case '\n':
svf_line_number++;
if (svf_getline(&svf_read_line, &svf_read_line_size, svf_fd) <= 0)
return ERROR_FAIL;
i = -1;
/* fallthrough */
case '\r':
slash = 0;
/* Don't save '\r' and '\n' if no data is parsed */
if (!cmd_pos)
break;
/* fallthrough */
default:
/* The parsing code currently expects a space
* before parentheses -- "TDI (123)". Also a
* space afterwards -- "TDI (123) TDO(456)".
* But such spaces are optional... instead of
* parser updates, cope with that by adding the
* spaces as needed.
*
* Ensure there are 3 bytes available, for:
* - current character
* - added space.
* - terminating NUL ('\0')
*/
if (cmd_pos + 3 > svf_command_buffer_size) {
svf_command_buffer = realloc(svf_command_buffer, cmd_pos + 3);
svf_command_buffer_size = cmd_pos + 3;
if (svf_command_buffer == NULL) {
LOG_ERROR("not enough memory");
return ERROR_FAIL;
}
}
/* insert a space before '(' */
if ('(' == ch)
svf_command_buffer[cmd_pos++] = ' ';
svf_command_buffer[cmd_pos++] = (char)toupper(ch);
/* insert a space after ')' */
if (')' == ch)
svf_command_buffer[cmd_pos++] = ' ';
break;
}
ch = svf_read_line[++i];
}
if (cmd_ok) {
svf_command_buffer[cmd_pos] = '\0';
return ERROR_OK;
} else
return ERROR_FAIL;
}
static int svf_parse_cmd_string(char *str, int len, char **argus, int *num_of_argu)
{
int pos = 0, num = 0, space_found = 1, in_bracket = 0;
while (pos < len) {
switch (str[pos]) {
case '!':
case '/':
LOG_ERROR("fail to parse svf command");
return ERROR_FAIL;
case '(':
in_bracket = 1;
goto parse_char;
case ')':
in_bracket = 0;
goto parse_char;
default:
parse_char:
if (!in_bracket && isspace((int) str[pos])) {
space_found = 1;
str[pos] = '\0';
} else if (space_found) {
argus[num++] = &str[pos];
space_found = 0;
}
break;
}
pos++;
}
if (num == 0)
return ERROR_FAIL;
*num_of_argu = num;
return ERROR_OK;
}
bool svf_tap_state_is_stable(tap_state_t state)
{
return (TAP_RESET == state) || (TAP_IDLE == state)
|| (TAP_DRPAUSE == state) || (TAP_IRPAUSE == state);
}
static int svf_find_string_in_array(char *str, char **strs, int num_of_element)
{
int i;
for (i = 0; i < num_of_element; i++) {
if (!strcmp(str, strs[i]))
return i;
}
return 0xFF;
}
static int svf_adjust_array_length(uint8_t **arr, int orig_bit_len, int new_bit_len)
{
int new_byte_len = (new_bit_len + 7) >> 3;
if ((NULL == *arr) || (((orig_bit_len + 7) >> 3) < ((new_bit_len + 7) >> 3))) {
free(*arr);
*arr = calloc(1, new_byte_len);
if (NULL == *arr) {
LOG_ERROR("not enough memory");
return ERROR_FAIL;
}
}
return ERROR_OK;
}
static int svf_set_padding(struct svf_xxr_para *para, int len, unsigned char tdi)
{
int error = ERROR_OK;
error |= svf_adjust_array_length(¶->tdi, para->len, len);
memset(para->tdi, tdi, (len + 7) >> 3);
error |= svf_adjust_array_length(¶->tdo, para->len, len);
error |= svf_adjust_array_length(¶->mask, para->len, len);
para->len = len;
para->data_mask = XXR_TDI;
return error;
}
static int svf_copy_hexstring_to_binary(char *str, uint8_t **bin, int orig_bit_len, int bit_len)
{
int i, str_len = strlen(str), str_hbyte_len = (bit_len + 3) >> 2;
uint8_t ch = 0;
if (ERROR_OK != svf_adjust_array_length(bin, orig_bit_len, bit_len)) {
LOG_ERROR("fail to adjust length of array");
return ERROR_FAIL;
}
/* fill from LSB (end of str) to MSB (beginning of str) */
for (i = 0; i < str_hbyte_len; i++) {
ch = 0;
while (str_len > 0) {
ch = str[--str_len];
/* Skip whitespace. The SVF specification (rev E) is
* deficient in terms of basic lexical issues like
* where whitespace is allowed. Long bitstrings may
* require line ends for correctness, since there is
* a hard limit on line length.
*/
if (!isspace(ch)) {
if ((ch >= '0') && (ch <= '9')) {
ch = ch - '0';
break;
} else if ((ch >= 'A') && (ch <= 'F')) {
ch = ch - 'A' + 10;
break;
} else {
LOG_ERROR("invalid hex string");
return ERROR_FAIL;
}
}
ch = 0;
}
/* write bin */
if (i % 2) {
/* MSB */
(*bin)[i / 2] |= ch << 4;
} else {
/* LSB */
(*bin)[i / 2] = 0;
(*bin)[i / 2] |= ch;
}
}
/* consume optional leading '0' MSBs or whitespace */
while (str_len > 0 && ((str[str_len - 1] == '0')
|| isspace((int) str[str_len - 1])))
str_len--;
/* check validity: we must have consumed everything */
if (str_len > 0 || (ch & ~((2 << ((bit_len - 1) % 4)) - 1)) != 0) {
LOG_ERROR("value exceeds length");
return ERROR_FAIL;
}
return ERROR_OK;
}
static int svf_check_tdo(void)
{
int i, len, index_var;
for (i = 0; i < svf_check_tdo_para_index; i++) {
index_var = svf_check_tdo_para[i].buffer_offset;
len = svf_check_tdo_para[i].bit_len;
if ((svf_check_tdo_para[i].enabled)
&& buf_cmp_mask(&svf_tdi_buffer[index_var], &svf_tdo_buffer[index_var],
&svf_mask_buffer[index_var], len)) {
LOG_ERROR("tdo check error at line %d",
svf_check_tdo_para[i].line_num);
SVF_BUF_LOG(ERROR, &svf_tdi_buffer[index_var], len, "READ");
SVF_BUF_LOG(ERROR, &svf_tdo_buffer[index_var], len, "WANT");
SVF_BUF_LOG(ERROR, &svf_mask_buffer[index_var], len, "MASK");
if (svf_ignore_error == 0)
return ERROR_FAIL;
else
svf_ignore_error++;
}
}
svf_check_tdo_para_index = 0;
return ERROR_OK;
}
static int svf_add_check_para(uint8_t enabled, int buffer_offset, int bit_len)
{
if (svf_check_tdo_para_index >= SVF_CHECK_TDO_PARA_SIZE) {
LOG_ERROR("toooooo many operation undone");
return ERROR_FAIL;
}
svf_check_tdo_para[svf_check_tdo_para_index].line_num = svf_line_number;
svf_check_tdo_para[svf_check_tdo_para_index].bit_len = bit_len;
svf_check_tdo_para[svf_check_tdo_para_index].enabled = enabled;
svf_check_tdo_para[svf_check_tdo_para_index].buffer_offset = buffer_offset;
svf_check_tdo_para_index++;
return ERROR_OK;
}
static int svf_execute_tap(void)
{
if ((!svf_nil) && (ERROR_OK != jtag_execute_queue()))
return ERROR_FAIL;
else if (ERROR_OK != svf_check_tdo())
return ERROR_FAIL;
svf_buffer_index = 0;
return ERROR_OK;
}
static int svf_run_command(struct command_context *cmd_ctx, char *cmd_str)
{
char *argus[256], command;
int num_of_argu = 0, i;
/* tmp variable */
int i_tmp;
/* for RUNTEST */
int run_count;
float min_time;
/* for XXR */
struct svf_xxr_para *xxr_para_tmp;
uint8_t **pbuffer_tmp;
struct scan_field field;
/* for STATE */
tap_state_t *path = NULL, state;
/* flag padding commands skipped due to -tap command */
int padding_command_skipped = 0;
if (ERROR_OK != svf_parse_cmd_string(cmd_str, strlen(cmd_str), argus, &num_of_argu))
return ERROR_FAIL;
/* NOTE: we're a bit loose here, because we ignore case in
* TAP state names (instead of insisting on uppercase).
*/
command = svf_find_string_in_array(argus[0],
(char **)svf_command_name, ARRAY_SIZE(svf_command_name));
switch (command) {
case ENDDR:
case ENDIR:
if (num_of_argu != 2) {
LOG_ERROR("invalid parameter of %s", argus[0]);
return ERROR_FAIL;
}
i_tmp = tap_state_by_name(argus[1]);
if (svf_tap_state_is_stable(i_tmp)) {
if (command == ENDIR) {
svf_para.ir_end_state = i_tmp;
LOG_DEBUG("\tIR end_state = %s",
tap_state_name(i_tmp));
} else {
svf_para.dr_end_state = i_tmp;
LOG_DEBUG("\tDR end_state = %s",
tap_state_name(i_tmp));
}
} else {
LOG_ERROR("%s: %s is not a stable state",
argus[0], argus[1]);
return ERROR_FAIL;
}
break;
case FREQUENCY:
if ((num_of_argu != 1) && (num_of_argu != 3)) {
LOG_ERROR("invalid parameter of %s", argus[0]);
return ERROR_FAIL;
}
if (1 == num_of_argu) {
/* TODO: set jtag speed to full speed */
svf_para.frequency = 0;
} else {
if (strcmp(argus[2], "HZ")) {
LOG_ERROR("HZ not found in FREQUENCY command");
return ERROR_FAIL;
}
if (ERROR_OK != svf_execute_tap())
return ERROR_FAIL;
svf_para.frequency = atof(argus[1]);
/* TODO: set jtag speed to */
if (svf_para.frequency > 0) {
command_run_linef(cmd_ctx,
"adapter speed %d",
(int)svf_para.frequency / 1000);
LOG_DEBUG("\tfrequency = %f", svf_para.frequency);
}
}
break;
case HDR:
if (svf_tap_is_specified) {
padding_command_skipped = 1;
break;
}
xxr_para_tmp = &svf_para.hdr_para;
goto XXR_common;
case HIR:
if (svf_tap_is_specified) {
padding_command_skipped = 1;
break;
}
xxr_para_tmp = &svf_para.hir_para;
goto XXR_common;
case TDR:
if (svf_tap_is_specified) {
padding_command_skipped = 1;
break;
}
xxr_para_tmp = &svf_para.tdr_para;
goto XXR_common;
case TIR:
if (svf_tap_is_specified) {
padding_command_skipped = 1;
break;
}
xxr_para_tmp = &svf_para.tir_para;
goto XXR_common;
case SDR:
xxr_para_tmp = &svf_para.sdr_para;
goto XXR_common;
case SIR:
xxr_para_tmp = &svf_para.sir_para;
goto XXR_common;
XXR_common:
/* XXR length [TDI (tdi)] [TDO (tdo)][MASK (mask)] [SMASK (smask)] */
if ((num_of_argu > 10) || (num_of_argu % 2)) {
LOG_ERROR("invalid parameter of %s", argus[0]);
return ERROR_FAIL;
}
i_tmp = xxr_para_tmp->len;
xxr_para_tmp->len = atoi(argus[1]);
/* If we are to enlarge the buffers, all parts of xxr_para_tmp
* need to be freed */
if (i_tmp < xxr_para_tmp->len) {
free(xxr_para_tmp->tdi);
xxr_para_tmp->tdi = NULL;
free(xxr_para_tmp->tdo);
xxr_para_tmp->tdo = NULL;
free(xxr_para_tmp->mask);
xxr_para_tmp->mask = NULL;
free(xxr_para_tmp->smask);
xxr_para_tmp->smask = NULL;
}
LOG_DEBUG("\tlength = %d", xxr_para_tmp->len);
xxr_para_tmp->data_mask = 0;
for (i = 2; i < num_of_argu; i += 2) {
if ((strlen(argus[i + 1]) < 3) || (argus[i + 1][0] != '(') ||
(argus[i + 1][strlen(argus[i + 1]) - 1] != ')')) {
LOG_ERROR("data section error");
return ERROR_FAIL;
}
argus[i + 1][strlen(argus[i + 1]) - 1] = '\0';
/* TDI, TDO, MASK, SMASK */
if (!strcmp(argus[i], "TDI")) {
/* TDI */
pbuffer_tmp = &xxr_para_tmp->tdi;
xxr_para_tmp->data_mask |= XXR_TDI;
} else if (!strcmp(argus[i], "TDO")) {
/* TDO */
pbuffer_tmp = &xxr_para_tmp->tdo;
xxr_para_tmp->data_mask |= XXR_TDO;
} else if (!strcmp(argus[i], "MASK")) {
/* MASK */
pbuffer_tmp = &xxr_para_tmp->mask;
xxr_para_tmp->data_mask |= XXR_MASK;
} else if (!strcmp(argus[i], "SMASK")) {
/* SMASK */
pbuffer_tmp = &xxr_para_tmp->smask;
xxr_para_tmp->data_mask |= XXR_SMASK;
} else {
LOG_ERROR("unknown parameter: %s", argus[i]);
return ERROR_FAIL;
}
if (ERROR_OK !=
svf_copy_hexstring_to_binary(&argus[i + 1][1], pbuffer_tmp, i_tmp,
xxr_para_tmp->len)) {
LOG_ERROR("fail to parse hex value");
return ERROR_FAIL;
}
SVF_BUF_LOG(DEBUG, *pbuffer_tmp, xxr_para_tmp->len, argus[i]);
}
/* If a command changes the length of the last scan of the same type and the
* MASK parameter is absent, */
/* the mask pattern used is all cares */
if (!(xxr_para_tmp->data_mask & XXR_MASK) && (i_tmp != xxr_para_tmp->len)) {
/* MASK not defined and length changed */
if (ERROR_OK !=
svf_adjust_array_length(&xxr_para_tmp->mask, i_tmp,
xxr_para_tmp->len)) {
LOG_ERROR("fail to adjust length of array");
return ERROR_FAIL;
}
buf_set_ones(xxr_para_tmp->mask, xxr_para_tmp->len);
}
/* If TDO is absent, no comparison is needed, set the mask to 0 */
if (!(xxr_para_tmp->data_mask & XXR_TDO)) {
if (NULL == xxr_para_tmp->tdo) {
if (ERROR_OK !=
svf_adjust_array_length(&xxr_para_tmp->tdo, i_tmp,
xxr_para_tmp->len)) {
LOG_ERROR("fail to adjust length of array");
return ERROR_FAIL;
}
}
if (NULL == xxr_para_tmp->mask) {
if (ERROR_OK !=
svf_adjust_array_length(&xxr_para_tmp->mask, i_tmp,
xxr_para_tmp->len)) {
LOG_ERROR("fail to adjust length of array");
return ERROR_FAIL;
}
}
memset(xxr_para_tmp->mask, 0, (xxr_para_tmp->len + 7) >> 3);
}
/* do scan if necessary */
if (SDR == command) {
/* check buffer size first, reallocate if necessary */
i = svf_para.hdr_para.len + svf_para.sdr_para.len +
svf_para.tdr_para.len;
if ((svf_buffer_size - svf_buffer_index) < ((i + 7) >> 3)) {
/* reallocate buffer */
if (svf_realloc_buffers(svf_buffer_index + ((i + 7) >> 3)) != ERROR_OK) {
LOG_ERROR("not enough memory");
return ERROR_FAIL;
}
}
/* assemble dr data */
i = 0;
buf_set_buf(svf_para.hdr_para.tdi,
0,
&svf_tdi_buffer[svf_buffer_index],
i,
svf_para.hdr_para.len);
i += svf_para.hdr_para.len;
buf_set_buf(svf_para.sdr_para.tdi,
0,
&svf_tdi_buffer[svf_buffer_index],
i,
svf_para.sdr_para.len);
i += svf_para.sdr_para.len;
buf_set_buf(svf_para.tdr_para.tdi,
0,
&svf_tdi_buffer[svf_buffer_index],
i,
svf_para.tdr_para.len);
i += svf_para.tdr_para.len;
/* add check data */
if (svf_para.sdr_para.data_mask & XXR_TDO) {
/* assemble dr mask data */
i = 0;
buf_set_buf(svf_para.hdr_para.mask,
0,
&svf_mask_buffer[svf_buffer_index],
i,
svf_para.hdr_para.len);
i += svf_para.hdr_para.len;
buf_set_buf(svf_para.sdr_para.mask,
0,
&svf_mask_buffer[svf_buffer_index],
i,
svf_para.sdr_para.len);
i += svf_para.sdr_para.len;
buf_set_buf(svf_para.tdr_para.mask,
0,
&svf_mask_buffer[svf_buffer_index],
i,
svf_para.tdr_para.len);
/* assemble dr check data */
i = 0;
buf_set_buf(svf_para.hdr_para.tdo,
0,
&svf_tdo_buffer[svf_buffer_index],
i,
svf_para.hdr_para.len);
i += svf_para.hdr_para.len;
buf_set_buf(svf_para.sdr_para.tdo,
0,
&svf_tdo_buffer[svf_buffer_index],
i,
svf_para.sdr_para.len);
i += svf_para.sdr_para.len;
buf_set_buf(svf_para.tdr_para.tdo,
0,
&svf_tdo_buffer[svf_buffer_index],
i,
svf_para.tdr_para.len);
i += svf_para.tdr_para.len;
svf_add_check_para(1, svf_buffer_index, i);
} else
svf_add_check_para(0, svf_buffer_index, i);
field.num_bits = i;
field.out_value = &svf_tdi_buffer[svf_buffer_index];
field.in_value = (xxr_para_tmp->data_mask & XXR_TDO) ? &svf_tdi_buffer[svf_buffer_index] : NULL;
if (!svf_nil) {
/* NOTE: doesn't use SVF-specified state paths */
jtag_add_plain_dr_scan(field.num_bits,
field.out_value,
field.in_value,
svf_para.dr_end_state);
}
svf_buffer_index += (i + 7) >> 3;
} else if (SIR == command) {
/* check buffer size first, reallocate if necessary */
i = svf_para.hir_para.len + svf_para.sir_para.len +
svf_para.tir_para.len;
if ((svf_buffer_size - svf_buffer_index) < ((i + 7) >> 3)) {
if (svf_realloc_buffers(svf_buffer_index + ((i + 7) >> 3)) != ERROR_OK) {
LOG_ERROR("not enough memory");
return ERROR_FAIL;
}
}
/* assemble ir data */
i = 0;
buf_set_buf(svf_para.hir_para.tdi,
0,
&svf_tdi_buffer[svf_buffer_index],
i,
svf_para.hir_para.len);
i += svf_para.hir_para.len;
buf_set_buf(svf_para.sir_para.tdi,
0,
&svf_tdi_buffer[svf_buffer_index],
i,
svf_para.sir_para.len);
i += svf_para.sir_para.len;
buf_set_buf(svf_para.tir_para.tdi,
0,
&svf_tdi_buffer[svf_buffer_index],
i,
svf_para.tir_para.len);
i += svf_para.tir_para.len;
/* add check data */
if (svf_para.sir_para.data_mask & XXR_TDO) {
/* assemble dr mask data */
i = 0;
buf_set_buf(svf_para.hir_para.mask,
0,
&svf_mask_buffer[svf_buffer_index],
i,
svf_para.hir_para.len);
i += svf_para.hir_para.len;
buf_set_buf(svf_para.sir_para.mask,
0,
&svf_mask_buffer[svf_buffer_index],
i,
svf_para.sir_para.len);
i += svf_para.sir_para.len;
buf_set_buf(svf_para.tir_para.mask,
0,
&svf_mask_buffer[svf_buffer_index],
i,
svf_para.tir_para.len);
/* assemble dr check data */
i = 0;
buf_set_buf(svf_para.hir_para.tdo,
0,
&svf_tdo_buffer[svf_buffer_index],
i,
svf_para.hir_para.len);
i += svf_para.hir_para.len;
buf_set_buf(svf_para.sir_para.tdo,
0,
&svf_tdo_buffer[svf_buffer_index],
i,
svf_para.sir_para.len);
i += svf_para.sir_para.len;
buf_set_buf(svf_para.tir_para.tdo,
0,
&svf_tdo_buffer[svf_buffer_index],
i,
svf_para.tir_para.len);
i += svf_para.tir_para.len;
svf_add_check_para(1, svf_buffer_index, i);
} else
svf_add_check_para(0, svf_buffer_index, i);
field.num_bits = i;
field.out_value = &svf_tdi_buffer[svf_buffer_index];
field.in_value = (xxr_para_tmp->data_mask & XXR_TDO) ? &svf_tdi_buffer[svf_buffer_index] : NULL;
if (!svf_nil) {
/* NOTE: doesn't use SVF-specified state paths */
jtag_add_plain_ir_scan(field.num_bits,
field.out_value,
field.in_value,
svf_para.ir_end_state);
}
svf_buffer_index += (i + 7) >> 3;
}
break;
case PIO:
case PIOMAP:
LOG_ERROR("PIO and PIOMAP are not supported");
return ERROR_FAIL;
case RUNTEST:
/* RUNTEST [run_state] run_count run_clk [min_time SEC [MAXIMUM max_time
* SEC]] [ENDSTATE end_state] */
/* RUNTEST [run_state] min_time SEC [MAXIMUM max_time SEC] [ENDSTATE
* end_state] */
if ((num_of_argu < 3) || (num_of_argu > 11)) {
LOG_ERROR("invalid parameter of %s", argus[0]);
return ERROR_FAIL;
}
/* init */
run_count = 0;
min_time = 0;
i = 1;
/* run_state */
i_tmp = tap_state_by_name(argus[i]);
if (i_tmp != TAP_INVALID) {
if (svf_tap_state_is_stable(i_tmp)) {
svf_para.runtest_run_state = i_tmp;
/* When a run_state is specified, the new
* run_state becomes the default end_state.
*/
svf_para.runtest_end_state = i_tmp;
LOG_DEBUG("\trun_state = %s", tap_state_name(i_tmp));
i++;
} else {
LOG_ERROR("%s: %s is not a stable state", argus[0], tap_state_name(i_tmp));
return ERROR_FAIL;
}
}
/* run_count run_clk */
if (((i + 2) <= num_of_argu) && strcmp(argus[i + 1], "SEC")) {
if (!strcmp(argus[i + 1], "TCK")) {
/* clock source is TCK */
run_count = atoi(argus[i]);
LOG_DEBUG("\trun_count@TCK = %d", run_count);
} else {
LOG_ERROR("%s not supported for clock", argus[i + 1]);
return ERROR_FAIL;
}
i += 2;
}
/* min_time SEC */
if (((i + 2) <= num_of_argu) && !strcmp(argus[i + 1], "SEC")) {
min_time = atof(argus[i]);
LOG_DEBUG("\tmin_time = %fs", min_time);
i += 2;
}
/* MAXIMUM max_time SEC */
if (((i + 3) <= num_of_argu) &&
!strcmp(argus[i], "MAXIMUM") && !strcmp(argus[i + 2], "SEC")) {
float max_time = 0;
max_time = atof(argus[i + 1]);
LOG_DEBUG("\tmax_time = %fs", max_time);
i += 3;
}
/* ENDSTATE end_state */
if (((i + 2) <= num_of_argu) && !strcmp(argus[i], "ENDSTATE")) {
i_tmp = tap_state_by_name(argus[i + 1]);
if (svf_tap_state_is_stable(i_tmp)) {
svf_para.runtest_end_state = i_tmp;
LOG_DEBUG("\tend_state = %s", tap_state_name(i_tmp));
} else {
LOG_ERROR("%s: %s is not a stable state", argus[0], tap_state_name(i_tmp));
return ERROR_FAIL;
}
i += 2;
}
/* all parameter should be parsed */
if (i == num_of_argu) {
#if 1
/* FIXME handle statemove failures */
uint32_t min_usec = 1000000 * min_time;
/* enter into run_state if necessary */
if (cmd_queue_cur_state != svf_para.runtest_run_state)
svf_add_statemove(svf_para.runtest_run_state);
/* add clocks and/or min wait */
if (run_count > 0) {
if (!svf_nil)
jtag_add_clocks(run_count);
}
if (min_usec > 0) {
if (!svf_nil)
jtag_add_sleep(min_usec);
}
/* move to end_state if necessary */
if (svf_para.runtest_end_state != svf_para.runtest_run_state)
svf_add_statemove(svf_para.runtest_end_state);
#else
if (svf_para.runtest_run_state != TAP_IDLE) {
LOG_ERROR("cannot runtest in %s state",
tap_state_name(svf_para.runtest_run_state));
return ERROR_FAIL;
}
if (!svf_nil)
jtag_add_runtest(run_count, svf_para.runtest_end_state);
#endif
} else {
LOG_ERROR("fail to parse parameter of RUNTEST, %d out of %d is parsed",
i,
num_of_argu);
return ERROR_FAIL;
}
break;
case STATE:
/* STATE [pathstate1 [pathstate2 ...[pathstaten]]] stable_state */
if (num_of_argu < 2) {
LOG_ERROR("invalid parameter of %s", argus[0]);
return ERROR_FAIL;
}
if (num_of_argu > 2) {
/* STATE pathstate1 ... stable_state */
path = malloc((num_of_argu - 1) * sizeof(tap_state_t));
if (NULL == path) {
LOG_ERROR("not enough memory");
return ERROR_FAIL;
}
num_of_argu--; /* num of path */
i_tmp = 1; /* path is from parameter 1 */
for (i = 0; i < num_of_argu; i++, i_tmp++) {
path[i] = tap_state_by_name(argus[i_tmp]);
if (path[i] == TAP_INVALID) {
LOG_ERROR("%s: %s is not a valid state", argus[0], argus[i_tmp]);
free(path);
return ERROR_FAIL;
}
/* OpenOCD refuses paths containing TAP_RESET */
if (TAP_RESET == path[i]) {
/* FIXME last state MUST be stable! */
if (i > 0) {
if (!svf_nil)
jtag_add_pathmove(i, path);
}
if (!svf_nil)
jtag_add_tlr();
num_of_argu -= i + 1;
i = -1;
}
}
if (num_of_argu > 0) {
/* execute last path if necessary */
if (svf_tap_state_is_stable(path[num_of_argu - 1])) {
/* last state MUST be stable state */
if (!svf_nil)
jtag_add_pathmove(num_of_argu, path);
LOG_DEBUG("\tmove to %s by path_move",
tap_state_name(path[num_of_argu - 1]));
} else {
LOG_ERROR("%s: %s is not a stable state",
argus[0],
tap_state_name(path[num_of_argu - 1]));
free(path);
return ERROR_FAIL;
}
}
free(path);
path = NULL;
} else {
/* STATE stable_state */
state = tap_state_by_name(argus[1]);
if (svf_tap_state_is_stable(state)) {
LOG_DEBUG("\tmove to %s by svf_add_statemove",
tap_state_name(state));
/* FIXME handle statemove failures */
svf_add_statemove(state);
} else {
LOG_ERROR("%s: %s is not a stable state",
argus[0], tap_state_name(state));
return ERROR_FAIL;
}
}
break;
case TRST:
/* TRST trst_mode */
if (num_of_argu != 2) {
LOG_ERROR("invalid parameter of %s", argus[0]);
return ERROR_FAIL;
}
if (svf_para.trst_mode != TRST_ABSENT) {
if (ERROR_OK != svf_execute_tap())
return ERROR_FAIL;
i_tmp = svf_find_string_in_array(argus[1],
(char **)svf_trst_mode_name,
ARRAY_SIZE(svf_trst_mode_name));
switch (i_tmp) {
case TRST_ON:
if (!svf_nil)
jtag_add_reset(1, 0);
break;
case TRST_Z:
case TRST_OFF:
if (!svf_nil)
jtag_add_reset(0, 0);
break;
case TRST_ABSENT:
break;
default:
LOG_ERROR("unknown TRST mode: %s", argus[1]);
return ERROR_FAIL;
}
svf_para.trst_mode = i_tmp;
LOG_DEBUG("\ttrst_mode = %s", svf_trst_mode_name[svf_para.trst_mode]);
} else {
LOG_ERROR("can not accept TRST command if trst_mode is ABSENT");
return ERROR_FAIL;
}
break;
default:
LOG_ERROR("invalid svf command: %s", argus[0]);
return ERROR_FAIL;
}
if (!svf_quiet) {
if (padding_command_skipped)
LOG_USER("(Above Padding command skipped, as per -tap argument)");
}
if (debug_level >= LOG_LVL_DEBUG) {
/* for convenient debugging, execute tap if possible */
if ((svf_buffer_index > 0) &&
(((command != STATE) && (command != RUNTEST)) ||
((command == STATE) && (num_of_argu == 2)))) {
if (ERROR_OK != svf_execute_tap())
return ERROR_FAIL;
/* output debug info */
if ((SIR == command) || (SDR == command)) {
SVF_BUF_LOG(DEBUG, svf_tdi_buffer, svf_check_tdo_para[0].bit_len, "TDO read");
}
}
} else {
/* for fast executing, execute tap if necessary */
/* half of the buffer is for the next command */
if (((svf_buffer_index >= SVF_MAX_BUFFER_SIZE_TO_COMMIT) ||
(svf_check_tdo_para_index >= SVF_CHECK_TDO_PARA_SIZE / 2)) &&
(((command != STATE) && (command != RUNTEST)) ||
((command == STATE) && (num_of_argu == 2))))
return svf_execute_tap();
}
return ERROR_OK;
}
static const struct command_registration svf_command_handlers[] = {
{
.name = "svf",
.handler = handle_svf_command,
.mode = COMMAND_EXEC,
.help = "Runs a SVF file.",
.usage = "[-tap device.tap] <file> [quiet] [nil] [progress] [ignore_error]",
},
COMMAND_REGISTRATION_DONE
};
int svf_register_commands(struct command_context *cmd_ctx)
{
return register_commands(cmd_ctx, NULL, svf_command_handlers);
}
| gpl-2.0 |
jite/ktx | src/logs.c | 2890 | /*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*
* $Id$
*/
#include "g_local.h"
fileHandle_t log_handle = -1;
void log_close(void)
{
if ( log_handle < 0 )
return;
trap_FS_CloseFile( log_handle );
log_handle = -1;
}
void log_open( const char *fmt, ... )
{
va_list argptr;
char text[1024] = {0};
if ( !cvar("k_extralog") )
return;
log_close();
va_start( argptr, fmt );
Q_vsnprintf( text, sizeof(text), fmt, argptr );
va_end( argptr );
text[sizeof(text)-1] = 0;
if ( !text[0] )
return; // name not specified
if ( trap_FS_OpenFile( text, &log_handle, FS_APPEND_BIN ) < 0 )
{
log_handle = -1;
return;
}
}
void log_printf( const char *fmt, ... )
{
va_list argptr;
char text[1024] = {0};
if ( log_handle < 0 )
return;
if ( !cvar("k_extralog") )
return;
va_start( argptr, fmt );
Q_vsnprintf( text, sizeof(text), fmt, argptr );
va_end( argptr );
text[sizeof(text)-1] = 0;
trap_FS_WriteFile( text, strlen(text), log_handle );
}
char *GetMode();
void StartLogs()
{
char date[64] = {0}, date_c[64] = {0}, *ip, *port;
int i = 0;
if ( strnull( ip = cvar_string( "sv_local_addr" ) ) || strnull( port = strchr(ip, ':') ) || !(i = atoi(port + 1)) )
return;
port[0] = 0;
port++;
if ( !QVMstrftime(date, sizeof(date), "%Y-%m-%d %H:%M:%S %Z", 0) )
date[0] = 0; // bad date
if ( !QVMstrftime(date_c, sizeof(date_c), "%Y%m%d-%H%M%S-%Z", 0) )
date_c[0] = 0; // bad date
log_open("%s", cvar_string("extralogname"));
log_printf("%s", "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n");
log_printf("<ktxlog xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"%s\">\n", cvar_string("k_extralog_xsd_uri"));
log_printf(
"\t<version>0.1</version>\n"
);
log_printf(
"\t<match_info>\n"
"\t\t<timestamp>%s</timestamp>\n"
"\t\t<hostname>%s</hostname>\n"
"\t\t<ip>%s</ip>\n"
"\t\t<port>%d</port>\n"
"\t\t<map>%s</map>\n"
"\t\t<mode>%s</mode>\n"
"\t</match_info>\n",
date,
cleantext(cvar_string("_k_host")),
ip,
i,
g_globalvars.mapname,
GetMode()
);
log_printf("\t<events>\n");
}
void StopLogs()
{
log_printf("\t</events>\n" );
log_printf("</ktxlog>\n" );
log_close();
}
| gpl-2.0 |
Jackeagle/android_kernel_lge_d838 | drivers/input/touchscreen/SynaImage_for_Z_revB_H_Pattern_new.h | 429198 |
// This is Synaptics Image File Data - Auto-Generated - DO NOT EDIT!!!
//PLG185-E049-PR1574682-DS5.h
const unsigned char SynaFirmware_d[] = {
/*0000:*/ 0x85, 0x8c, 0xfa, 0xf6, 0x00, 0x00, 0x00, 0x06, 0x00, 0xee, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
/*0010:*/ 0x53, 0x33, 0x34, 0x30, 0x34, 0x42, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
/*0020:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*0030:*/ 0x44, 0x53, 0x35, 0x20, 0x52, 0x31, 0x2e, 0x32, 0x2e, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*0040:*/ 0x50, 0x4c, 0x47, 0x31, 0x38, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*0050:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*0060:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*0070:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*0080:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*0090:*/ 0x49, 0x32, 0x43, 0x00, 0x05, 0x00, 0xff, 0x00, 0x0c, 0x0d, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
/*00a0:*/ 0x49, 0x32, 0x43, 0x00, 0x05, 0x00, 0xff, 0x00, 0x0c, 0x0d, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
/*00b0:*/ 0x15, 0xd7, 0xca, 0x6e, 0xa7, 0x4c, 0x5a, 0x9a, 0xb9, 0x48, 0x69, 0xad, 0xa5, 0x81, 0x6b, 0xd2,
/*00c0:*/ 0x0f, 0x2d, 0x09, 0x56, 0x00, 0x02, 0x66, 0x16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 0x0a, 0xa0, 0x00, 0x01,
/*ef30:*/ 0x01, 0x05, 0x04, 0x04, 0x64, 0xc0, 0x01, 0x32, 0x26, 0x26, 0x80, 0x80, 0x00, 0x00, 0x67, 0x31,
/*ef40:*/ 0x00, 0x40, 0x40, 0x32, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x02, 0x00, 0x05, 0x3c, 0x32,
/*ef50:*/ 0x00, 0x00, 0x00, 0x00, 0xd0, 0x02, 0x00, 0x05, 0x1e, 0x05, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0a,
/*ef60:*/ 0x00, 0x00, 0x14, 0x03, 0x06, 0x0f, 0x0a, 0xff, 0x00, 0x9d, 0x00, 0x80, 0x04, 0x1b, 0x00, 0x00,
/*ef70:*/ 0x00, 0x41, 0x00, 0xff, 0xff, 0xbf, 0xb4, 0xdc, 0x05, 0x00, 0xda, 0x80, 0x00, 0x10, 0x0a, 0x18,
/*ef80:*/ 0x00, 0x71, 0x05, 0x0a, 0x00, 0x00, 0x64, 0x00, 0x04, 0x00, 0x03, 0x03, 0x07, 0x07, 0x03, 0x64,
/*ef90:*/ 0x00, 0x01, 0x04, 0x07, 0x74, 0x00, 0x15, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x28, 0x07, 0x71,
/*efa0:*/ 0x00, 0x15, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x29, 0x07, 0x6e, 0x00, 0x14, 0x00, 0x02, 0x00,
/*efb0:*/ 0x02, 0x00, 0x01, 0x29, 0x07, 0x6c, 0x00, 0x14, 0x00, 0x03, 0x00, 0x02, 0x00, 0x01, 0x2a, 0x07,
/*efc0:*/ 0x69, 0x00, 0x13, 0x00, 0x04, 0x00, 0x02, 0x00, 0x01, 0x2b, 0x07, 0x67, 0x00, 0x13, 0x00, 0x05,
/*efd0:*/ 0x00, 0x02, 0x00, 0x01, 0x2c, 0x06, 0x65, 0x00, 0x12, 0x00, 0x06, 0x00, 0x02, 0x00, 0x01, 0x2d,
/*efe0:*/ 0x06, 0x63, 0x00, 0x12, 0x00, 0x07, 0x00, 0x05, 0x00, 0x02, 0x26, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
/*eff0:*/ 0x0b, 0x0b, 0x0b, 0x0a, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
/*f000:*/ 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x1b, 0x00, 0x05, 0x00, 0xc8,
/*f010:*/ 0x00, 0x19, 0x0f, 0x05, 0x02, 0x1b, 0x03, 0x13, 0x01, 0x00, 0x06, 0x64, 0x0f, 0x19, 0x0f, 0x00,
/*f020:*/ 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x51, 0x51, 0x51, 0x51, 0xcd, 0x0d,
/*f030:*/ 0x04, 0x83, 0x10, 0x10, 0x10, 0x10, 0x00, 0x0d, 0x0a, 0x08, 0x0c, 0x05, 0x06, 0x03, 0x01, 0x04,
/*f040:*/ 0x0f, 0x0e, 0x0b, 0x09, 0x07, 0x02, 0x00, 0x26, 0x29, 0x2a, 0x2c, 0x31, 0x2d, 0x2f, 0x2e, 0x28,
/*f050:*/ 0x27, 0x2b, 0x32, 0x33, 0x30, 0x34, 0x35, 0x13, 0x12, 0x17, 0x14, 0x11, 0x16, 0x1a, 0x19, 0x15,
/*f060:*/ 0x1b, 0x1c, 0x1f, 0x1d, 0x20, 0x1e, 0x23, 0x22, 0x25, 0x24, 0xff, 0x00, 0x10, 0x00, 0x10, 0x00,
/*f070:*/ 0x10, 0x00, 0x10, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
/*f080:*/ 0x80, 0x80, 0x80, 0x80, 0x80, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x82, 0x82, 0x82, 0x82,
/*f090:*/ 0x82, 0x82, 0x82, 0x82, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
/*f0a0:*/ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xcf, 0x0f, 0x42, 0x10, 0x00, 0x10, 0xae, 0x0f, 0x00,
/*f0b0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f0c0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f0d0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f0e0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f0f0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x22, 0x5d, 0x94,
/*f100:*/ 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f110:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f120:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f130:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f140:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f150:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f160:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f170:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f180:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f190:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f1a0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f1b0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f1c0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f1d0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f1e0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f1f0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f200:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x3f, 0x03,
/*f210:*/ 0x1e, 0x05, 0x0e, 0x4c, 0x1e, 0x05, 0x01, 0x80, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0xff, 0x00,
/*f220:*/ 0x56, 0x1d, 0x10, 0xe0, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53,
/*f230:*/ 0x33, 0x34, 0x30, 0x34, 0x42, 0x52, 0x00, 0x00, 0x00, 0x29, 0x03, 0x0f, 0x00, 0x03, 0x00, 0x00,
/*f240:*/ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
/*f250:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f260:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f270:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f280:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f290:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f2a0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f2b0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f2c0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f2d0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x13,
/*f2e0:*/ 0x06, 0x01, 0x12, 0x24, 0x1f, 0x0d, 0x04, 0x01, 0x01, 0x20, 0x00, 0x09, 0x00, 0x21, 0x34, 0x00,
/*f2f0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f300:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78,
/*f310:*/ 0x00, 0x80, 0x04, 0x1b, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
/*f320:*/ 0xc0, 0x80, 0x00, 0x10, 0x0a, 0x18, 0x00, 0x71, 0x00, 0x03, 0xff, 0x01, 0x05, 0x02, 0x6b, 0x00,
/*f330:*/ 0xa6, 0x00, 0x1b, 0x00, 0x00, 0x20, 0x14, 0x44, 0x10, 0x27, 0x02, 0x01, 0x3a, 0x00, 0x1c, 0x34,
/*f340:*/ 0x40, 0xc8, 0x60, 0xf8, 0xfb, 0x08, 0x0c, 0x58, 0x04, 0x4c, 0x42, 0x31, 0x00, 0x00, 0x00, 0x00,
/*f350:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f360:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f370:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f380:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f390:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f3a0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f3b0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f3c0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f3d0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f3e0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x34, 0x0e, 0x00, 0x01, 0x54, 0x00,
/*f3f0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f400:*/ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x51, 0x51, 0x51, 0x51,
/*f410:*/ 0xcd, 0x0d, 0x04, 0x83, 0x10, 0x10, 0x10, 0x10, 0x83, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f420:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f430:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f440:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f450:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f460:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f470:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f480:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f490:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f4a0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f4b0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f4c0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f4d0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f4e0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00, 0x01, 0x1a, 0x00,
/*f4f0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f500:*/ 0x01, 0x00, 0x10, 0x00, 0x80, 0x80, 0x00, 0x00, 0x20, 0x14, 0x8b, 0x05, 0x00, 0x00, 0x00, 0x00,
/*f510:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f520:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f530:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f540:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f550:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f560:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f570:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f580:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f590:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f5a0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f5b0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f5c0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f5d0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f5e0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x07, 0x00, 0x00, 0x01, 0x55, 0x00,
/*f5f0:*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*f600:*/ 0xff};
| gpl-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.