aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/mfd/syscon/imx6q-iomuxc-gpr.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h b/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h
index c877cad61a13..d16f4c82c568 100644
--- a/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h
+++ b/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h
@@ -207,6 +207,7 @@
207#define IMX6Q_GPR3_LVDS0_MUX_CTL_IPU1_DI1 (0x1 << 6) 207#define IMX6Q_GPR3_LVDS0_MUX_CTL_IPU1_DI1 (0x1 << 6)
208#define IMX6Q_GPR3_LVDS0_MUX_CTL_IPU2_DI0 (0x2 << 6) 208#define IMX6Q_GPR3_LVDS0_MUX_CTL_IPU2_DI0 (0x2 << 6)
209#define IMX6Q_GPR3_LVDS0_MUX_CTL_IPU2_DI1 (0x3 << 6) 209#define IMX6Q_GPR3_LVDS0_MUX_CTL_IPU2_DI1 (0x3 << 6)
210#define IMX6Q_GPR3_MIPI_MUX_CTL_SHIFT 4
210#define IMX6Q_GPR3_MIPI_MUX_CTL_MASK (0x3 << 4) 211#define IMX6Q_GPR3_MIPI_MUX_CTL_MASK (0x3 << 4)
211#define IMX6Q_GPR3_MIPI_MUX_CTL_IPU1_DI0 (0x0 << 4) 212#define IMX6Q_GPR3_MIPI_MUX_CTL_IPU1_DI0 (0x0 << 4)
212#define IMX6Q_GPR3_MIPI_MUX_CTL_IPU1_DI1 (0x1 << 4) 213#define IMX6Q_GPR3_MIPI_MUX_CTL_IPU1_DI1 (0x1 << 4)
3' href='#n343'>343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367
#!/usr/bin/env python
import defapp
from os.path  import splitext, basename
from optparse import make_option as o
from tempfile import NamedTemporaryFile as Tmp

from gnuplot  import gnuplot, FORMATS

options = [
    o('-f', '--format', action='store', dest='format', type='choice',
      choices=FORMATS, help='output format'),
    o(None, '--paper', action='store_true', dest='paper'),
    o(None, '--wide', action='store_true', dest='wide'),
    o(None, '--column', action='store_true', dest='column'),
    o(None, '--split', action='store_true', dest='split'),
    ]

defaults = {
    'format' : 'show',
    'xrange' : (0.5, 32.5),
    'yrange' : (-0.05, 1.05),
    'xticks' : (0, 2),
    'yticks' : (0, 0.1),
    'title'  : None,
    'xlabel' : 'task set utilization cap (prior to inflation)',
    'ylabel' : 'ratio of schedulable task sets',
    'paper'  : False,
    'split'  : False,
    'wide'   : False,
    'column' : False,
    }

def decode(name):
    params = {}
    parts = name.split('_')
    for p in parts:
        kv = p.split('=')
        k = kv[0]
        v = kv[1] if len(kv) > 1 else None
        params[k] = v
    return params

def get_data_tmpfile(datafile):
    """Removes all comments form datafile, stores result in a temp file.
    The temp file is returned."""
    count = 0
    f = open(datafile, 'r')
    d = Tmp()
    for line in f:
        if len(line) > 1 and line[0] != '#':
            d.write(line)
            count += 1
    f.close()
    d.flush()
    if count > 0:
        return d
    else:
        del d # removes temp file
        return None

