aboutsummaryrefslogtreecommitdiffstats
path: root/quantum/visualizer
Commit message (Expand)AuthorAgeFilesLines
* move lcd_backlight_keyframes to correct locationJack Humbert2017-12-071-0/+30
* make it easy to customize logo imageTakayuki Matsubara2017-11-061-0/+1
* Make arguments redo, subproject elimination (#1784)Jack Humbert2017-10-141-12/+20
* Creates a layouts/ folder for keymaps shared between keyboards (#1609)Jack Humbert2017-08-231-1/+1
* Fix uninitialized backlight_level in the VisualizerFred Sundvik2017-07-101-0/+4
* Make it easier to use driversFred Sundvik2017-07-103-4/+39
* Shared default animationsFred Sundvik2017-07-103-0/+208
* Clarify naming between LCD_BACKLIGHT and LED_BACKLIGHTFred Sundvik2017-07-105-56/+26
* Shared gfxconfFred Sundvik2017-07-102-0/+328
* Define visualizer thread priority by defaultFred Sundvik2017-07-101-1/+2
* Whitefox LED control (#1432)Ethan Madden2017-06-253-27/+36
* Change M_2_PI to 2 * PI as it should beFred Sundvik2017-06-251-1/+1
* Change inline to static inlineFred Sundvik2017-06-241-1/+1
* Add function for getting the LCD backlight brightnessFred Sundvik2017-06-242-0/+5
* Include config.h from visualizer.hFred Sundvik2017-06-241-0/+1
* Include config.h before visualizer.hFred Sundvik2017-06-241-1/+1
* Correctly calculate backlight levelFred Sundvik2017-06-161-1/+1
* Add backlight support to the default Ergodox Infinity animationsFred Sundvik2017-06-032-0/+17
* Backlight level handling for the visualizerFred Sundvik2017-06-032-2/+37
* Let BACKLIGHT_ENABLE control the Infinity LEDsFred Sundvik2017-06-032-4/+3
* Fix buffer overrun in lcd_keyframesFred Sundvik2017-04-131-2/+2
* Rename led test to led_keyframes and move animation to ErgodoxFred Sundvik2017-04-093-60/+19
* Combine startup and resume animationsFred Sundvik2017-04-091-4/+4
* Move the logo drawing keyframe to lcd_keyframesFred Sundvik2017-04-092-0/+21
* Move LCD logo to visualizer resourcesFred Sundvik2017-04-094-0/+90
* Add automatic flush for the LCD screenFred Sundvik2017-04-092-5/+4
* Move common visualizer keyframes into visualizer_keyframes.hFred Sundvik2017-04-095-12/+52
* Remove the need to manually enable the visualizerFred Sundvik2017-04-092-19/+23
* Separated backlight and LCD disable/enableFred Sundvik2017-04-096-24/+37
* Move LCD backlight keyframes to its own fileFred Sundvik2017-04-095-50/+89
* Move LCD keyframes to its own fileFred Sundvik2017-04-095-157/+196
* Delete visualizer example integrationFred Sundvik2017-04-094-573/+0
* Tweaks to the Ergodox default visualizerFred Sundvik2017-04-092-3/+26
* Brightness for Ergodox Infinity emulated LEDsFred Sundvik2017-04-093-2/+6
* Emulate Ergodox EZ leds by LCD colorsFred Sundvik2017-04-092-1/+32
* Display layer bitmap and keyboard led states on the LCDFred Sundvik2017-04-092-2/+40
* Move CIE1931 and breathing tables to its own fileFred Sundvik2017-04-091-2/+2
* UGFX is compiled once per keyboard instead of keymapFred Sundvik2017-04-091-2/+2
* Add a keyboard specific visualizerFred Sundvik2017-04-091-0/+4
* added mods status bit to visualizer.SjB2017-01-172-2/+65
* Move the visualizer_user file to keymap folderFred Sundvik2016-07-071-3/+8
* Delete lcd_backlight_hal.cFred Sundvik2016-07-071-3/+0
* Fix the SERIAL_LINK_ENABLE macro in VisualizerFred Sundvik2016-07-071-5/+5
* Fix visualizer crash at startupFred Sundvik2016-07-072-3/+1
* Makefile fixes and update of VisualizerFred Sundvik2016-07-072-7/+5
* Makefile changes and files to compile VisualizerFred Sundvik2016-07-073-15/+11
* Merge commit '73d890a2c9c34b905cd5e74e7146fdd4578dcb96' into add_visualizerFred Sundvik2016-07-065-25/+342
* Delete .gitmodules from visualizerFred Sundvik2016-07-062-3/+0
* Add 'quantum/visualizer/' from commit 'bde869aa7ec8601459bc63b9636081d21108d1be'Fred Sundvik2016-07-0613-0/+1403
k">for ( i = j = 0; i < NR_PERFCTRS; i++ ) { unsigned int k, cpu; unsigned long long sum = 0; printk("%-32s ", perfc_info[i].name); switch ( perfc_info[i].type ) { case TYPE_SINGLE: case TYPE_S_SINGLE: for_each_online_cpu ( cpu ) sum += per_cpu(perfcounters, cpu)[j]; if ( perfc_info[i].type == TYPE_S_SINGLE ) sum = (perfc_t) sum; printk("TOTAL[%12Lu]", sum); if ( sum ) { k = 0; for_each_online_cpu ( cpu ) { if ( k > 0 && (k % 4) == 0 ) printk("\n%46s", ""); printk(" CPU%02u[%10"PRIperfc"u]", cpu, per_cpu(perfcounters, cpu)[j]); ++k; } } ++j; break; case TYPE_ARRAY: case TYPE_S_ARRAY: for_each_online_cpu ( cpu ) { perfc_t *counters = per_cpu(perfcounters, cpu) + j; for ( k = 0; k < perfc_info[i].nr_elements; k++ ) sum += counters[k]; } if ( perfc_info[i].type == TYPE_S_ARRAY ) sum = (perfc_t) sum; printk("TOTAL[%12Lu]", sum); if (sum) { #ifdef PERF_ARRAYS for ( k = 0; k < perfc_info[i].nr_elements; k++ ) { sum = 0; for_each_online_cpu ( cpu ) sum += per_cpu(perfcounters, cpu)[j + k]; if ( perfc_info[i].type == TYPE_S_ARRAY ) sum = (perfc_t) sum; if ( (k % 4) == 0 ) printk("\n%16s", ""); printk(" ARR%02u[%10Lu]", k, sum); } #else k = 0; for_each_online_cpu ( cpu ) { perfc_t *counters = per_cpu(perfcounters, cpu) + j; unsigned int n; sum = 0; for ( n = 0; n < perfc_info[i].nr_elements; n++ ) sum += counters[n]; if ( perfc_info[i].type == TYPE_S_ARRAY ) sum = (perfc_t) sum; if ( k > 0 && (k % 4) == 0 ) printk("\n%46s", ""); printk(" CPU%02u[%10Lu]", cpu, sum); ++k; } #endif } j += perfc_info[i].nr_elements; break; } printk("\n"); } } void perfc_reset(unsigned char key) { unsigned int i, j; s_time_t now = NOW(); if ( key != '\0' ) printk("Xen performance counters RESET (now = 0x%08X:%08X)\n", (u32)(now>>32), (u32)now); /* leave STATUS counters alone -- don't reset */ for ( i = j = 0; i < NR_PERFCTRS; i++ ) { unsigned int cpu; switch ( perfc_info[i].type ) { case TYPE_SINGLE: for_each_online_cpu ( cpu ) per_cpu(perfcounters, cpu)[j] = 0; case TYPE_S_SINGLE: ++j; break; case TYPE_ARRAY: for_each_online_cpu ( cpu ) memset(per_cpu(perfcounters, cpu) + j, 0, perfc_info[i].nr_elements * sizeof(perfc_t)); case TYPE_S_ARRAY: j += perfc_info[i].nr_elements; break; } } arch_perfc_reset(); } static xen_sysctl_perfc_desc_t perfc_d[NR_PERFCTRS]; static xen_sysctl_perfc_val_t *perfc_vals; static unsigned int perfc_nbr_vals; static cpumask_t perfc_cpumap; static int perfc_copy_info(XEN_GUEST_HANDLE_64(xen_sysctl_perfc_desc_t) desc, XEN_GUEST_HANDLE_64(xen_sysctl_perfc_val_t) val) { unsigned int i, j, v; /* We only copy the name and array-size information once. */ if ( !cpus_equal(cpu_online_map, perfc_cpumap) ) { unsigned int nr_cpus; perfc_cpumap = cpu_online_map; nr_cpus = cpus_weight(perfc_cpumap); perfc_nbr_vals = 0; for ( i = 0; i < NR_PERFCTRS; i++ ) { safe_strcpy(perfc_d[i].name, perfc_info[i].name); switch ( perfc_info[i].type ) { case TYPE_SINGLE: case TYPE_S_SINGLE: perfc_d[i].nr_vals = nr_cpus; break; case TYPE_ARRAY: case TYPE_S_ARRAY: perfc_d[i].nr_vals = perfc_info[i].nr_elements; break; } perfc_nbr_vals += perfc_d[i].nr_vals; } xfree(perfc_vals); perfc_vals = xmalloc_array(xen_sysctl_perfc_val_t, perfc_nbr_vals); } if ( guest_handle_is_null(desc) ) return 0; if ( perfc_vals == NULL ) return -ENOMEM; /* Architecture may fill counters from hardware. */ arch_perfc_gather(); /* We gather the counts together every time. */ for ( i = j = v = 0; i < NR_PERFCTRS; i++ ) { unsigned int cpu; switch ( perfc_info[i].type ) { case TYPE_SINGLE: case TYPE_S_SINGLE: for_each_cpu_mask ( cpu, perfc_cpumap ) perfc_vals[v++] = per_cpu(perfcounters, cpu)[j]; ++j; break; case TYPE_ARRAY: case TYPE_S_ARRAY: memset(perfc_vals + v, 0, perfc_d[i].nr_vals * sizeof(*perfc_vals)); for_each_cpu_mask ( cpu, perfc_cpumap ) { perfc_t *counters = per_cpu(perfcounters, cpu) + j; unsigned int k; for ( k = 0; k < perfc_d[i].nr_vals; k++ ) perfc_vals[v + k] += counters[k]; } v += perfc_d[i].nr_vals; j += perfc_info[i].nr_elements; break; } } BUG_ON(v != perfc_nbr_vals); if ( copy_to_guest(desc, perfc_d, NR_PERFCTRS) ) return -EFAULT; if ( copy_to_guest(val, perfc_vals, perfc_nbr_vals) ) return -EFAULT; return 0; } /* Dom0 control of perf counters */ int perfc_control(xen_sysctl_perfc_op_t *pc) { static DEFINE_SPINLOCK(lock); int rc; spin_lock(&lock); switch ( pc->cmd ) { case XEN_SYSCTL_PERFCOP_reset: rc = perfc_copy_info(pc->desc, pc->val); perfc_reset(0); break; case XEN_SYSCTL_PERFCOP_query: rc = perfc_copy_info(pc->desc, pc->val); break; default: rc = -EINVAL; break; } spin_unlock(&lock); pc->nr_counters = NR_PERFCTRS; pc->nr_vals = perfc_nbr_vals; return rc; } /* * Local variables: * mode: C * c-set-style: "BSD" * c-basic-offset: 4 * tab-width: 4 * indent-tabs-mode: nil * End: */