def scenario_heading(conf, want_period=False):
    dist = 'unknown distribution'
    if 'dist' in conf:
        if conf['dist'] == 'uni':
            dist = 'utilization uniformly '
            if 'light' in conf:
                dist = dist + 'in [0.001, 0.1]'
            elif 'medium' in conf:
                dist = dist + 'in [0.1, 0.4]'
            elif 'heavy' in conf:
                dist = dist + 'in [0.5, 0.9]'
            elif 'mixed' in conf:
                dist = dist + 'in [0.05, 0.95]'
        elif conf['dist'] == 'bimo':
            dist = 'util. bimodially '
            if 'light' in conf:
                dist = dist + 'in [0.001, 0.5] (8/9) and [0.5, 0.9] (1/9)'
            elif 'medium' in conf:
                dist = dist + 'in [0.001, 0.5] (6/9) and [0.5, 0.9] (3/9)'
            elif 'heavy' in conf:
                dist = dist + 'in [0.001, 0.5] (4/9) and [0.5, 0.9] (5/9)'
    if want_period:
        if '33' in conf:
            dist += '; period uniformly in [3, 33]'
        elif '250' in conf:
            dist += '; period uniformly in [50, 250]'
        else:
            dist += '; period uniformly in [10, 100]'
    return dist

class SchedPlotter(defapp.App):
    def __init__(self):
        defapp.App.__init__(self, options, defaults, no_std_opts=True)

    def plot(self, graphs, title, name, conf, **xtra):
        gnuplot(graphs, title=title,
                xlabel=self.options.xlabel,
                ylabel=self.options.ylabel +
                (' [soft]' if 'soft' in conf else ' [hard]'),
                xrange=self.options.xrange,
                yrange=self.options.yrange,
                xticks=self.options.xticks,
                yticks=self.options.yticks,
                format=self.options.format,
                fname=name, **xtra)

    def plot_wide(self, graphs, title, name, conf, **xtra):
        tops = 'rounded size 16cm,6.5cm'
        gnuplot(graphs, title=title,
                xlabel=self.options.xlabel,
                ylabel=self.options.ylabel +
                (' [soft]' if 'soft' in conf else ' [hard]'),
                xrange=self.options.xrange,
                yrange=self.options.yrange,
                xticks=self.options.xticks,
                yticks=self.options.yticks,
                format=self.options.format,
                fname=name,
                term_opts=tops,
                **xtra)

# width  = 3.4in
# height = 2.0in

    def plot_column(self, graphs, title, name, conf, **xtra):
        scale = 1.0
        tops = 'color solid  font "Helvetica,8" linewidth 1.0 ' \
               'rounded size %.1fin,%.1fin' % (scale * 7.0, scale * 2.0)
        gnuplot(graphs, title=title,
                xlabel=self.options.xlabel,
                ylabel=self.options.ylabel +
                (' [soft]' if 'soft' in conf else ' [hard]'),
                xrange=self.options.xrange,
                yrange=self.options.yrange,
                xticks=self.options.xticks,
                yticks=self.options.yticks,
                format=self.options.format,
                fname=name,
                key='right bottom' if '250' in conf else 'right top',
                term_opts=tops)


    def plot_paper(self, graphs, title, name, conf, **xtra):
        tops = 'color solid  font "Helvetica,10" linewidth 1.0 rounded size 16cm,8.5cm'
        gnuplot(graphs, title=title,
                xlabel=self.options.xlabel,
                ylabel=self.options.ylabel +
                (' [soft]' if 'soft' in conf else ' [hard]'),
                xrange=self.options.xrange,
                yrange=self.options.yrange,
                xticks=self.options.xticks,
                yticks=self.options.yticks,
                format=self.options.format,
                fname=name,
                key='off',
                style='lines lw 7',
                term_opts=tops)

    def plot_spec(self, tmpfile, name, conf):
        title = 'G-EDF overhead speculation: ' + scenario_heading(conf)
        graphs = [
            (tmpfile, 1, 2, 'G-EDF (100% release)'),
            (tmpfile, 1, 3, 'G-EDF ( 75% release)'),
            (tmpfile, 1, 4, 'G-EDF ( 50% release)'),
            (tmpfile, 1, 5, 'G-EDF ( 25% release)'),
            (tmpfile, 1, 6, 'G-EDF (  0% release)'),
            (tmpfile, 1, 7, 'G-EDF (no overheads)'),
            ]
        if self.options.paper and self.options.format == 'pdf':
            self.plot_paper(graphs, title, name, conf)
        else:
            self.plot(graphs, title, name, conf)